Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:

jobs:
build:
strategy:
matrix:
dotnet: [net481, net6]
configuration: [Debug, Release]

runs-on: windows-latest
# runs-on: ubuntu-latest # Error: setup-msbuild can only be run on Windows runners
Expand All @@ -31,14 +35,13 @@ jobs:
- name: Build
# run: make all # builds the Debug configuration
run: |
msbuild /property:Configuration=Release
msbuild /property:Configuration=Debug
msbuild -p:Build${{ matrix.dotnet }}=true /property:Configuration=${{ matrix.configuration }}
# run: dotnet build --no-restore
- name: Test
run: |
dotnet test --no-build --verbosity normal
dotnet test --no-build --verbosity normal Tests\bin\${{ matrix.configuration }}\${{ matrix.dotnet }}*\tests.dll
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: EDSEditor
name: EDSEditor_${{ matrix.dotnet }}
path: EDSEditorGUI\bin\Release\
2 changes: 2 additions & 0 deletions EDSEditorGUI/DevicePDOView2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,9 @@ public void UpdatePDOinfo(bool updatechoices = true)


SourceGrid.Cells.Editors.ComboBox comboStandard = new SourceGrid.Cells.Editors.ComboBox(typeof(string), srray, false);
#if !NETCOREAPP
comboStandard.Control.DropDownWidth = 0x100;
#endif
comboStandard.Changed += ComboStandard_Changed;

//tableLayoutPanel1.SuspendLayout();
Expand Down
12 changes: 9 additions & 3 deletions EDSEditorGUI/EDSEditorGUI.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net481</TargetFramework>
<TargetFrameworks Condition="'$(BuildNet481)' == 'true'">net481</TargetFrameworks>
<TargetFrameworks Condition="'$(BuildNet6)' == 'true'">net6.0-windows</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net481;net6.0-windows</TargetFrameworks>
<OutputType>WinExe</OutputType>
<RootNamespace>ODEditor</RootNamespace>
<AssemblyName>EDSEditor</AssemblyName>
Expand Down Expand Up @@ -97,7 +99,11 @@
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="SourceGrid" Version="4.4.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="SourceGrid" Version="4.4.0" Condition="'$(TargetFramework)' == 'net481'"/>
<PackageReference Include="SourceGrid-huanlin" Version="6.0.10" Condition="'$(TargetFramework)' == 'net6.0-windows'"/>
<PackageReference Include="System.Resources.Extensions" Version="6.0.0" Condition="'$(TargetFramework)' == 'net6.0-windows'"/>
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>
<PropertyGroup>
<PreBuildEvent>git describe --tags --long --dirty &gt; "$(MSBuildProjectDirectory)\version.txt" || exit 0</PreBuildEvent>
Expand Down
6 changes: 5 additions & 1 deletion EDSEditorGUI/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ You should have received a copy of the GNU General Public License
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using System.IO;
using libEDSsharp;
Expand Down Expand Up @@ -1075,7 +1076,10 @@ private void documentationToolStripMenuItem_Click(object sender, EventArgs e)
DocumentationGen docgen = new DocumentationGen();
docgen.genhtmldoc(temp, dv.eds);
docgen.genmddoc(temp2, dv.eds, this.gitVersion);
System.Diagnostics.Process.Start("file://" + temp2);
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo("cmd", $"/c start {temp2}"));
}
if (IsRunningOnMono())
{
System.Diagnostics.Process.Start("file://" + temp);
Expand Down
6 changes: 4 additions & 2 deletions EDSSharp/EDSSharp.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net481</TargetFramework>
<TargetFrameworks Condition="'$(BuildNet481)' == 'true'">net481</TargetFrameworks>
<TargetFrameworks Condition="'$(BuildNet6)' == 'true'">net6.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net481;net6.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
Expand Down
7 changes: 5 additions & 2 deletions Tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net481</TargetFramework>
<TargetFrameworks Condition="'$(BuildNet481)' == 'true'">net481</TargetFrameworks>
<TargetFrameworks Condition="'$(BuildNet6)' == 'true'">net6.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net481;net6.0</TargetFrameworks>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\libEDSsharp\libEDSsharp.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.analyzers" Version="1.11.0" />
<PackageReference Include="xunit.assert" Version="2.7.0" />
Expand Down
1 change: 0 additions & 1 deletion libEDSsharp/eds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ You should have received a copy of the GNU General Public License
using System.Globalization;
using System.Reflection;
using CanOpenXSD_1_1;
using System.Runtime.Remoting.Messaging;
using System.Net.NetworkInformation;
using System.Security.Cryptography;
using Xml2CSharp;
Expand Down
9 changes: 7 additions & 2 deletions libEDSsharp/libEDSsharp.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net481</TargetFramework>
<TargetFrameworks Condition="'$(BuildNet481)' == 'true'">net481</TargetFrameworks>
<TargetFrameworks Condition="'$(BuildNet6)' == 'true'">net6.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net481;net6.0</TargetFrameworks>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
Expand All @@ -20,4 +22,7 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.CodeDom" Version="6.0.0" Condition="'$(TargetFramework)' == 'net6.0'"/>
</ItemGroup>
</Project>