You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/architecture/maui/unit-testing.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -62,14 +62,14 @@ Testing models and view models from MVVM applications is identical to testing an
62
62
63
63
Don't be tempted to make a unit test exercise more than one aspect of the unit's behavior. Doing so leads to tests that are difficult to read and update. It can also lead to confusion when interpreting a failure.
64
64
65
-
The eShop multi-platform app uses [MSTest](../../core/testing/unit-testing-with-mstest.md) to perform unit testing, which supports two different types of unit tests:
65
+
The eShop multi-platform app uses [MSTest](../../core/testing/unit-testing-csharp-with-mstest.md) to perform unit testing, which supports two different types of unit tests:
| TestMethod |`TestMethod`| Defines the actual test method to run. |
70
70
| DataSource |`DataSource`| Tests that are only true for a particular set of data. |
71
71
72
-
The unit tests included with the eShop multi-platform app are TestMethod, so each unit test method is decorated with the `TestMethod` attribute. In addition to MSTest there are several other testing frameworks available including [NUnit](../../core/testing/unit-testing-with-nunit.md) and [xUnit](../../core/testing/unit-testing-with-dotnet-test.md).
72
+
The unit tests included with the eShop multi-platform app are TestMethod, so each unit test method is decorated with the `TestMethod` attribute. In addition to MSTest there are several other testing frameworks available including [NUnit](../../core/testing/unit-testing-csharp-with-nunit.md) and [xUnit](../../core/testing/unit-testing-csharp-with-xunit.md).
# NU1510 is raised for direct references pruned by NuGet
10
+
11
+
Starting in .NET 10, NuGet raises a [`NU1510` warning](/nuget/reference/errors-and-warnings/nu1510) when a project includes a direct package reference that overlaps with a framework-provided library and is not required.
12
+
13
+
## Version introduced
14
+
15
+
.NET 10 Preview 1
16
+
17
+
## Previous behavior
18
+
19
+
Previously, the .NET SDK ignored the contents of a package if it overlapped with a framework-provided library. The package reference was allowed but had no effect on the build output.
20
+
21
+
## New behavior
22
+
23
+
NuGet now removes unnecessary package references entirely and raises a `NU1510` warning to notify you of the issue.
24
+
25
+
## Type of breaking change
26
+
27
+
This is a [source-incompatible change](../../categories.md#source-compatibility).
28
+
29
+
## Reason for change
30
+
31
+
This change reduces the maintenance burden on developers by eliminating unused package references. It prevents unnecessary updates, reduces download and restore times, and ensures cleaner build artifacts. The [`NU1510` warning](/nuget/reference/errors-and-warnings/nu1510) warning helps you identify and clean up these references proactively.
32
+
33
+
## Recommended action
34
+
35
+
If your project targets only frameworks where the package is pruned, remove the package reference entirely. For multi-targeting projects, conditionally include the package reference only for frameworks that require it. Use the following example as a guide:
36
+
37
+
```xml
38
+
<ItemGroup>
39
+
<!-- reference 8.0 System.Text.Json when targeting things older than .NET 8 -->
Copy file name to clipboardExpand all lines: docs/core/testing/snippets/unit-testing-using-mstest/csharp/README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Unit testing using MSTest sample
2
2
3
-
This sample is part of the [unit testing tutorial](https://learn.microsoft.com/dotnet/core/testing/unit-testing-with-mstest) for creating applications with unit tests included. See that topic for detailed steps on the code for this sample.
3
+
This sample is part of the [unit testing tutorial](https://learn.microsoft.com/dotnet/core/testing/unit-testing-csharp-with-mstest) for creating applications with unit tests included. See that topic for detailed steps on the code for this sample.
0 commit comments