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/feature-guide.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -136,6 +136,16 @@ Therefore the following logic should apply anywhere NuGet needs to make a decisi
136
136
This means that `SdkAnalysisLevel` is used as intended for SDK style projects, but non-SDK style project always use the latest defaults.
137
137
All project types use the same configuration, so that customers can set a single property in a *Directory.Build.props* file, or environment variable.
138
138
139
+
##### SDKAnalysisLevel and restore
140
+
141
+
The SDKAnalysisLevel feature should be used with special care in features that ship simultaneously in .NET SDK and Visual Studio.
142
+
For example, when running a restore on an .NET SDK project in Visual Studio, the Visual Studio shipped code and targets will be used.
143
+
When running a restore on the same project with the .NET CLI, the .NET SDK code will be used.
144
+
145
+
Because of this, consider the [.NET SDK loading rules](https://learn.microsoft.com/en-us/dotnet/core/porting/versioning-sdk-msbuild-vs#targeting-and-support-rules).
146
+
While Visual Studio 18.0, shipped with .NET 10.0.100 SDK, the minimum version for that .NET SDK is 17.14.
147
+
What that means is that if a feature is available in the NuGet targets in 17.14, it will be enabled by default in 17.14, despite the fact that you may have only intended it to be enabled by default in .NET 10 only.
148
+
139
149
#### Restore considerations
140
150
141
151
* NuGet tool parity, ensure all products work as expected
@@ -150,6 +160,7 @@ All project types use the same configuration, so that customers can set a single
0 commit comments