Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong assembly resolving logic when several runtimes are installed and assembly is missing in deps.json #1331

Closed
wants to merge 117 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
1f9eb7e
Recognize .NET 7 when installed
CharliePoole Jun 29, 2022
9b1284d
Update global.json
CharliePoole Jun 30, 2022
a1bfef7
Merge pull request #1197 from nunit/issue-1193
CharliePoole Jun 30, 2022
7dc0f03
Create dev release when merging into version3 branch
CharliePoole Jun 30, 2022
f2564da
Merge pull request #1198 from nunit/issue-1196
CharliePoole Jun 30, 2022
e868668
Temporarily suppress publication step
CharliePoole Jun 30, 2022
1814fda
Ensure that agent path is quoted when launching it
CharliePoole Aug 10, 2022
a55acb3
Merge pull request #1207 from nunit/issue-1206
CharliePoole Aug 11, 2022
aa6e34e
(Re)Fix issue 1178
CharliePoole Sep 11, 2022
80f67d0
Merge pull request #1213 from nunit/issue-1178
CharliePoole Sep 11, 2022
780dc6a
Re-enable publish target commented out prviously
CharliePoole Sep 12, 2022
692a691
Add .NET 7.0 Agent
CharliePoole Sep 18, 2022
1ddaab4
Install .NET 7.0 RC in AppVeyor
CharliePoole Sep 18, 2022
4ef2373
Fix error in appveyor.yml
CharliePoole Sep 18, 2022
abb4994
Don't run .Net 7.0 package tests for now
CharliePoole Sep 19, 2022
b82f2a7
Merge pull request #1220 from nunit/issue-1216b
CharliePoole Sep 19, 2022
2bb2c7c
Use registry to find Windows install directory
CharliePoole Sep 22, 2022
0d452f7
Display dotnet info in AppVeyor build
CharliePoole Sep 22, 2022
ad1c826
Split net core framework location functionality into a separate class
CharliePoole Sep 22, 2022
aa4c43a
Recognize support for .NET core runtimes installed in path
CharliePoole Sep 23, 2022
f54da34
Re-enable package test under .NET 7.0
CharliePoole Sep 23, 2022
0409a61
Merge pull request #1222 from nunit/issue-941
CharliePoole Sep 23, 2022
b7f5ca4
Don't throw when an unknown / unsupported runtime is installed
CharliePoole Sep 24, 2022
d59982b
Merge pull request #1226 from nunit/issue-1223
CharliePoole Sep 25, 2022
19d0bed
Include netcore 3.1 build in engine package once again
CharliePoole Sep 25, 2022
9ad9140
Merge pull request #1228 from nunit/issue-1225
CharliePoole Sep 25, 2022
eb7428c
Install net 7.0
CharliePoole Sep 25, 2022
fa0c761
Merge pull request #1229 from nunit/azure-net70
CharliePoole Sep 25, 2022
4141251
Add Tests of TcpServer
CharliePoole Sep 30, 2022
a31f520
Make TCP Listener thread a background thread
CharliePoole Oct 2, 2022
32772a0
Merge pull request #1231 from nunit/issue-1183
CharliePoole Oct 2, 2022
47fc61f
Change name of net 6.0 runner
CharliePoole Oct 4, 2022
10f43fb
Merge pull request #1233 from nunit/issue-1224
CharliePoole Oct 4, 2022
586ee5f
Build console runner with .NET 4.6.2
CharliePoole Oct 4, 2022
ab8f6bf
Upgrade nunit.engine to net462
CharliePoole Oct 5, 2022
93a270d
Upgrade net40 agent to net462
CharliePoole Oct 6, 2022
edde184
Upgrade net40 build of mock-assembly to net462
CharliePoole Oct 6, 2022
5f793cd
Fix Azure Build
CharliePoole Oct 6, 2022
7be3934
Temporarily disable Linux and MacOs jobs
CharliePoole Oct 6, 2022
f2d57ce
Merge pull request #1235 from nunit/issue-1232
CharliePoole Oct 7, 2022
121e363
Restructure build to use individual project bin directories
CharliePoole Oct 12, 2022
c45bfb3
Refactor cake scripts
CharliePoole Oct 13, 2022
ead55ae
Merge pull request #1241 from nunit/issue-1118
CharliePoole Oct 13, 2022
f43812b
Add WindowsDesktop and AspNetCore app frameworks to runtimeconfig.json
CharliePoole Oct 15, 2022
921683d
Eliminate redundant package tests
CharliePoole Oct 15, 2022
8501479
Add package test using windows under .NET 6.0
CharliePoole Oct 15, 2022
1bc9739
Add ASP.NET Core package test
CharliePoole Oct 15, 2022
d0fb4aa
Merge pull request #1242 from nunit/issue-1203
CharliePoole Oct 15, 2022
aa73124
Upgrade Cake.Tool to 2.3.0
CharliePoole Oct 17, 2022
61db28c
Merge pull request #1244 from nunit/cake-tool-2.3.0
CharliePoole Oct 18, 2022
0538dc7
Upgrade from net7.0 RC 1 to RC 2
CharliePoole Oct 18, 2022
6a32d9a
Refactoring
CharliePoole Oct 18, 2022
4320607
Merge pull request #1245 from nunit/issue-1243
CharliePoole Oct 19, 2022
976696c
Stop building nunit.engine.core for net5.0 and net6.0
CharliePoole Oct 19, 2022
4816ccd
Display configuration correctly as part of AssemblyTitle
CharliePoole Oct 20, 2022
3dd9e50
Merge pull request #1248 from nunit/issue-1246
CharliePoole Oct 20, 2022
16e0a08
Display better message for BadImageFormatException
CharliePoole Oct 24, 2022
5dec270
Merge pull request #1249 from nunit/issue-299
CharliePoole Oct 24, 2022
c3b8754
Eliminate multiple loading of assembly in same AppDomain; add tests
CharliePoole Oct 24, 2022
f82717b
Merge pull request #1250 from nunit/issue-1217
CharliePoole Oct 24, 2022
c418bd6
Copy agents in post-build events
CharliePoole Oct 26, 2022
6b019ef
Merge pull request #1251 from nunit/build-fixes
CharliePoole Oct 26, 2022
9288b91
Use .NET 7.0 rc2 in azure build
CharliePoole Oct 26, 2022
d2cb868
Merge pull request #1252 from nunit/azure-fix
CharliePoole Oct 26, 2022
d9fb2dc
Eliminate warnings about preview version of .NET 7.0
CharliePoole Oct 29, 2022
51ffc77
Build under Linux in Azure
CharliePoole Oct 29, 2022
04cc022
Fix post-build events to work cross-platform
CharliePoole Oct 29, 2022
b58eba0
Merge pull request #1254 from nunit/linux-build
CharliePoole Oct 29, 2022
0acb83c
Enable MacOS build on Azure
CharliePoole Oct 29, 2022
57ec9b7
Temporarily disable running tests under MacOS in Azure CI
CharliePoole Oct 29, 2022
28f41ff
Merge pull request #1255 from nunit/macos-build
CharliePoole Oct 29, 2022
9e70f4c
Allow mono to run all minor versions of .NET Framework 4.x
CharliePoole Oct 30, 2022
a53848a
Run tests under Linux
CharliePoole Oct 31, 2022
fbb5e67
Merge pull request #1256 from nunit/issue-1130
CharliePoole Oct 31, 2022
547012a
Enable testing under MacOS on Azure
CharliePoole Oct 31, 2022
4547655
Merge pull request #1257 from nunit/macos-test
CharliePoole Oct 31, 2022
cd945ee
Update to .NET 7.0 final release
CharliePoole Nov 8, 2022
83a8cda
Merge pull request #1266 from nunit/issue-1265
CharliePoole Nov 8, 2022
37dc306
Implement new dependency resolver for .NET Core tests
CharliePoole Nov 12, 2022
57918d5
Disable X86 .NET Core Tests on AppVeyor
CharliePoole Nov 13, 2022
7ff4501
Merge pull request #1267 from nunit/issue-291
CharliePoole Nov 13, 2022
f76d141
Allow .NET Standard assemblies when loading a VS solution
CharliePoole Nov 14, 2022
00d8d5e
Merge pull request #1268 from nunit/issue-1182
CharliePoole Nov 14, 2022
aeacb52
Fix entry point for dotnet tool
CharliePoole Nov 16, 2022
ca9cbf8
Merge pull request #1272 from nunit/issue-1271
CharliePoole Nov 16, 2022
92ed1bf
Add missing file to NUnit.Engine package
CharliePoole Dec 3, 2022
9f3210e
Merge pull request #1278 from nunit/issue-1275
CharliePoole Dec 3, 2022
52c96e4
Handle exception when .NET Core is not installed
CharliePoole Dec 5, 2022
6daf1c9
Merge pull request #1279 from nunit/issue-1277
CharliePoole Dec 5, 2022
a586d95
Refactor scripts; represent each package by a separate class
CharliePoole Dec 6, 2022
56c29e2
Separate build targets for each package
CharliePoole Dec 11, 2022
0eb51df
Use BuildSettings to pass options and arguements
CharliePoole Dec 15, 2022
ae3fcb5
Refactor scripts
CharliePoole Dec 19, 2022
f7ec62f
Build full solution for local build under windows
CharliePoole Dec 20, 2022
a1cc2dd
Merge pull request #1281 from nunit/issue-1271b
CharliePoole Dec 20, 2022
131ce0c
Restore ability to debug packages
CharliePoole Dec 28, 2022
4a32d54
Merge pull request #1284 from nunit/package-debug
CharliePoole Dec 28, 2022
fd47fcf
Resolve WindowsDesktop and AspNetCore tests correctly
CharliePoole Jan 1, 2023
9c42495
Changes from review
CharliePoole Jan 3, 2023
ef2055c
Merge pull request #1285 from nunit/issue-1274
CharliePoole Jan 4, 2023
91c9f60
Use preinstalled .NET 7.0 SDK on AppVeyor
CharliePoole Jan 7, 2023
2fe59e7
Merge pull request #1295 from nunit/issue-1294
CharliePoole Jan 7, 2023
06447e4
Use NUnit-specific environment variable names
CharliePoole Jan 7, 2023
abc8668
Merge pull request #1298 from nunit/issue-1296
CharliePoole Jan 7, 2023
477990c
Use x86 dotnet install path when running an x86 test assembly
CharliePoole Jan 11, 2023
76330ac
Merge pull request #1304 from nunit/issue-1300
CharliePoole Jan 11, 2023
155d902
Fix for #1307
OsirisTerje Jan 15, 2023
037e1b5
Not running when version is null
OsirisTerje Jan 15, 2023
3924b98
Added check in calling method
OsirisTerje Jan 16, 2023
67fbaeb
Merge pull request #1309 from nunit/fixNullVersion
OsirisTerje Jan 18, 2023
01a9cb2
fix assembly dependencies resolver for netcore
svg2003 Feb 12, 2023
b3b3bee
Added net 8
OsirisTerje Feb 12, 2023
8df7511
Merge pull request #1317 from svg2003/issue-1311-ver3
OsirisTerje Feb 12, 2023
49001ac
Merge remote-tracking branch 'origin/version3' into net8
OsirisTerje Feb 12, 2023
0d4a295
Fixed up ref comments
OsirisTerje Feb 20, 2023
95fb00f
Merge pull request #1320 from nunit/net8
rprouse Feb 20, 2023
3303ab7
Use custom context only (don't use assemblies, loaded into AppDomain).
svg2003 Apr 6, 2023
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
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"cake.tool": {
"version": "2.0.0",
"version": "2.3.0",
"commands": [
"dotnet-cake"
]
Expand Down
16 changes: 14 additions & 2 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,28 @@ See also [Building and testing for Linux on a Windows machine](#building-and-tes

## Prerequisites

- Visual Studio 2017 Update 5 or newer to build on Windows
- Visual Studio 2017 Update 5 or newer to build on Windows. Preferably use VS2022.
- .NET 4.5+ or Mono 5.10.0+
- .NET Core 1.1.6 or newer
- A set of runtimes, from .NET Core 2.1.30 runtime, and some more, see below. You will also need the net framework 3.5 service pack 1 installed.
- An appropriate newer dotnet SDK, e.g. .net 6.
- Chocolatey : [Install instructions here](https://docs.chocolatey.org/en-us/choco/setup)
- Wix: [Install instructions here](https://wixtoolset.org/docs/wix3/). Note that you need to install both the [3.11 toolset](https://github.com/wixtoolset/wix3/releases/tag/wix3112rtm) (Use the wix311.exe installer) and the [VS2022 Vsix extension](https://marketplace.visualstudio.com/items?itemName=WixToolset.WixToolsetVisualStudio2022Extension).

## Solution Build

All projects are built together using a single Visual Studio solution NUnitConsole.sln, which may be
built with Visual Studio or on the command line using Cake. The projects all place their output in
a common bin directory.

The easiest way is to use the command line with just `build`. If that works, you can test it doing `build -t test` and then create a package doing `build -t package`.
On each step you may get some errors, mostly due to missing frameworks. Install whatever is required. We will work on getting a complete list up.
The generated packages can be found in the `package` subfolder.

## Setting a new version

Before building a new package, ensure you set the appropriate (according to [Semver](https://semver.org) ) next version number to be used for the final package. Note that you dont need to set any prerelase tags, those will be done automatically based on whatever non-main branch you are building from.
You set that version number in the 1st line of the `gitversion.yml` file.

## Build Script

We use **Cake** (http://cakebuild.net) to build NUnit for distribution. The primary script that controls
Expand Down
15 changes: 15 additions & 0 deletions CopyAgentFiles.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
:: As each target runtime build is completed, we copy the agent files to
:: both the console and engine output directories, so they are available
:: for running tests and packaging. Supporting assemblies are copied too.
:: This batch filecopies agent files from one location to another as
:: specified by the two arguments

set SOURCE_FILES=%1
set TARGET_DIR=%2

echo Copying agent files
echo from %SOURCE_FILES%
echo to %TARGET_DIR%
xcopy %SOURCE_FILES% %TARGET_DIR% /S /Y /Q

exit 0
2 changes: 1 addition & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
next-version: 3.14.0
next-version: 3.16.3
mode: ContinuousDelivery
legacy-semver-padding: 5
build-metadata-padding: 5
Expand Down
37 changes: 31 additions & 6 deletions NUnitConsole.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29728.190
# Visual Studio Version 17
VisualStudioVersion = 17.1.32228.430
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{49D441DF-39FD-4F4D-AECA-86CF8EFE23AF}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -17,9 +17,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
CHANGES.txt = CHANGES.txt
ci.cake = ci.cake
CONTRIBUTING.md = CONTRIBUTING.md
CopyAgentFiles.bat = CopyAgentFiles.bat
src\Directory.Build.props = src\Directory.Build.props
GitReleaseManager.yaml = GitReleaseManager.yaml
GitVersion.yml = GitVersion.yml
global.json = global.json
header-check.cake = header-check.cake
LICENSE.txt = LICENSE.txt
NetFXTests.nunit = NetFXTests.nunit
Expand All @@ -34,6 +36,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nuget", "nuget", "{A972031D-2F61-4183-AF75-99EE1A9F6B32}"
ProjectSection(SolutionItems) = preProject
nuget\nunit.agent.addins = nuget\nunit.agent.addins
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NUnitEngine", "NUnitEngine", "{31B45C4C-206F-4F31-9CC6-33BF11DFEE39}"
EndProject
Expand Down Expand Up @@ -63,15 +68,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit3-console.tests", "src
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "engine", "engine", "{43A219A8-2995-4884-806F-FDB9CD25D403}"
ProjectSection(SolutionItems) = preProject
nuget\engine\nunit.agent.addins = nuget\engine\nunit.agent.addins
nuget\engine\nunit.engine.api.nuspec = nuget\engine\nunit.engine.api.nuspec
nuget\engine\nunit.engine.nuget.addins = nuget\engine\nunit.engine.nuget.addins
nuget\engine\nunit.engine.nuspec = nuget\engine\nunit.engine.nuspec
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "runners", "runners", "{F3E87D0F-6F06-4C0B-AE06-42C0834C3C6E}"
ProjectSection(SolutionItems) = preProject
nuget\runners\nunit.agent.addins = nuget\runners\nunit.agent.addins
nuget\runners\DotnetToolSettings.xml = nuget\runners\DotnetToolSettings.xml
nuget\runners\nunit.console-runner-with-extensions.nuspec = nuget\runners\nunit.console-runner-with-extensions.nuspec
nuget\runners\nunit.console-runner.netcore.nuspec = nuget\runners\nunit.console-runner.netcore.nuspec
nuget\runners\nunit.console-runner.nuspec = nuget\runners\nunit.console-runner.nuspec
Expand Down Expand Up @@ -111,12 +115,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "deprecated", "deprecated",
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cake", "cake", "{9BCA00E2-D072-424B-A6DF-5BECF719C1FB}"
ProjectSection(SolutionItems) = preProject
cake\build-settings.cake = cake\build-settings.cake
cake\constants.cake = cake\constants.cake
cake\header-check.cake = cake\header-check.cake
cake\package-checks.cake = cake\package-checks.cake
cake\package-definitions.cake = cake\package-definitions.cake
cake\package-tester.cake = cake\package-tester.cake
cake\package-tests.cake = cake\package-tests.cake
cake\packages.cake = cake\packages.cake
cake\test-results.cake = cake\test-results.cake
cake\utilities.cake = cake\utilities.cake
cake\versioning.cake = cake\versioning.cake
Expand All @@ -134,6 +138,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "zip", "zip", "{20005864-BE8
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit.engine.core.tests", "src\NUnitEngine\nunit.engine.core.tests\nunit.engine.core.tests.csproj", "{CACC0520-B452-4310-A33C-DC944129ACDD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit3-netcore-console", "src\NUnitConsole\nunit3-netcore-console\nunit3-netcore-console.csproj", "{472314FE-1F18-4359-B620-FF20BF3AF553}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "windows-test", "src\NUnitEngine\windows-test\windows-test.csproj", "{D3A28EEB-A7C4-4A03-B958-4D161C208963}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "aspnetcore-test", "src\NUnitEngine\aspnetcore-test\aspnetcore-test.csproj", "{25FFAF61-C456-4BF9-87BE-34930F22B669}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -188,6 +198,18 @@ Global
{CACC0520-B452-4310-A33C-DC944129ACDD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CACC0520-B452-4310-A33C-DC944129ACDD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CACC0520-B452-4310-A33C-DC944129ACDD}.Release|Any CPU.Build.0 = Release|Any CPU
{472314FE-1F18-4359-B620-FF20BF3AF553}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{472314FE-1F18-4359-B620-FF20BF3AF553}.Debug|Any CPU.Build.0 = Debug|Any CPU
{472314FE-1F18-4359-B620-FF20BF3AF553}.Release|Any CPU.ActiveCfg = Release|Any CPU
{472314FE-1F18-4359-B620-FF20BF3AF553}.Release|Any CPU.Build.0 = Release|Any CPU
{D3A28EEB-A7C4-4A03-B958-4D161C208963}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D3A28EEB-A7C4-4A03-B958-4D161C208963}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D3A28EEB-A7C4-4A03-B958-4D161C208963}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D3A28EEB-A7C4-4A03-B958-4D161C208963}.Release|Any CPU.Build.0 = Release|Any CPU
{25FFAF61-C456-4BF9-87BE-34930F22B669}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25FFAF61-C456-4BF9-87BE-34930F22B669}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25FFAF61-C456-4BF9-87BE-34930F22B669}.Release|Any CPU.ActiveCfg = Release|Any CPU
{25FFAF61-C456-4BF9-87BE-34930F22B669}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -214,6 +236,9 @@ Global
{0C0D20CE-70CD-4CEF-BE9B-AEB8A2DE9C8A} = {49D441DF-39FD-4F4D-AECA-86CF8EFE23AF}
{20005864-BE82-412D-99BF-288E2D8370E9} = {49D441DF-39FD-4F4D-AECA-86CF8EFE23AF}
{CACC0520-B452-4310-A33C-DC944129ACDD} = {31B45C4C-206F-4F31-9CC6-33BF11DFEE39}
{472314FE-1F18-4359-B620-FF20BF3AF553} = {576DB1E6-C5EC-4FEF-A826-EC19D8BEE572}
{D3A28EEB-A7C4-4A03-B958-4D161C208963} = {31B45C4C-206F-4F31-9CC6-33BF11DFEE39}
{25FFAF61-C456-4BF9-87BE-34930F22B669} = {31B45C4C-206F-4F31-9CC6-33BF11DFEE39}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D8E4FC26-5422-4C51-8BBC-D1AC0A578711}
Expand Down
Loading