Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 158
Updated misc articles to fix up version numbers, and update text to …#849
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
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
923105c
Updated misc articles to fix up version numbers, and update text to m…
OsirisTerje e2476a1
fixing line length issues
OsirisTerje 47fa065
fixing more line length issues
OsirisTerje 33d99a3
Update docs/articles/nunit/getting-started/dotnet-core-and-dotnet-sta…
OsirisTerje 0b18499
Update docs/articles/nunit/getting-started/upgrading.md
OsirisTerje 1d7674c
update
OsirisTerje b05ac79
Merge branch 'nunitupdate' of https://github.com/nunit/docs into nuni…
OsirisTerje 1042cf4
update
OsirisTerje 3d94e6c
Remove lint ignore
SeanKilleen 80ad1b3
Run re-wrap command to fix linting
SeanKilleen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
34 changes: 21 additions & 13 deletions
34 docs/articles/nunit/getting-started/dotnet-core-and-dotnet-standard.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,22 @@ | ||
| # .NET Core and .NET Standard | ||
| # .NET Core | ||
| More information and getting started tutorials are available for NUnit and .NET Core targeting | ||
| [C#](https://docs.microsoft.com/en-us/dotnet/core/testing/unit-testing-with-nunit), | ||
| [F#](https://docs.microsoft.com/en-us/dotnet/core/testing/unit-testing-fsharp-with-nunit) and [Visual | ||
| Basic](https://docs.microsoft.com/en-us/dotnet/core/testing/unit-testing-visual-basic-with-nunit) in the .NET Core | ||
| documentation's [Unit Testing in .NET Core and .NET Standard](https://docs.microsoft.com/en-us/dotnet/core/testing/) | ||
| documentation's [Unit Testing in .NET Core](https://docs.microsoft.com/en-us/dotnet/core/testing/) | ||
| page. | ||
| The other information on this page is older documentation. If you follow the instructions in the [Installation | ||
| section](xref:installation) your project will work with .NET Core and .NET Standard. | ||
| section](xref:installation) your project will work with .NET Core. | ||
| The test projects have to be .NET (Core) or .NET Framework; .NET Standard can't be used as a test project, since it | ||
| can't be run on its own, but any code in a .NET Standard library can be tested from a .NET (Core) or .NET Framework test | ||
| project. | ||
| ## TL;DR | ||
| Adding the adapter and `Microsoft.NET.Test.Sdk` version `17.0.0` or greater to your NUnit test projects will also enable | ||
| Adding the adapter and `Microsoft.NET.Test.Sdk` version `17.8.0` or greater to your NUnit test projects will also enable | ||
| the `dotnet test` command for .NET Core projects. | ||
| Any tests using the new style CSPROJ format, either .NET Core or .NET 4.x, need to add a `PackageReference` to the NuGet | ||
| @@ -27,10 +27,10 @@ the necessary references. | ||
| ```xml | ||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" /> | ||
| <PackageReference Include="NUnit" Version="3.13.3" /> | ||
| <PackageReference Include="NUnit3TestAdapter" Version="4.2.1" /> | ||
| <PackageReference Include="NUnit.Analyzers" Version="3.6.1" /> | ||
| <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> | ||
| <PackageReference Include="NUnit" Version="4.0.1" /> | ||
| <PackageReference Include="NUnit3TestAdapter" Version="4.5.0" /> | ||
| <PackageReference Include="NUnit.Analyzers" Version="3.10.0" /> | ||
| <PackageReference Include="coverlet.collector" Version="6.0.0" /> | ||
| </ItemGroup> | ||
| ``` | ||
| @@ -80,20 +80,28 @@ Framework. | ||
| This limitation is the same for all test adapters including xUnit and MSTest2. | ||
| #### My tests aren't showing up in Visual Studio 2017 or later | ||
| #### My tests aren't showing up in Visual Studio 2022 or later | ||
SeanKilleen marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| * Are you using the NuGet adapter package? | ||
| * Are you using version 4.1.0 or newer of the NuGet package? | ||
| * Are you using version 4.5.0 or newer of the NuGet package? | ||
| * Do your tests target .NET Core or the full .NET Framework? (see above) | ||
| * Have you added a Package Reference to `Microsoft.NET.Test.Sdk`? | ||
| * Have you restarted Visual Studio? It is still a bit temperamental. | ||
| * Are you doing integration testing with Asp.Net Core `WebApplicationFactory` and using minimal API, and it complains | ||
| about missing `testhost.deps.json`? Then you're accessing the wrong Program class in your WebApplicationFactory. Fix | ||
| it by adding a code line at the end of the `Program.cs` file, and verify that your WebApplicationFactory is actually | ||
| using this Program class: | ||
| ```csharp | ||
| public partial class Program { } | ||
| ``` | ||
| #### My tests multi-target .NET Core and .NET Framework, why can't I run both in Visual Studio | ||
| This is a limitation of Visual Studio, hopefully it will be fixed in a future release. | ||
| This was a limitation in earlier versions of Visual Studio, but is fixed in Visual Studio 2022. | ||
| Meanwhile, you can run specific tests using the `--framework` command line option of [dotnet | ||
| test](https://docs.microsoft.com/en-ca/dotnet/core/tools/dotnet-test?tabs=netcore2x) | ||
| _If_ you must run an earlier version and have this issue, you can run specific tests using the `--framework` command | ||
| line option of [dotnet test](https://docs.microsoft.com/en-ca/dotnet/core/tools/dotnet-test?tabs=netcore2x) | ||
| ## How do I produce a test results file | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 6 additions & 8 deletions
14 docs/articles/nunit/writing-tests/assertions/assertion-models/constraint.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2 docs/articles/nunit/writing-tests/assertions/multiple-asserts.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.