Skip to content

Commit 9ad1edb

Browse files
committed
Upgrade everything to .NET 5
1 parent 8746a7a commit 9ad1edb

File tree

13 files changed

+660
-3461
lines changed

13 files changed

+660
-3461
lines changed

Diff for: .github/workflows/build.yml

+33-33
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
1-
name: Build
1+
name: build
22

3-
on:
4-
push:
5-
tags: ['*']
6-
branches: [ main ]
7-
pull_request:
8-
branches: [ main ]
3+
on: [push, pull_request]
94

105
jobs:
116
build:
12-
runs-on: windows-latest
13-
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [windows-latest, ubuntu-latest, macos-latest]
11+
env:
12+
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
1413
steps:
15-
- uses: actions/checkout@v2
16-
with:
17-
fetch-depth: 0
14+
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
1817

19-
- uses: microsoft/setup-msbuild@v1
20-
- uses: NuGet/[email protected]
18+
- uses: gittools/actions/gitversion/[email protected]
19+
with:
20+
versionSpec: '5.x'
2121

22-
- name: Restore NuGet packages
23-
run: nuget restore NHtmlUnit.sln
22+
- uses: gittools/actions/gitversion/[email protected]
23+
id: gitversion
24+
with:
25+
updateAssemblyInfo: true
2426

25-
- uses: gittools/actions/gitversion/[email protected]
26-
with:
27-
versionSpec: '5.x.x'
27+
- uses: actions/cache@v2
28+
with:
29+
path: ${{ github.workspace }}/.nuget/packages
30+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
31+
restore-keys: ${{ runner.os }}-nuget-
2832

29-
- uses: gittools/actions/gitversion/[email protected]
30-
id: gitversion # step id used as reference for output values
31-
with:
32-
updateAssemblyInfo: true
33+
- run: dotnet restore
3334

34-
- name: Build Solution
35-
run: msbuild NHtmlUnit.sln /property:Configuration=Release
35+
- run: dotnet build --configuration Release --no-restore
3636

37-
- name: Test Solution
38-
run: packages\NUnit.ConsoleRunner.3.12.0\tools\nunit3-console.exe tests\IntegrationTests\bin\Release\IntegrationTests.dll
37+
- run: dotnet test --configuration Release --no-build --no-restore -p:CollectCoverage=true -p:CoverletOutputFormat=opencover -p:Exclude="[NHtmlUnit.Test*]*"
3938

40-
- name: Create NuGet Package
41-
run: nuget.exe pack NHtmlUnit.nuspec -Verbosity detailed -Symbols -Properties Configuration=Release -Version ${{ steps.gitversion.outputs.nuGetVersion }}
39+
- uses: codecov/codecov-action@v2
4240

43-
- uses: actions/upload-artifact@v2
44-
with:
45-
name: NHtmlUnit.nupkg
46-
path: '*.nupkg'
41+
- run: dotnet pack --include-source --configuration Release --no-build --no-restore -p:PackageVersion="${{ steps.gitversion.outputs.fullSemVer }}" app/NHtmlUnit/NHtmlUnit.csproj --output ${{ github.workspace }}/nugets/
42+
43+
- uses: actions/upload-artifact@v2
44+
with:
45+
name: NHtmlUnit.nupkg
46+
path: ${{ github.workspace }}/nugets/*.nupkg
4747

4848
release:
4949
runs-on: ubuntu-latest

Diff for: app/NHtmlUnit/NHtmlUnit.csproj

+9-2,172
Large diffs are not rendered by default.

Diff for: app/NHtmlUnit/packages.config

-4
This file was deleted.

Diff for: app/NHtmlUnitGenerator/NHtmlUnit.Generator.csproj

+7-202
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project Sdk="Microsoft.NET.Sdk">
32
<PropertyGroup>
4-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
3+
<TargetFramework>net5.0</TargetFramework>
54
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
6-
<ProductVersion>8.0.30703</ProductVersion>
7-
<SchemaVersion>2.0</SchemaVersion>
8-
<ProjectGuid>{15D5F20A-A36D-48CF-9CE3-F79BDB18B7C9}</ProjectGuid>
95
<OutputType>Exe</OutputType>
10-
<AppDesignerFolder>Properties</AppDesignerFolder>
11-
<RootNamespace>NHtmlUnit.Generator</RootNamespace>
12-
<AssemblyName>NHtmlUnit.Generator</AssemblyName>
13-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
14-
<TargetFrameworkProfile>
15-
</TargetFrameworkProfile>
16-
<FileAlignment>512</FileAlignment>
176
<PublishUrl>publish\</PublishUrl>
187
<Install>true</Install>
198
<InstallFrom>Disk</InstallFrom>
@@ -31,198 +20,22 @@
3120
<BootstrapperEnabled>true</BootstrapperEnabled>
3221
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
3322
<RestorePackages>true</RestorePackages>
34-
</PropertyGroup>
35-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
36-
<PlatformTarget>AnyCPU</PlatformTarget>
37-
<DebugSymbols>true</DebugSymbols>
38-
<DebugType>full</DebugType>
39-
<Optimize>false</Optimize>
40-
<OutputPath>bin\Debug\</OutputPath>
41-
<DefineConstants>DEBUG;TRACE</DefineConstants>
42-
<ErrorReport>prompt</ErrorReport>
43-
<WarningLevel>4</WarningLevel>
44-
<Prefer32Bit>false</Prefer32Bit>
45-
</PropertyGroup>
46-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
47-
<PlatformTarget>x86</PlatformTarget>
48-
<DebugType>pdbonly</DebugType>
49-
<Optimize>true</Optimize>
50-
<OutputPath>bin\Release\</OutputPath>
51-
<DefineConstants>TRACE</DefineConstants>
52-
<ErrorReport>prompt</ErrorReport>
53-
<WarningLevel>4</WarningLevel>
54-
<Prefer32Bit>false</Prefer32Bit>
23+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
5524
</PropertyGroup>
5625
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
57-
<DebugSymbols>true</DebugSymbols>
58-
<OutputPath>bin\Debug\</OutputPath>
59-
<DefineConstants>DEBUG;TRACE</DefineConstants>
60-
<DebugType>full</DebugType>
61-
<PlatformTarget>AnyCPU</PlatformTarget>
62-
<ErrorReport>prompt</ErrorReport>
6326
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
6427
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
65-
<Prefer32Bit>false</Prefer32Bit>
66-
</PropertyGroup>
67-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
68-
<OutputPath>bin\Release\</OutputPath>
69-
<DefineConstants>TRACE</DefineConstants>
70-
<Optimize>true</Optimize>
71-
<DebugType>pdbonly</DebugType>
72-
<PlatformTarget>AnyCPU</PlatformTarget>
73-
<ErrorReport>prompt</ErrorReport>
74-
<Prefer32Bit>false</Prefer32Bit>
7528
</PropertyGroup>
7629
<ItemGroup>
7730
<Reference Include="HtmlUnit, Version=2.14.1.0, Culture=neutral, processorArchitecture=MSIL">
7831
<SpecificVersion>False</SpecificVersion>
7932
<HintPath>..\..\lib\HtmlUnit\anycpu\HtmlUnit.dll</HintPath>
8033
</Reference>
81-
<Reference Include="IKVM.AWT.WinForms, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
82-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.AWT.WinForms.dll</HintPath>
83-
<Private>True</Private>
84-
</Reference>
85-
<Reference Include="IKVM.OpenJDK.Beans, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
86-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Beans.dll</HintPath>
87-
<Private>True</Private>
88-
</Reference>
89-
<Reference Include="IKVM.OpenJDK.Charsets, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
90-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Charsets.dll</HintPath>
91-
<Private>True</Private>
92-
</Reference>
93-
<Reference Include="IKVM.OpenJDK.Cldrdata, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
94-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Cldrdata.dll</HintPath>
95-
<Private>True</Private>
96-
</Reference>
97-
<Reference Include="IKVM.OpenJDK.Corba, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
98-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Corba.dll</HintPath>
99-
<Private>True</Private>
100-
</Reference>
101-
<Reference Include="IKVM.OpenJDK.Core, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
102-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Core.dll</HintPath>
103-
<Private>True</Private>
104-
</Reference>
105-
<Reference Include="IKVM.OpenJDK.Jdbc, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
106-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Jdbc.dll</HintPath>
107-
<Private>True</Private>
108-
</Reference>
109-
<Reference Include="IKVM.OpenJDK.Localedata, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
110-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Localedata.dll</HintPath>
111-
<Private>True</Private>
112-
</Reference>
113-
<Reference Include="IKVM.OpenJDK.Management, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
114-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Management.dll</HintPath>
115-
<Private>True</Private>
116-
</Reference>
117-
<Reference Include="IKVM.OpenJDK.Media, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
118-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Media.dll</HintPath>
119-
<Private>True</Private>
120-
</Reference>
121-
<Reference Include="IKVM.OpenJDK.Misc, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
122-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Misc.dll</HintPath>
123-
<Private>True</Private>
124-
</Reference>
125-
<Reference Include="IKVM.OpenJDK.Naming, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
126-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Naming.dll</HintPath>
127-
<Private>True</Private>
128-
</Reference>
129-
<Reference Include="IKVM.OpenJDK.Nashorn, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
130-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Nashorn.dll</HintPath>
131-
<Private>True</Private>
132-
</Reference>
133-
<Reference Include="IKVM.OpenJDK.Remoting, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
134-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Remoting.dll</HintPath>
135-
<Private>True</Private>
136-
</Reference>
137-
<Reference Include="IKVM.OpenJDK.Security, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
138-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Security.dll</HintPath>
139-
<Private>True</Private>
140-
</Reference>
141-
<Reference Include="IKVM.OpenJDK.SwingAWT, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
142-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.SwingAWT.dll</HintPath>
143-
<Private>True</Private>
144-
</Reference>
145-
<Reference Include="IKVM.OpenJDK.Text, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
146-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Text.dll</HintPath>
147-
<Private>True</Private>
148-
</Reference>
149-
<Reference Include="IKVM.OpenJDK.Tools, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
150-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Tools.dll</HintPath>
151-
<Private>True</Private>
152-
</Reference>
153-
<Reference Include="IKVM.OpenJDK.Util, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
154-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Util.dll</HintPath>
155-
<Private>True</Private>
156-
</Reference>
157-
<Reference Include="IKVM.OpenJDK.XML.API, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
158-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.API.dll</HintPath>
159-
<Private>True</Private>
160-
</Reference>
161-
<Reference Include="IKVM.OpenJDK.XML.Bind, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
162-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.Bind.dll</HintPath>
163-
<Private>True</Private>
164-
</Reference>
165-
<Reference Include="IKVM.OpenJDK.XML.Crypto, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
166-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.Crypto.dll</HintPath>
167-
<Private>True</Private>
168-
</Reference>
169-
<Reference Include="IKVM.OpenJDK.XML.Parse, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
170-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.Parse.dll</HintPath>
171-
<Private>True</Private>
172-
</Reference>
173-
<Reference Include="IKVM.OpenJDK.XML.Transform, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
174-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.Transform.dll</HintPath>
175-
<Private>True</Private>
176-
</Reference>
177-
<Reference Include="IKVM.OpenJDK.XML.WebServices, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
178-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.WebServices.dll</HintPath>
179-
<Private>True</Private>
180-
</Reference>
181-
<Reference Include="IKVM.OpenJDK.XML.XPath, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
182-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.XPath.dll</HintPath>
183-
<Private>True</Private>
184-
</Reference>
185-
<Reference Include="IKVM.Runtime, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
186-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.Runtime.dll</HintPath>
187-
<Private>True</Private>
188-
</Reference>
189-
<Reference Include="IKVM.Runtime.JNI, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
190-
<HintPath>..\..\packages\IKVM.8.1.5717.0\lib\IKVM.Runtime.JNI.dll</HintPath>
191-
<Private>True</Private>
192-
</Reference>
193-
<Reference Include="System" />
19434
</ItemGroup>
19535
<ItemGroup>
19636
<Compile Include="..\GlobalAssemblyInfo.cs">
19737
<Link>Properties\GlobalAssemblyInfo.cs</Link>
19838
</Compile>
199-
<Compile Include="IWrapperMethodBase.cs" />
200-
<Compile Include="ListTypeMapEntry.cs" />
201-
<Compile Include="Program.cs" />
202-
<Compile Include="Properties\AssemblyInfo.cs" />
203-
<Compile Include="Properties\Settings.Designer.cs">
204-
<AutoGen>True</AutoGen>
205-
<DesignTimeSharedInput>True</DesignTimeSharedInput>
206-
<DependentUpon>Settings.settings</DependentUpon>
207-
</Compile>
208-
<Compile Include="Settings.cs" />
209-
<Compile Include="WrapperClassInfo.cs" />
210-
<Compile Include="WrapperConstructorInfo.cs" />
211-
<Compile Include="WrapperMethodInfo.cs" />
212-
<Compile Include="WrapperParameterInfo.cs" />
213-
<Compile Include="WrapperPropertyInfo.cs" />
214-
<Compile Include="WrapperRepository.cs" />
215-
<Compile Include="WrapperStaticPublicField.cs" />
216-
</ItemGroup>
217-
<ItemGroup>
218-
<None Include="app.config" />
219-
<None Include="packages.config" />
220-
<None Include="Properties\Settings.settings">
221-
<Generator>SettingsSingleFileGenerator</Generator>
222-
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
223-
</None>
224-
<None Include="Templates\GlobalAssemblyInfo.cs.template" />
225-
<None Include="Templates\NHtmlUnit.nuspec.template" />
22639
</ItemGroup>
22740
<ItemGroup>
22841
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
@@ -245,17 +58,9 @@
24558
<ProductName>Windows Installer 3.1</ProductName>
24659
<Install>true</Install>
24760
</BootstrapperPackage>
61+
<PackageReference Include="IKVM" Version="8.1.5717.0" />
62+
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.2.220602">
63+
<PrivateAssets>all</PrivateAssets>
64+
</PackageReference>
24865
</ItemGroup>
249-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
250-
<PropertyGroup>
251-
<PreBuildEvent>
252-
</PreBuildEvent>
253-
</PropertyGroup>
254-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
255-
Other similar extension points exist, see Microsoft.Common.targets.
256-
<Target Name="BeforeBuild">
257-
</Target>
258-
<Target Name="AfterBuild">
259-
</Target>
260-
-->
26166
</Project>

Diff for: app/NHtmlUnitGenerator/Properties/Settings.Designer.cs

-49
This file was deleted.

Diff for: app/NHtmlUnitGenerator/Properties/Settings.settings

-12
This file was deleted.

0 commit comments

Comments
 (0)