Skip to content

Commit

Permalink
Update supported dotnet versions
Browse files Browse the repository at this point in the history
* Also add Directory.Build.props to the solution
* Add support for running `dotnet test`
* Add Test step to CI

+semver:major
  • Loading branch information
jasonleenaylor committed Nov 22, 2024
1 parent ca7877d commit aefb2e4
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 20 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/CI-CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ jobs:
- name: Install .NET Core
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x

- name: Restore Windows
run: dotnet restore --runtime=win10-x64
run: dotnet restore --runtime=win-x64

- name: Build Windows
run: dotnet build IdlImpTool --no-restore --runtime=win10-x64
- name: Build & Test Windows
run: |
dotnet build IdlImpTool --no-restore --runtime=win-x64
dotnet test IdlImporterTests
- name: Restore Linux
run: dotnet restore --runtime=linux-x64
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Security
-->

## [Unreleased]
## [4.0.0] - 2024-11-22

- Add net4.6.2 and net8.0 support
- Drop net5.0, netcore3.1, and net4.6.1 support
- Update dependencies

## [3.0.1] - 2022-09-08

Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<TargetFrameworks>net461;netstandard2.0;net5.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0;net8.0</TargetFrameworks>
<RootNamespace>SIL.IDLImporterTool</RootNamespace>
<Configurations>Debug;Release</Configurations>
<Company>SIL International</Company>
Expand Down
5 changes: 3 additions & 2 deletions IDLImporterTests/IDLImporterTests.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net461</TargetFrameworks>
<AssemblyTitle>IDLImporterTests</AssemblyTitle>
<PackageId>SIL.IdlImporter.Tests</PackageId>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.12.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageReference Include="SIL.ReleaseTasks" Version="3.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions IdlImpTool/IDLImp.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>win10-x64;linux-x64</RuntimeIdentifiers>
<TargetFrameworks>net8.0</TargetFrameworks>
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
<AssemblyTitle>IDLImp</AssemblyTitle>
<Description>Imports the COM interfaces from an IDL file for use with .NET. Can handle c-style arrays and OLECHAR pointers.</Description>
<PackAsTool>true</PackAsTool>
Expand Down
27 changes: 17 additions & 10 deletions IdlImporter.sln
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IDLImporter", "IDLImporter\IDLImporter.csproj", "{D23CFDE1-DF89-433E-BE88-6C08279F7349}"
# Visual Studio Version 17
VisualStudioVersion = 17.11.35327.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IDLImporter", "IDLImporter\IDLImporter.csproj", "{D23CFDE1-DF89-433E-BE88-6C08279F7349}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IDLImp", "IdlImpTool\IDLImp.csproj", "{B5904870-00F3-4833-A981-E22B79A16106}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IDLImp", "IdlImpTool\IDLImp.csproj", "{B5904870-00F3-4833-A981-E22B79A16106}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IDLImporterTests", "IDLImporterTests\IDLImporterTests.csproj", "{6E18BE34-1CF5-48EA-9C47-F0E89A32E648}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IDLImporterTests", "IDLImporterTests\IDLImporterTests.csproj", "{6E18BE34-1CF5-48EA-9C47-F0E89A32E648}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionFolder", "SolutionFolder", "{17449FC8-15AE-49B9-9DEA-22AAFF0F9285}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
GitVersion.yml = GitVersion.yml
CHANGELOG.md = CHANGELOG.md
.gitignore = .gitignore
.editorconfig = .editorconfig
EndProjectSection
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitignore = .gitignore
CHANGELOG.md = CHANGELOG.md
Directory.Build.props = Directory.Build.props
GitVersion.yml = GitVersion.yml
README.md = README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -34,4 +38,7 @@ Global
{6E18BE34-1CF5-48EA-9C47-F0E89A32E648}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6E18BE34-1CF5-48EA-9C47-F0E89A32E648}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,19 @@ Install the [SIL.IdlImporter](https://www.nuget.org/packages/SIL.IdlImporter) nu
dotnet restore
dotnet build
```

## Testing Locally

### Unit testing
```bash
dotnet test
```

### Using your local changes
```bash
dotnet pack
dotnet tool uninstall -g SIL.IdlImporter.Tool
dotnet tool install -g --add-source output SIL.IdlImporter.Tool --version [new version]
```
Note: If you are testing with FieldWorks you should make this change in the BuildInclude.targets in the ViewsInterfaces project

0 comments on commit aefb2e4

Please sign in to comment.