diff --git a/eng/Packages.props b/eng/Packages.props
index d76eaf4c8665..58b3c3f3a5f2 100644
--- a/eng/Packages.props
+++ b/eng/Packages.props
@@ -4,9 +4,10 @@
-
-
+
+
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 20df0248d211..b0b39ec205c1 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -1,62 +1,62 @@
-
+
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
@@ -64,166 +64,166 @@
https://github.com/dotnet/core-setup
7d57652f33493fa022125b7f63aad0d70c52d810
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/nuget/nuget.client
- c21ba3b47e224cf84490bdc53b89e7f9ebcc1841
+ 795d8b1beea2359a394e30d21f5faddbd3788ac7
-
+
https://github.com/nuget/nuget.client
- c21ba3b47e224cf84490bdc53b89e7f9ebcc1841
+ 795d8b1beea2359a394e30d21f5faddbd3788ac7
-
+
https://github.com/nuget/nuget.client
- c21ba3b47e224cf84490bdc53b89e7f9ebcc1841
+ 795d8b1beea2359a394e30d21f5faddbd3788ac7
-
+
https://github.com/nuget/nuget.client
- c21ba3b47e224cf84490bdc53b89e7f9ebcc1841
+ 795d8b1beea2359a394e30d21f5faddbd3788ac7
-
+
https://github.com/nuget/nuget.client
- c21ba3b47e224cf84490bdc53b89e7f9ebcc1841
+ 795d8b1beea2359a394e30d21f5faddbd3788ac7
-
+
https://github.com/nuget/nuget.client
- c21ba3b47e224cf84490bdc53b89e7f9ebcc1841
+ 795d8b1beea2359a394e30d21f5faddbd3788ac7
-
+
https://github.com/nuget/nuget.client
- c21ba3b47e224cf84490bdc53b89e7f9ebcc1841
+ 795d8b1beea2359a394e30d21f5faddbd3788ac7
-
+
https://github.com/nuget/nuget.client
- c21ba3b47e224cf84490bdc53b89e7f9ebcc1841
+ 795d8b1beea2359a394e30d21f5faddbd3788ac7
-
+
https://github.com/nuget/nuget.client
- c21ba3b47e224cf84490bdc53b89e7f9ebcc1841
+ 795d8b1beea2359a394e30d21f5faddbd3788ac7
-
+
https://github.com/nuget/nuget.client
- c21ba3b47e224cf84490bdc53b89e7f9ebcc1841
+ 795d8b1beea2359a394e30d21f5faddbd3788ac7
-
+
https://github.com/nuget/nuget.client
- c21ba3b47e224cf84490bdc53b89e7f9ebcc1841
+ 795d8b1beea2359a394e30d21f5faddbd3788ac7
-
+
https://github.com/nuget/nuget.client
- c21ba3b47e224cf84490bdc53b89e7f9ebcc1841
+ 795d8b1beea2359a394e30d21f5faddbd3788ac7
-
+
https://github.com/nuget/nuget.client
- c21ba3b47e224cf84490bdc53b89e7f9ebcc1841
+ 795d8b1beea2359a394e30d21f5faddbd3788ac7
-
+
https://github.com/nuget/nuget.client
- c21ba3b47e224cf84490bdc53b89e7f9ebcc1841
+ 795d8b1beea2359a394e30d21f5faddbd3788ac7
-
+
https://github.com/nuget/nuget.client
- c21ba3b47e224cf84490bdc53b89e7f9ebcc1841
+ 795d8b1beea2359a394e30d21f5faddbd3788ac7
-
+
https://github.com/nuget/nuget.client
- c21ba3b47e224cf84490bdc53b89e7f9ebcc1841
+ 795d8b1beea2359a394e30d21f5faddbd3788ac7
-
+
https://github.com/nuget/nuget.client
- c21ba3b47e224cf84490bdc53b89e7f9ebcc1841
+ 795d8b1beea2359a394e30d21f5faddbd3788ac7
-
- https://github.com/microsoft/vstest
- ab6e14292ec4aac0c228a6c75e420f0a0461b0e1
+
+ https://github.com/dotnet/dotnet
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
- https://github.com/microsoft/vstest
- ab6e14292ec4aac0c228a6c75e420f0a0461b0e1
+
+ https://github.com/dotnet/dotnet
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
- https://github.com/microsoft/vstest
- ab6e14292ec4aac0c228a6c75e420f0a0461b0e1
+
+ https://github.com/dotnet/dotnet
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
- https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
-
-
- https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
-
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
https://github.com/dotnet/arcade-services
@@ -569,9 +561,9 @@
https://github.com/microsoft/testfx
62a0339db2a558ec8bb67f9f17fe6491ccd56c5b
-
+
https://github.com/dotnet/dotnet
- f451e5d3036a4f140a989e0a7f3f1ae432420e71
+ 699b0116eb3df66c4dd7698af4f1cd24ac4547a3
diff --git a/eng/Versions.props b/eng/Versions.props
index 49a94b1542ed..49b3f3f26bf9 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -54,7 +54,7 @@
https://dotnetclimsrc.blob.core.windows.net/dotnet/
- 3.2.0-preview.25359.101
+ 3.2.0-preview.25367.101
1.0.0-20230414.1
2.23.0
2.0.1-servicing-26011-01
@@ -63,7 +63,7 @@
4.8.6
1.2.0-beta.435
4.0.5
- 2.0.0-beta6.25359.101
+ 2.0.0-beta7.25367.101
2.0.0-beta5.25279.2
1.1.2-beta1.22216.1
10.3.0
@@ -81,11 +81,11 @@
- 2.0.0-preview.1.25359.101
+ 2.0.0-preview.1.25367.101
- 2.2.0-beta.25359.101
+ 2.2.0-beta.25367.101
@@ -97,40 +97,40 @@
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
8.0.0-rc.1.23414.4
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
2.1.0
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
8.0.0
@@ -146,28 +146,28 @@
- 7.0.0-preview.1.28
- 7.0.0-preview.1.28
- 7.0.0-preview.1.28
- 7.0.0-preview.1.28
- 7.0.0-preview.1.28
- 7.0.0-preview.1.28
- 7.0.0-preview.1.28
- 7.0.0-preview.1.28
- 7.0.0-preview.1.28
- 7.0.0-preview.1.28
- 7.0.0-preview.1.28
- 7.0.0-preview.1.28
+ 7.0.0-preview.1.46
+ 7.0.0-preview.1.46
+ 7.0.0-preview.1.46
+ 7.0.0-preview.1.46
+ 7.0.0-preview.1.46
+ 7.0.0-preview.1.46
+ 7.0.0-preview.1.46
+ 7.0.0-preview.1.46
+ 7.0.0-preview.1.46
+ 7.0.0-preview.1.46
+ 7.0.0-preview.1.46
+ 7.0.0-preview.1.46
- 18.0.0-preview-25366-05
- 18.0.0-preview-25366-05
- 18.0.0-preview-25366-05
+ 18.0.0-preview-25367-101
+ 18.0.0-preview-25367-101
+ 18.0.0-preview-25367-101
- 10.0.0-preview.25359.101
+ 10.0.0-preview.25367.101
@@ -188,82 +188,84 @@
At usage sites, either we use MicrosoftBuildMinimumVersion, or MicrosoftBuildVersion in source-only modes.
Additionally, set the MinimumVSVersion for the installer UI that's required for targeting NetCurrent -->
- 17.15.0-preview-25359-101
- 17.15.0-preview-25359-101
+ 17.15.0-preview-25367-101
+ 17.15.0-preview-25367-101
17.11.4
17.13
- 10.0.100-preview.7.25359.101
- 10.0.100-preview.7.25359.101
- 10.0.100-preview.7.25359.101
- 10.0.100-preview.7.25359.101
- 10.0.100-preview.7.25359.101
+ 10.0.100-preview.7.25367.101
+ 10.0.100-preview.7.25367.101
+ 10.0.100-preview.7.25367.101
+ 10.0.100-preview.7.25367.101
+ 10.0.100-preview.7.25367.101
- 10.0.100-preview.7.25359.101
- 10.0.100-preview.7.25359.101
- 10.0.100-preview.7.25359.101
- 10.0.100-preview.7.25359.101
+ 10.0.100-preview.7.25367.101
+ 10.0.100-preview.7.25367.101
+ 10.0.100-preview.7.25367.101
+ 10.0.100-preview.7.25367.101
- 14.0.100-preview7.25359.101
+ 14.0.100-preview7.25367.101
- 5.0.0-1.25359.101
- 5.0.0-1.25359.101
- 5.0.0-1.25359.101
- 5.0.0-1.25359.101
- 5.0.0-1.25359.101
- 5.0.0-1.25359.101
- 5.0.0-1.25359.101
- 5.0.0-1.25359.101
- 5.0.0-1.25359.101
- 5.0.0-1.25359.101
+ 5.0.0-2.25367.101
+ 5.0.0-2.25367.101
+ 5.0.0-2.25367.101
+ 5.0.0-2.25367.101
+ 5.0.0-2.25367.101
+ 5.0.0-2.25367.101
+ 5.0.0-2.25367.101
+ 5.0.0-2.25367.101
+ 5.0.0-2.25367.101
+ 5.0.0-2.25367.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.5.25265.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.5.25265.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
- 10.0.0-preview.25359.101
- 10.0.0-preview.25359.101
- 10.0.0-preview.25359.101
+ 10.0.0-preview.25367.101
+ 10.0.0-preview.25367.101
+ 10.0.0-preview.25367.101
- 10.0.0-preview.7.25359.101
- 10.0.0-preview.7.25359.101
+ 10.0.0-preview.7.25367.101
+ 10.0.0-preview.7.25367.101
3.1.56
3.1.56
@@ -271,6 +273,10 @@
3.1.12
2.0.23
+
+
+ 10.0.0-preview.7.25367.101
+
2.2.0-beta.19072.10
10.0.0-preview.24602.1
@@ -282,21 +288,21 @@
- 10.0.0-beta.25359.101
- 10.0.0-beta.25359.101
- 10.0.0-beta.25359.101
- 10.0.0-beta.25359.101
- 10.0.0-beta.25359.101
- 10.0.0-beta.25359.101
+ 10.0.0-beta.25367.101
+ 10.0.0-beta.25367.101
+ 10.0.0-beta.25367.101
+ 10.0.0-beta.25367.101
+ 10.0.0-beta.25367.101
+ 10.0.0-beta.25367.101
- 10.0.0-beta.25359.101
- 10.0.0-beta.25359.101
- 10.0.0-beta.25359.101
- 10.0.0-beta.25359.101
- 10.0.0-beta.25359.101
- 10.0.0-beta.25359.101
+ 10.0.0-beta.25367.101
+ 10.0.0-beta.25367.101
+ 10.0.0-beta.25367.101
+ 10.0.0-beta.25367.101
+ 10.0.0-beta.25367.101
+ 10.0.0-beta.25367.101
diff --git a/eng/dependabot/Packages.props b/eng/dependabot/Packages.props
index 01557464a3c4..76181ba6cfc0 100644
--- a/eng/dependabot/Packages.props
+++ b/eng/dependabot/Packages.props
@@ -4,9 +4,10 @@
-
-
+
+
+
diff --git a/global.json b/global.json
index 25e8fb7086a7..dd1d8aae7e5a 100644
--- a/global.json
+++ b/global.json
@@ -7,7 +7,7 @@
"errorMessage": "The .NET SDK is not installed or is not configured correctly. Please run ./build to install the correct SDK version locally."
},
"tools": {
- "dotnet": "10.0.100-preview.7.25322.101",
+ "dotnet": "10.0.100-preview.7.25367.101",
"runtimes": {
"dotnet": [
"$(MicrosoftNETCorePlatformsPackageVersion)"
@@ -21,8 +21,8 @@
}
},
"msbuild-sdks": {
- "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25359.101",
- "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25359.101",
+ "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25367.101",
+ "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25367.101",
"Microsoft.Build.NoTargets": "3.7.0",
"Microsoft.Build.Traversal": "3.4.0"
}
diff --git a/src/BuiltInTools/dotnet-format/Commands/FormatCommandCommon.cs b/src/BuiltInTools/dotnet-format/Commands/FormatCommandCommon.cs
index 7152fb346d8a..64548392e484 100644
--- a/src/BuiltInTools/dotnet-format/Commands/FormatCommandCommon.cs
+++ b/src/BuiltInTools/dotnet-format/Commands/FormatCommandCommon.cs
@@ -164,18 +164,18 @@ public static FormatOptions ParseVerbosityOption(this ParseResult parseResult, F
public static FormatOptions ParseCommonOptions(this ParseResult parseResult, FormatOptions formatOptions, ILogger logger)
{
- if (parseResult.GetResult(NoRestoreOption) is not null)
+ if (parseResult.GetValue(NoRestoreOption))
{
formatOptions = formatOptions with { NoRestore = true };
}
- if (parseResult.GetResult(VerifyNoChanges) is not null)
+ if (parseResult.GetValue(VerifyNoChanges))
{
formatOptions = formatOptions with { ChangesAreErrors = true };
formatOptions = formatOptions with { SaveFormattedFiles = false };
}
- if (parseResult.GetResult(IncludeGeneratedOption) is not null)
+ if (parseResult.GetValue(IncludeGeneratedOption))
{
formatOptions = formatOptions with { IncludeGeneratedFiles = true };
}
@@ -300,7 +300,7 @@ public static FormatOptions ParseWorkspaceOptions(this ParseResult parseResult,
if (parseResult.GetValue(SlnOrProjectArgument) is string { Length: > 0 } slnOrProject)
{
- if (parseResult.GetResult(FolderOption) is not null)
+ if (parseResult.GetValue(FolderOption))
{
formatOptions = formatOptions with { WorkspaceFilePath = slnOrProject };
formatOptions = formatOptions with { WorkspaceType = WorkspaceType.Folder };
diff --git a/src/BuiltInTools/dotnet-format/Commands/FormatWhitespaceCommand.cs b/src/BuiltInTools/dotnet-format/Commands/FormatWhitespaceCommand.cs
index b5179f379ef1..a8a15b6b140c 100644
--- a/src/BuiltInTools/dotnet-format/Commands/FormatWhitespaceCommand.cs
+++ b/src/BuiltInTools/dotnet-format/Commands/FormatWhitespaceCommand.cs
@@ -28,8 +28,8 @@ internal static Command GetCommand()
internal static void EnsureFolderNotSpecifiedWithNoRestore(CommandResult symbolResult)
{
var folder = symbolResult.GetValue(FolderOption);
- var noRestore = symbolResult.GetResult(NoRestoreOption);
- if (folder && noRestore != null)
+ var noRestore = symbolResult.GetValue(NoRestoreOption);
+ if (folder && noRestore)
{
symbolResult.AddError(Resources.Cannot_specify_the_folder_option_with_no_restore);
}
diff --git a/src/BuiltInTools/dotnet-format/Program.cs b/src/BuiltInTools/dotnet-format/Program.cs
index a6109488c6e4..fc893759206b 100644
--- a/src/BuiltInTools/dotnet-format/Program.cs
+++ b/src/BuiltInTools/dotnet-format/Program.cs
@@ -9,7 +9,7 @@ internal class Program
private static async Task Main(string[] args)
{
var rootCommand = RootFormatCommand.GetCommand();
- return await rootCommand.Parse(args).InvokeAsync(CancellationToken.None);
+ return await rootCommand.Parse(args).InvokeAsync(null, CancellationToken.None);
}
}
}
diff --git a/src/BuiltInTools/dotnet-watch/CommandLine/CommandLineOptions.cs b/src/BuiltInTools/dotnet-watch/CommandLine/CommandLineOptions.cs
index c1cd864aca4b..b8dc3a12003e 100644
--- a/src/BuiltInTools/dotnet-watch/CommandLine/CommandLineOptions.cs
+++ b/src/BuiltInTools/dotnet-watch/CommandLine/CommandLineOptions.cs
@@ -43,7 +43,7 @@ internal sealed class CommandLineOptions
verboseOption.Validators.Add(v =>
{
- if (v.GetResult(quietOption) is not null && v.GetResult(verboseOption) is not null)
+ if (v.GetValue(quietOption) && v.GetValue(verboseOption))
{
v.AddError(Resources.Error_QuietAndVerboseSpecified);
}
@@ -90,17 +90,14 @@ internal sealed class CommandLineOptions
var rootCommandInvoked = false;
rootCommand.SetAction(parseResult => rootCommandInvoked = true);
- var cliConfig = new CommandLineConfiguration(rootCommand)
+ ParserConfiguration parseConfig = new()
{
- Output = output,
- Error = output,
-
// To match dotnet command line parsing (see https://github.com/dotnet/sdk/blob/4712b35b94f2ad672e69ec35097cf86fc16c2e5e/src/Cli/dotnet/Parser.cs#L169):
EnablePosixBundling = false,
};
// parse without forwarded options first:
- var parseResult = rootCommand.Parse(args, cliConfig);
+ var parseResult = rootCommand.Parse(args, parseConfig);
if (ReportErrors(parseResult, reporter))
{
errorCode = 1;
@@ -118,7 +115,7 @@ internal sealed class CommandLineOptions
}
// reparse with forwarded options:
- parseResult = rootCommand.Parse(args, cliConfig);
+ parseResult = rootCommand.Parse(args, parseConfig);
if (ReportErrors(parseResult, reporter))
{
errorCode = 1;
@@ -126,7 +123,11 @@ internal sealed class CommandLineOptions
}
// invoke to execute default actions for displaying help
- errorCode = parseResult.Invoke();
+ errorCode = parseResult.Invoke(new()
+ {
+ Output = output,
+ Error = output
+ });
if (!rootCommandInvoked)
{
// help displayed:
@@ -192,9 +193,15 @@ private static IReadOnlyList GetCommandArguments(
continue;
}
+ // skip Option zero-arity options with an implicit optionresult - these weren't actually specified by the user:
+ if (optionResult.Option is Option boolOpt && boolOpt.Arity.Equals(ArgumentArity.Zero) && optionResult.Implicit)
+ {
+ continue;
+ }
+
// Some options _may_ be computed or have defaults, so not all may have an IdentifierToken.
- // For those that do not, use the Option's Name instead.
- var optionNameToForward = optionResult.IdentifierToken?.Value ?? optionResult.Option.Name;
+ // For those that do not, use the Option's Name instead.
+ var optionNameToForward = optionResult.IdentifierToken?.Value ?? optionResult.Option.Name;
if (optionResult.Tokens.Count == 0 && !optionResult.Implicit)
{
arguments.Add(optionNameToForward);
diff --git a/src/BuiltInTools/dotnet-watch/HotReload/IncrementalMSBuildWorkspace.cs b/src/BuiltInTools/dotnet-watch/HotReload/IncrementalMSBuildWorkspace.cs
index 936b2485455e..86c44aab759c 100644
--- a/src/BuiltInTools/dotnet-watch/HotReload/IncrementalMSBuildWorkspace.cs
+++ b/src/BuiltInTools/dotnet-watch/HotReload/IncrementalMSBuildWorkspace.cs
@@ -18,6 +18,7 @@ internal class IncrementalMSBuildWorkspace : Workspace
public IncrementalMSBuildWorkspace(IReporter reporter)
: base(MSBuildMefHostServices.DefaultServices, WorkspaceKind.MSBuild)
{
+#pragma warning disable CS0618 // https://github.com/dotnet/sdk/issues/49725
WorkspaceFailed += (_sender, diag) =>
{
// Report both Warning and Failure as warnings.
@@ -26,6 +27,7 @@ public IncrementalMSBuildWorkspace(IReporter reporter)
// https://github.com/dotnet/roslyn/issues/75170
reporter.Warn($"msbuild: {diag.Diagnostic}", "âš ");
};
+#pragma warning restore CS0618
_reporter = reporter;
}
diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/MSBuildArgs.cs b/src/Cli/Microsoft.DotNet.Cli.Utils/MSBuildArgs.cs
index 1f7ff9e3e856..db8febad9650 100644
--- a/src/Cli/Microsoft.DotNet.Cli.Utils/MSBuildArgs.cs
+++ b/src/Cli/Microsoft.DotNet.Cli.Utils/MSBuildArgs.cs
@@ -45,6 +45,14 @@ private MSBuildArgs(ReadOnlyDictionary? properties, ReadOnlyDict
///
public List OtherMSBuildArgs { get; }
+ ///
+ /// Ensures that when we do our MSBuild-property re-parses we parse in the same way as the dotnet CLI's parser.
+ ///
+ private static readonly ParserConfiguration _analysisParsingConfiguration = new()
+ {
+ EnablePosixBundling = false
+ };
+
///
/// Takes all of the unstructured properties and arguments that have been accrued from the command line
/// processing of the SDK and returns a structured set of MSBuild arguments grouped by purpose.
@@ -58,12 +66,8 @@ public static MSBuildArgs AnalyzeMSBuildArguments(IEnumerable forwardedA
{
fakeCommand.Options.Add(option);
}
-
- var propertyParsingConfiguration = new CommandLineConfiguration(fakeCommand)
- {
- EnablePosixBundling = false
- };
- var parseResult = propertyParsingConfiguration.Parse([..forwardedAndUserFacingArgs]);
+;
+ var parseResult = fakeCommand.Parse([.. forwardedAndUserFacingArgs], _analysisParsingConfiguration);
var globalProperties = parseResult.GetResult("--property") is OptionResult propResult ? propResult.GetValueOrDefault?>() : null;
var restoreProperties = parseResult.GetResult("--restoreProperty") is OptionResult restoreResult ? restoreResult.GetValueOrDefault?>() : null;
var requestedTargets = parseResult.GetResult("--target") is OptionResult targetResult ? targetResult.GetValueOrDefault() : null;
diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj b/src/Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj
index 115f5dd125ec..97bfea50c794 100644
--- a/src/Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj
+++ b/src/Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj
@@ -32,7 +32,7 @@
for Mac and other VS scenarios. During source-build, we only have access to
the latest version, which targets NetCurrent. -->
- $(PkgMicrosoft_Build_Runtime)\contentFiles\any\net9.0\MSBuild.dll
+ $(PkgMicrosoft_Build_Runtime)\contentFiles\any\net10.0\MSBuild.dll
$(PkgMicrosoft_Build_Runtime)\contentFiles\any\$(NetCurrent)\MSBuild.dll
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/ParserFactory.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/ParserFactory.cs
index bf19f440af4d..60f04af43e02 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/ParserFactory.cs
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/ParserFactory.cs
@@ -8,35 +8,22 @@ namespace Microsoft.TemplateEngine.Cli.Commands
{
internal static class ParserFactory
{
- internal static CommandLineConfiguration CreateParser(Command command, bool disableHelp = false)
+ internal static readonly ParserConfiguration ParserConfiguration = new()
{
- CommandLineConfiguration config = new(command)
- //TODO: decide if it's needed to implement it; and implement if needed
- //.UseParseDirective()
- //.UseSuggestDirective()
- {
- EnablePosixBundling = false
- };
-
- for (int i = 0; i < command.Options.Count; i++)
- {
- if (command.Options[i] is HelpOption)
- {
- if (disableHelp)
- {
- command.Options.RemoveAt(i);
- }
+ EnablePosixBundling = false,
+ };
- return config;
- }
- }
+ internal static Command CreateParser(Command command, bool disableHelp = false)
+ {
+ // {
+ // EnablePosixBundling = false
+ // };
if (!disableHelp)
{
command.Options.Add(new HelpOption());
}
-
- return config;
+ return command;
}
}
}
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.TabCompletion.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.TabCompletion.cs
index 8056bb028fd3..ca0f5c881cf9 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.TabCompletion.cs
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.TabCompletion.cs
@@ -60,11 +60,11 @@ internal static IEnumerable GetTemplateCompletions(
templateGroup,
template);
- CommandLineConfiguration parser = ParserFactory.CreateParser(command);
+ System.CommandLine.Command parser = ParserFactory.CreateParser(command);
//it is important to pass raw text to get the completion
//completions for args passed as array are not supported
- ParseResult parseResult = parser.Parse(context.CommandLineText);
+ ParseResult parseResult = parser.Parse(context.CommandLineText, ParserFactory.ParserConfiguration);
foreach (CompletionItem completion in parseResult.GetCompletions(context.CursorPosition))
{
////TODO: conditionals tab completion here
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.cs
index c8af9158f0ef..7889716ea67b 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.cs
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.cs
@@ -435,8 +435,8 @@ private static (TemplateCommand? Command, ParseResult? ParseResult)? ReparseForT
template,
validateDefaultLanguage);
- CommandLineConfiguration parser = ParserFactory.CreateParser(command);
- ParseResult parseResult = parser.Parse(args.RemainingArguments ?? Array.Empty());
+ System.CommandLine.Command parser = ParserFactory.CreateParser(command);
+ ParseResult parseResult = parser.Parse(args.RemainingArguments ?? Array.Empty(), ParserFactory.ParserConfiguration);
return (command, parseResult);
}
catch (InvalidTemplateParametersException e)
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Help/DotnetHelpAction.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Help/DotnetHelpAction.cs
index f4c5b2664fff..b12a85faeaa5 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/Help/DotnetHelpAction.cs
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/Help/DotnetHelpAction.cs
@@ -25,7 +25,7 @@ public HelpBuilder Builder
///
public override int Invoke(ParseResult parseResult)
{
- var output = parseResult.Configuration.Output;
+ var output = parseResult.InvocationConfiguration.Output;
var helpContext = new HelpContext(
Builder,
diff --git a/src/Cli/dotnet/Commands/Build/BuildCommand.cs b/src/Cli/dotnet/Commands/Build/BuildCommand.cs
index fb17a4db1b61..871ead794e84 100644
--- a/src/Cli/dotnet/Commands/Build/BuildCommand.cs
+++ b/src/Cli/dotnet/Commands/Build/BuildCommand.cs
@@ -1,4 +1,4 @@
-// Licensed to the .NET Foundation under one or more agreements.
+// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.CommandLine;
@@ -12,8 +12,7 @@ public static class BuildCommand
{
public static CommandBase FromArgs(string[] args, string? msbuildPath = null)
{
- var parser = Parser.Instance;
- var parseResult = parser.ParseFrom("dotnet build", args);
+ var parseResult = Parser.Parse(["dotnet", "build", ..args]);
return FromParseResult(parseResult, msbuildPath);
}
@@ -22,10 +21,10 @@ public static CommandBase FromParseResult(ParseResult parseResult, string? msbui
parseResult.ShowHelpOrErrorIfAppropriate();
CommonOptions.ValidateSelfContainedOptions(
- parseResult.GetResult(BuildCommandParser.SelfContainedOption) is not null,
- parseResult.GetResult(BuildCommandParser.NoSelfContainedOption) is not null);
+ parseResult.HasOption(BuildCommandParser.SelfContainedOption),
+ parseResult.HasOption(BuildCommandParser.NoSelfContainedOption));
- bool noRestore = parseResult.GetResult(BuildCommandParser.NoRestoreOption) is not null;
+ bool noRestore = parseResult.HasOption(BuildCommandParser.NoRestoreOption);
return CommandFactory.CreateVirtualOrPhysicalCommand(
BuildCommandParser.GetCommand(),
diff --git a/src/Cli/dotnet/Commands/Clean/CleanCommand.cs b/src/Cli/dotnet/Commands/Clean/CleanCommand.cs
index ef6f964a8cb4..1290b8b68cfd 100644
--- a/src/Cli/dotnet/Commands/Clean/CleanCommand.cs
+++ b/src/Cli/dotnet/Commands/Clean/CleanCommand.cs
@@ -13,8 +13,7 @@ public class CleanCommand(MSBuildArgs msbuildArgs, string? msbuildPath = null) :
{
public static CommandBase FromArgs(string[] args, string? msbuildPath = null)
{
- var parser = Parser.Instance;
- var result = parser.ParseFrom("dotnet clean", args);
+ var result = Parser.Parse(["dotnet", "clean", ..args]);
return FromParseResult(result, msbuildPath);
}
diff --git a/src/Cli/dotnet/Commands/Format/FormatCommand.cs b/src/Cli/dotnet/Commands/Format/FormatCommand.cs
index dc50385c6a17..9ee9296172fa 100644
--- a/src/Cli/dotnet/Commands/Format/FormatCommand.cs
+++ b/src/Cli/dotnet/Commands/Format/FormatCommand.cs
@@ -13,8 +13,7 @@ public class FormatCommand(IEnumerable argsToForward) : FormatForwarding
{
public static FormatCommand FromArgs(string[] args)
{
- var parser = Parser.Instance;
- var result = parser.ParseFrom("dotnet format", args);
+ var result = Parser.Parse(["dotnet", "format", ..args]);
return FromParseResult(result);
}
diff --git a/src/Cli/dotnet/Commands/Help/HelpCommand.cs b/src/Cli/dotnet/Commands/Help/HelpCommand.cs
index 48a67237282a..416516aa9d9e 100644
--- a/src/Cli/dotnet/Commands/Help/HelpCommand.cs
+++ b/src/Cli/dotnet/Commands/Help/HelpCommand.cs
@@ -105,7 +105,7 @@ public int Execute()
private static bool TryGetDocsLink(string[] command, out string docsLink)
{
- var parsedCommand = Parser.Instance.Parse(["dotnet", .. command]);
+ var parsedCommand = Parser.Parse(["dotnet", .. command]);
if (parsedCommand?.CommandResult?.Command is ICommandDocument dc)
{
docsLink = dc.DocsLink;
diff --git a/src/Cli/dotnet/Commands/Hidden/Complete/CompleteCommand.cs b/src/Cli/dotnet/Commands/Hidden/Complete/CompleteCommand.cs
index 1e3755207963..5cdf66cfca6e 100644
--- a/src/Cli/dotnet/Commands/Hidden/Complete/CompleteCommand.cs
+++ b/src/Cli/dotnet/Commands/Hidden/Complete/CompleteCommand.cs
@@ -19,8 +19,7 @@ public static int Run(ParseResult parseResult)
public static int RunWithReporter(string[] args, IReporter reporter)
{
- var parser = Parser.Instance;
- var result = parser.ParseFrom("dotnet complete", args);
+ var result = Parser.Parse(["dotnet", "complete", ..args]);
return RunWithReporter(result, reporter);
}
@@ -61,7 +60,7 @@ private static CompletionItem[] Completions(ParseResult complete)
input += " ";
}
- var result = Parser.Instance.Parse(input);
+ var result = Parser.Parse(input);
return [.. result.GetCompletions(position).Distinct()];
}
diff --git a/src/Cli/dotnet/Commands/Hidden/InternalReportInstallSuccess/InternalReportInstallSuccessCommand.cs b/src/Cli/dotnet/Commands/Hidden/InternalReportInstallSuccess/InternalReportInstallSuccessCommand.cs
index f7465642ef34..744289023948 100644
--- a/src/Cli/dotnet/Commands/Hidden/InternalReportInstallSuccess/InternalReportInstallSuccessCommand.cs
+++ b/src/Cli/dotnet/Commands/Hidden/InternalReportInstallSuccess/InternalReportInstallSuccessCommand.cs
@@ -25,8 +25,7 @@ public static int Run(ParseResult parseResult)
public static void ProcessInputAndSendTelemetry(string[] args, ITelemetry telemetry)
{
- var parser = Parser.Instance;
- var result = parser.ParseFrom("dotnet internal-reportinstallsuccess", args);
+ var result = Parser.Parse(["dotnet", "internal-reportinstallsuccess", ..args]);
ProcessInputAndSendTelemetry(result, telemetry);
}
diff --git a/src/Cli/dotnet/Commands/Hidden/Parse/ParseCommand.cs b/src/Cli/dotnet/Commands/Hidden/Parse/ParseCommand.cs
index 79bf95ecdebd..262944805cdd 100644
--- a/src/Cli/dotnet/Commands/Hidden/Parse/ParseCommand.cs
+++ b/src/Cli/dotnet/Commands/Hidden/Parse/ParseCommand.cs
@@ -15,7 +15,7 @@ public static int Run(ParseResult result)
result.HandleDebugSwitch();
var tokens = result.Tokens.Skip(1).Select(t => t.Value).ToArray();
- var reparsed = Parser.Instance.Parse(tokens);
+ var reparsed = Parser.Parse(tokens);
Console.WriteLine(reparsed.ToString());
diff --git a/src/Cli/dotnet/Commands/MSBuild/MSBuildCommand.cs b/src/Cli/dotnet/Commands/MSBuild/MSBuildCommand.cs
index b9c7a3153c44..cf0b7e06c660 100644
--- a/src/Cli/dotnet/Commands/MSBuild/MSBuildCommand.cs
+++ b/src/Cli/dotnet/Commands/MSBuild/MSBuildCommand.cs
@@ -14,8 +14,7 @@ public class MSBuildCommand(
{
public static MSBuildCommand FromArgs(string[] args, string? msbuildPath = null)
{
- var parser = Parser.Instance;
- var result = parser.ParseFrom("dotnet msbuild", args);
+ var result = Parser.Parse(["dotnet", "msbuild", ..args]);
return FromParseResult(result, msbuildPath);
}
diff --git a/src/Cli/dotnet/Commands/Pack/PackCommand.cs b/src/Cli/dotnet/Commands/Pack/PackCommand.cs
index 8e1b4aa8b81d..1c3e41c13dd0 100644
--- a/src/Cli/dotnet/Commands/Pack/PackCommand.cs
+++ b/src/Cli/dotnet/Commands/Pack/PackCommand.cs
@@ -16,8 +16,7 @@ public class PackCommand(
{
public static PackCommand FromArgs(string[] args, string? msbuildPath = null)
{
- var parser = Parser.Instance;
- var parseResult = parser.ParseFrom("dotnet pack", args);
+ var parseResult = Parser.Parse(["dotnet", "pack", ..args]);
return FromParseResult(parseResult, msbuildPath);
}
diff --git a/src/Cli/dotnet/Commands/Package/Add/PackageAddCommand.cs b/src/Cli/dotnet/Commands/Package/Add/PackageAddCommand.cs
index 080fa97a52e6..00eb0b72583a 100644
--- a/src/Cli/dotnet/Commands/Package/Add/PackageAddCommand.cs
+++ b/src/Cli/dotnet/Commands/Package/Add/PackageAddCommand.cs
@@ -34,7 +34,7 @@ public override int Execute()
var tempDgFilePath = string.Empty;
- if (_parseResult.GetResult(PackageAddCommandParser.NoRestoreOption) is null)
+ if (!_parseResult.GetValue(PackageAddCommandParser.NoRestoreOption))
{
try
@@ -121,7 +121,7 @@ private string[] TransformArgs(PackageIdentityWithRange packageId, string tempDg
.OptionValuesToBeForwarded()
.SelectMany(a => a.Split(' ', 2)));
- if (_parseResult.GetResult(PackageAddCommandParser.NoRestoreOption) is not null)
+ if (_parseResult.GetValue(PackageAddCommandParser.NoRestoreOption))
{
args.Add("--no-restore");
}
diff --git a/src/Cli/dotnet/Commands/Publish/PublishCommand.cs b/src/Cli/dotnet/Commands/Publish/PublishCommand.cs
index eab6dee108b3..08e23bfe9eca 100644
--- a/src/Cli/dotnet/Commands/Publish/PublishCommand.cs
+++ b/src/Cli/dotnet/Commands/Publish/PublishCommand.cs
@@ -21,8 +21,7 @@ private PublishCommand(
public static CommandBase FromArgs(string[] args, string? msbuildPath = null)
{
- var parser = Parser.Instance;
- var parseResult = parser.ParseFrom("dotnet publish", args);
+ var parseResult = Parser.Parse(["dotnet", "publish", ..args]);
return FromParseResult(parseResult);
}
diff --git a/src/Cli/dotnet/Commands/Restore/RestoreCommand.cs b/src/Cli/dotnet/Commands/Restore/RestoreCommand.cs
index ee8c6f32d5d4..6eb650b0e261 100644
--- a/src/Cli/dotnet/Commands/Restore/RestoreCommand.cs
+++ b/src/Cli/dotnet/Commands/Restore/RestoreCommand.cs
@@ -13,8 +13,7 @@ public static class RestoreCommand
{
public static CommandBase FromArgs(string[] args, string? msbuildPath = null)
{
- var parser = Parser.Instance;
- var result = parser.ParseFrom("dotnet restore", args);
+ var result = Parser.Parse(["dotnet", "restore", ..args]);
return FromParseResult(result, msbuildPath);
}
diff --git a/src/Cli/dotnet/Commands/Run/RunCommand.cs b/src/Cli/dotnet/Commands/Run/RunCommand.cs
index 68e4c399774b..e01f2a862c67 100644
--- a/src/Cli/dotnet/Commands/Run/RunCommand.cs
+++ b/src/Cli/dotnet/Commands/Run/RunCommand.cs
@@ -516,7 +516,7 @@ private static void ThrowUnableToRunError(ProjectInstance project)
public static RunCommand FromArgs(string[] args)
{
- var parseResult = Parser.Instance.ParseFrom("dotnet run", args);
+ var parseResult = Parser.Parse(["dotnet", "run", ..args]);
return FromParseResult(parseResult);
}
@@ -654,7 +654,7 @@ public static ParseResult ModifyParseResultForShorthandProjectOption(ParseResult
tokensMinusProject.Add(possibleProject);
var tokensToParse = tokensMinusProject.ToArray();
- var newParseResult = Parser.Instance.Parse(tokensToParse);
+ var newParseResult = Parser.Parse(tokensToParse);
return newParseResult;
}
}
diff --git a/src/Cli/dotnet/Commands/Store/StoreCommand.cs b/src/Cli/dotnet/Commands/Store/StoreCommand.cs
index 3842e23a0330..0c7846c513e2 100644
--- a/src/Cli/dotnet/Commands/Store/StoreCommand.cs
+++ b/src/Cli/dotnet/Commands/Store/StoreCommand.cs
@@ -19,8 +19,7 @@ private StoreCommand(IEnumerable msbuildArgs, string msbuildPath = null)
public static StoreCommand FromArgs(string[] args, string msbuildPath = null)
{
- var parser = Parser.Instance;
- var result = parser.ParseFrom("dotnet store", args);
+ var result = Parser.Parse(["dotnet", "store", ..args]);
return FromParseResult(result, msbuildPath);
}
diff --git a/src/Cli/dotnet/Commands/Test/TestCommand.cs b/src/Cli/dotnet/Commands/Test/TestCommand.cs
index 5d603c75181a..7e180d7ce63b 100644
--- a/src/Cli/dotnet/Commands/Test/TestCommand.cs
+++ b/src/Cli/dotnet/Commands/Test/TestCommand.cs
@@ -154,8 +154,7 @@ private static int ForwardToVSTestConsole(ParseResult parseResult, string[] args
public static TestCommand FromArgs(string[] args, string? testSessionCorrelationId = null, string? msbuildPath = null)
{
- var parser = Parser.Instance;
- var parseResult = parser.ParseFrom("dotnet test", args);
+ var parseResult = Parser.Parse(["dotnet", "test", ..args]);
// settings parameters are after -- (including --), these should not be considered by the parser
string[] settings = [.. args.SkipWhile(a => a != "--")];
@@ -218,7 +217,7 @@ private static TestCommand FromParseResult(ParseResult result, string[] settings
msbuildArgs.Add($"-property:VSTestSessionCorrelationId={testSessionCorrelationId}");
}
- bool noRestore = (result.GetResult(TestCommandParser.NoRestoreOption) ?? result.GetResult(TestCommandParser.NoBuildOption)) is not null;
+ bool noRestore = result.GetValue(TestCommandParser.NoRestoreOption) || result.GetValue(TestCommandParser.NoBuildOption);
var parsedMSBuildArgs = MSBuildArgs.AnalyzeMSBuildArguments(
msbuildArgs,
diff --git a/src/Cli/dotnet/Commands/Test/TestCommandParser.cs b/src/Cli/dotnet/Commands/Test/TestCommandParser.cs
index 9cf9b5e7bafe..cf9539c1439c 100644
--- a/src/Cli/dotnet/Commands/Test/TestCommandParser.cs
+++ b/src/Cli/dotnet/Commands/Test/TestCommandParser.cs
@@ -86,13 +86,13 @@ internal static class TestCommandParser
{
Description = CliCommandStrings.CmdBlameDescription,
Arity = ArgumentArity.Zero
- }.ForwardAs("-property:VSTestBlame=true");
+ }.ForwardIfEnabled("-property:VSTestBlame=true");
public static readonly Option BlameCrashOption = new ForwardedOption("--blame-crash")
{
Description = CliCommandStrings.CmdBlameCrashDescription,
Arity = ArgumentArity.Zero
- }.ForwardAs("-property:VSTestBlameCrash=true");
+ }.ForwardIfEnabled("-property:VSTestBlameCrash=true");
public static readonly Option BlameCrashDumpOption = CreateBlameCrashDumpOption();
@@ -112,7 +112,7 @@ private static Option CreateBlameCrashDumpOption()
{
Description = CliCommandStrings.CmdBlameCrashCollectAlwaysDescription,
Arity = ArgumentArity.Zero
- }.ForwardAsMany(o => ["-property:VSTestBlameCrash=true", "-property:VSTestBlameCrashCollectAlways=true"]);
+ }.ForwardIfEnabled(["-property:VSTestBlameCrash=true", "-property:VSTestBlameCrashCollectAlways=true"]);
public static readonly Option BlameHangOption = new ForwardedOption("--blame-hang")
{
@@ -144,7 +144,7 @@ private static Option CreateBlameHangDumpOption()
{
Description = CliCommandStrings.TestCmdNoLogo,
Arity = ArgumentArity.Zero
- }.ForwardAs("-property:VSTestNoLogo=true");
+ }.ForwardIfEnabled("-property:VSTestNoLogo=true");
public static readonly Option NoRestoreOption = CommonOptions.NoRestoreOption;
diff --git a/src/Cli/dotnet/Commands/Tool/Common/ToolAppliedOption.cs b/src/Cli/dotnet/Commands/Tool/Common/ToolAppliedOption.cs
index dfff85eee14b..8972da740eff 100644
--- a/src/Cli/dotnet/Commands/Tool/Common/ToolAppliedOption.cs
+++ b/src/Cli/dotnet/Commands/Tool/Common/ToolAppliedOption.cs
@@ -5,6 +5,7 @@
using System.CommandLine;
using Microsoft.DotNet.Cli.Commands.Tool.Install;
+using Microsoft.DotNet.Cli.Extensions;
using Microsoft.DotNet.Cli.Utils;
namespace Microsoft.DotNet.Cli.Commands.Tool.Common;
@@ -56,17 +57,17 @@ internal static void EnsureNoConflictGlobalLocalToolPathOption(
string message)
{
List options = [];
- if (parseResult.GetResult(GlobalOptionName) is not null)
+ if (parseResult.HasOption(GlobalOptionName))
{
options.Add(GlobalOptionName);
}
- if (parseResult.GetResult(LocalOptionName) is not null)
+ if (parseResult.HasOption(LocalOptionName))
{
options.Add(LocalOptionName);
}
- if (parseResult.GetResult(ToolPathName) is not null)
+ if (parseResult.HasOption(ToolPathName))
{
options.Add(ToolPathName);
}
@@ -85,12 +86,12 @@ internal static void EnsureNoConflictUpdateAllVersionOption(
string message)
{
List options = [];
- if (parseResult.GetResult(UpdateAllOption) is not null)
+ if (parseResult.HasOption(UpdateAllOption))
{
options.Add(UpdateAllOption.Name);
}
- if (parseResult.GetResult(VersionOption) is not null)
+ if (parseResult.HasOption(VersionOption))
{
options.Add(VersionOption.Name);
}
@@ -107,7 +108,7 @@ internal static void EnsureNoConflictUpdateAllVersionOption(
internal static void EnsureToolManifestAndOnlyLocalFlagCombination(ParseResult parseResult)
{
if (GlobalOrToolPath(parseResult) &&
- parseResult.GetResult(ToolManifestName) is not null)
+ parseResult.HasOption(ToolManifestName))
{
throw new GracefulException(
string.Format(
@@ -116,6 +117,6 @@ internal static void EnsureToolManifestAndOnlyLocalFlagCombination(ParseResult p
}
private static bool GlobalOrToolPath(ParseResult parseResult)
- => parseResult.GetResult(GlobalOptionName) is not null
- || parseResult.GetResult(ToolPathName) is not null;
+ => parseResult.HasOption(GlobalOptionName)
+ || parseResult.HasOption(ToolPathName);
}
diff --git a/src/Cli/dotnet/Commands/Tool/Update/ToolUpdateCommand.cs b/src/Cli/dotnet/Commands/Tool/Update/ToolUpdateCommand.cs
index fa56775604ad..7eff66e84cb7 100644
--- a/src/Cli/dotnet/Commands/Tool/Update/ToolUpdateCommand.cs
+++ b/src/Cli/dotnet/Commands/Tool/Update/ToolUpdateCommand.cs
@@ -6,6 +6,7 @@
using System.CommandLine;
using Microsoft.DotNet.Cli.Commands.Tool.Common;
using Microsoft.DotNet.Cli.Commands.Tool.Install;
+using Microsoft.DotNet.Cli.Extensions;
using Microsoft.DotNet.Cli.ToolManifest;
using Microsoft.DotNet.Cli.ToolPackage;
using Microsoft.DotNet.Cli.Utils;
@@ -64,7 +65,7 @@ internal static void EnsureEitherUpdateAllOrUpdateOption(
string message)
{
List options = [];
- if (parseResult.GetResult(ToolAppliedOption.UpdateAllOption) is not null)
+ if (parseResult.HasOption(ToolAppliedOption.UpdateAllOption))
{
options.Add(ToolAppliedOption.UpdateAllOption.Name);
}
diff --git a/src/Cli/dotnet/Commands/Workload/WorkloadCommandParser.cs b/src/Cli/dotnet/Commands/Workload/WorkloadCommandParser.cs
index 9188e4589aba..51603be141dd 100644
--- a/src/Cli/dotnet/Commands/Workload/WorkloadCommandParser.cs
+++ b/src/Cli/dotnet/Commands/Workload/WorkloadCommandParser.cs
@@ -159,7 +159,7 @@ private static Command ConstructCommand()
command.Validators.Add(commandResult =>
{
- if (commandResult.GetResult(InfoOption) is null && commandResult.GetResult(VersionOption) is null && !commandResult.Children.Any(child => child is System.CommandLine.Parsing.CommandResult))
+ if (commandResult.HasOption(InfoOption) && commandResult.HasOption(VersionOption) && !commandResult.Children.Any(child => child is System.CommandLine.Parsing.CommandResult))
{
commandResult.AddError(CliStrings.RequiredCommandNotPassed);
}
diff --git a/src/Cli/dotnet/CommonOptions.cs b/src/Cli/dotnet/CommonOptions.cs
index 2ba66beb48c4..aff691d5f250 100644
--- a/src/Cli/dotnet/CommonOptions.cs
+++ b/src/Cli/dotnet/CommonOptions.cs
@@ -273,7 +273,7 @@ public static ForwardedOption InteractiveOption(bool acceptArgument = fals
Description = CliStrings.DisableBuildServersOptionDescription,
Arity = ArgumentArity.Zero
}
- .ForwardAsMany(_ => ["--property:UseRazorBuildServer=false", "--property:UseSharedCompilation=false", "/nodeReuse:false"]);
+ .ForwardIfEnabled(["--property:UseRazorBuildServer=false", "--property:UseSharedCompilation=false", "/nodeReuse:false"]);
public static Option ArchitectureOption =
new ForwardedOption("--arch", "-a")
@@ -311,7 +311,7 @@ public static ForwardedOption InteractiveOption(bool acceptArgument = fals
{
Description = CliStrings.SelfContainedOptionDescription
}
- .SetForwardingFunction(ForwardSelfContainedOptions);
+ .ForwardIfEnabled([$"--property:SelfContained=true", "--property:_CommandLineDefinedSelfContained=true"]);
public static Option NoSelfContainedOption =
new ForwardedOption("--no-self-contained")
@@ -319,7 +319,7 @@ public static ForwardedOption InteractiveOption(bool acceptArgument = fals
Description = CliStrings.FrameworkDependentOptionDescription,
Arity = ArgumentArity.Zero
}
- .SetForwardingFunction((_, p) => ForwardSelfContainedOptions(false, p));
+ .ForwardIfEnabled([$"--property:SelfContained=false", "--property:_CommandLineDefinedSelfContained=true"]);
public static readonly Option> EnvOption = new("--environment", "-e")
{
@@ -446,12 +446,6 @@ public static string GetCurrentRuntimeId()
private static string GetArchFromRid(string rid) => rid.Substring(rid.LastIndexOf("-", StringComparison.InvariantCulture) + 1, rid.Length - rid.LastIndexOf("-", StringComparison.InvariantCulture) - 1);
- private static IEnumerable ForwardSelfContainedOptions(bool isSelfContained, ParseResult parseResult)
- {
- IEnumerable selfContainedProperties = [$"--property:SelfContained={isSelfContained}", "--property:_CommandLineDefinedSelfContained=true"];
- return selfContainedProperties;
- }
-
internal static Option AddCompletions(this Option option, Func> completionSource)
{
option.CompletionSources.Add(completionSource);
diff --git a/src/Cli/dotnet/DotNetCommandFactory.cs b/src/Cli/dotnet/DotNetCommandFactory.cs
index 54ea99bac5e1..ea5eb912e8f6 100644
--- a/src/Cli/dotnet/DotNetCommandFactory.cs
+++ b/src/Cli/dotnet/DotNetCommandFactory.cs
@@ -38,7 +38,7 @@ private static bool TryGetBuiltInCommand(string commandName, out Func action.InvokeAsync(Parser.Instance.Parse(args)).Result;
+ commandFunc = (args) => Parser.Invoke([commandName, ..args]);
return true;
}
commandFunc = null;
diff --git a/src/Cli/dotnet/Extensions/OptionForwardingExtensions.cs b/src/Cli/dotnet/Extensions/OptionForwardingExtensions.cs
index b8078b6515c6..72d0424c65de 100644
--- a/src/Cli/dotnet/Extensions/OptionForwardingExtensions.cs
+++ b/src/Cli/dotnet/Extensions/OptionForwardingExtensions.cs
@@ -13,11 +13,36 @@ public static class OptionForwardingExtensions
{
public static ForwardedOption Forward(this ForwardedOption option) => option.SetForwardingFunction((T? o) => [option.Name]);
+ ///
+ /// Forward the boolean option as a string value. This value will be forwarded as long as the option has a OptionResult - which means that
+ /// any implicit value calculation will cause the string value to be forwarded. For boolean options specifically, if the option is zero arity
+ /// and has no default value factory, S.CL will synthesize a true or false value based on whether the option was provided or not, so we need to
+ /// add an additional implicit 'value is true' check to prevent accidentally forwarding the option for flags that are absent..
+ ///
+ public static ForwardedOption ForwardAs(this ForwardedOption option, string value) => option.ForwardIfEnabled(value);
+
+ ///
+ /// Forward the option as a string value. This value will be forwarded as long as the option has a OptionResult - which means that
+ /// any implicit value calculation will cause the string value to be forwarded.
+ ///
public static ForwardedOption ForwardAs(this ForwardedOption option, string value) => option.SetForwardingFunction((T? o) => [value]);
public static ForwardedOption ForwardAsSingle(this ForwardedOption option, Func format) => option.SetForwardingFunction(format);
- public static ForwardedOption ForwardIfEnabled(this ForwardedOption option, string value) => option.SetForwardingFunction((bool o) => o == true ? [value] : []);
+ ///
+ /// Forward the boolean option as a string value. This value will be forwarded as long as the option has a OptionResult - which means that
+ /// any implicit value calculation will cause the string value to be forwarded. For boolean options specifically, if the option is zero arity
+ /// and has no default value factory, S.CL will synthesize a true or false value based on whether the option was provided or not, so we need to
+ /// add an additional implicit 'value is true' check to prevent accidentally forwarding the option for flags that are absent..
+ ///
+ public static ForwardedOption ForwardIfEnabled(this ForwardedOption option, string value) => option.SetForwardingFunction((bool o) => o ? [value] : []);
+ ///
+ /// Forward the boolean option as a string value. This value will be forwarded as long as the option has a OptionResult - which means that
+ /// any implicit value calculation will cause the string value to be forwarded. For boolean options specifically, if the option is zero arity
+ /// and has no default value factory, S.CL will synthesize a true or false value based on whether the option was provided or not, so we need to
+ /// add an additional implicit 'value is true' check to prevent accidentally forwarding the option for flags that are absent..
+ ///
+ public static ForwardedOption ForwardIfEnabled(this ForwardedOption option, string[] value) => option.SetForwardingFunction((bool o) => o ? value : []);
///
/// Set up an option to be forwarded as an output path to MSBuild
diff --git a/src/Cli/dotnet/Extensions/ParseResultExtensions.cs b/src/Cli/dotnet/Extensions/ParseResultExtensions.cs
index 781140230adb..17d74908d42e 100644
--- a/src/Cli/dotnet/Extensions/ParseResultExtensions.cs
+++ b/src/Cli/dotnet/Extensions/ParseResultExtensions.cs
@@ -5,10 +5,10 @@
using System.CommandLine.Parsing;
using System.Diagnostics;
using System.Text.RegularExpressions;
+using Microsoft.DotNet.Cli;
using Microsoft.DotNet.Cli.Commands.Run;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.Cli.Utils.Extensions;
-using static Microsoft.DotNet.Cli.Parser;
using CommandResult = System.CommandLine.Parsing.CommandResult;
namespace Microsoft.DotNet.Cli.Extensions;
@@ -30,9 +30,10 @@ public static void ShowHelp(this ParseResult parseResult)
{
// take from the start of the list until we hit an option/--/unparsed token
// since commands can have arguments, we must take those as well in order to get accurate help
- var tokenList = parseResult.Tokens.TakeWhile(token => token.Type == TokenType.Argument || token.Type == TokenType.Command || token.Type == TokenType.Directive).Select(t => t.Value).ToList();
- tokenList.Add("-h");
- Instance.Parse(tokenList).Invoke();
+ Parser.Parse([
+ ..parseResult.Tokens.TakeWhile(token => token.Type == TokenType.Argument || token.Type == TokenType.Command || token.Type == TokenType.Directive).Select(t => t.Value),
+ "-h"
+ ]).Invoke();
}
public static void ShowHelpOrErrorIfAppropriate(this ParseResult parseResult)
@@ -92,7 +93,7 @@ public static string RootSubCommandResult(this ParseResult parseResult)
public static bool IsDotnetBuiltInCommand(this ParseResult parseResult)
{
return string.IsNullOrEmpty(parseResult.RootSubCommandResult()) ||
- GetBuiltInCommand(parseResult.RootSubCommandResult()) != null;
+ Parser.GetBuiltInCommand(parseResult.RootSubCommandResult()) != null;
}
public static bool IsTopLevelDotnetCommand(this ParseResult parseResult)
@@ -102,9 +103,9 @@ public static bool IsTopLevelDotnetCommand(this ParseResult parseResult)
public static bool CanBeInvoked(this ParseResult parseResult)
{
- return GetBuiltInCommand(parseResult.RootSubCommandResult()) != null ||
+ return Parser.GetBuiltInCommand(parseResult.RootSubCommandResult()) != null ||
parseResult.Tokens.Any(token => token.Type == TokenType.Directive) ||
- (parseResult.IsTopLevelDotnetCommand() && string.IsNullOrEmpty(parseResult.GetValue(DotnetSubCommand)));
+ (parseResult.IsTopLevelDotnetCommand() && string.IsNullOrEmpty(parseResult.GetValue(Parser.DotnetSubCommand)));
}
public static int HandleMissingCommand(this ParseResult parseResult)
@@ -134,7 +135,7 @@ public static string[] GetSubArguments(this string[] args)
return
[
.. subargs
- .SkipWhile(arg => DiagOption.Name.Equals(arg) || DiagOption.Aliases.Contains(arg) || arg.Equals("dotnet"))
+ .SkipWhile(arg => Parser.DiagOption.Name.Equals(arg) || Parser.DiagOption.Aliases.Contains(arg) || arg.Equals("dotnet"))
.Skip(1), // remove top level command (ex build or publish)
.. runArgs
];
@@ -153,7 +154,7 @@ public static bool DiagOptionPrecedesSubcommand(this string[] args, string subCo
{
return false;
}
- else if (DiagOption.Name.Equals(args) || DiagOption.Aliases.Contains(args[i]))
+ else if (Parser.DiagOption.Name.Equals(args) || Parser.DiagOption.Aliases.Contains(args[i]))
{
return true;
}
@@ -166,7 +167,7 @@ public static bool DiagOptionPrecedesSubcommand(this string[] args, string subCo
{
CommandResult commandResult => commandResult.Command.Name,
ArgumentResult argResult => argResult.Tokens.FirstOrDefault()?.Value,
- _ => parseResult.GetResult(DotnetSubCommand)?.GetValueOrDefault()
+ _ => parseResult.GetResult(Parser.DotnetSubCommand)?.GetValueOrDefault()
};
public static bool BothArchAndOsOptionsSpecified(this ParseResult parseResult) =>
@@ -293,4 +294,17 @@ public static void HandleDebugSwitch(this ParseResult parseResult)
///
public static bool HasOption(this ParseResult parseResult, string name)
=> parseResult.GetResult(name) is OptionResult or && !or.Implicit;
+
+ ///
+ /// Checks if the option is present and not implicit (i.e. not set by default).
+ /// This is useful for checking if the user has explicitly set an option, as opposed to it being set by default.
+ ///
+ public static bool HasOption(this SymbolResult symbolResult, Option option) => symbolResult.GetResult(option) is OptionResult or && !or.Implicit;
+
+ ///
+ /// Checks if the option with given name is present and not implicit (i.e. not set by default).
+ /// This is useful for checking if the user has explicitly set an option, as opposed to it being set by default.
+ ///
+ public static bool HasOption(this SymbolResult symbolResult, string name)
+ => symbolResult.GetResult(name) is OptionResult or && !or.Implicit;
}
diff --git a/src/Cli/dotnet/Extensions/ParserExtensions.cs b/src/Cli/dotnet/Extensions/ParserExtensions.cs
deleted file mode 100644
index a51f7d4fd999..000000000000
--- a/src/Cli/dotnet/Extensions/ParserExtensions.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#nullable disable
-
-using System.CommandLine;
-
-namespace Microsoft.DotNet.Cli.Extensions;
-
-public static class ParserExtensions
-{
- public static ParseResult ParseFrom(
- this CommandLineConfiguration parser,
- string context,
- string[] args = null) =>
- parser.Parse([.. context.Split(' '), .. args]);
-}
diff --git a/src/Cli/dotnet/Parser.cs b/src/Cli/dotnet/Parser.cs
index 260c7dd3b82c..8e79913ea085 100644
--- a/src/Cli/dotnet/Parser.cs
+++ b/src/Cli/dotnet/Parser.cs
@@ -53,11 +53,6 @@ namespace Microsoft.DotNet.Cli;
public static class Parser
{
- public static readonly RootCommand RootCommand = new()
- {
- Directives = { new DiagramDirective(), new SuggestDirective(), new EnvironmentVariablesDirective() }
- };
-
public static readonly Command InstallSuccessCommand = InternalReportInstallSuccessCommandParser.GetCommand();
// Subcommands
@@ -131,7 +126,7 @@ public static class Parser
// Argument
public static readonly Argument DotnetSubCommand = new("subcommand") { Arity = ArgumentArity.ZeroOrOne, Hidden = true };
- private static Command ConfigureCommandLine(RootCommand rootCommand)
+ private static RootCommand ConfigureCommandLine(RootCommand rootCommand)
{
for (int i = rootCommand.Options.Count - 1; i >= 0; i--)
{
@@ -183,7 +178,7 @@ private static Command ConfigureCommandLine(RootCommand rootCommand)
else
{
// when user does not specify any args (just "dotnet"), a usage needs to be printed
- parseResult.Configuration.Output.WriteLine(CliUsage.HelpText);
+ parseResult.InvocationConfiguration.Output.WriteLine(CliUsage.HelpText);
return 0;
}
});
@@ -224,13 +219,44 @@ public static bool TokenPerLine(string tokenToReplace, out IReadOnlyList
}
}
- public static CommandLineConfiguration Instance { get; } = new(ConfigureCommandLine(RootCommand))
+ public static ParserConfiguration ParserConfiguration { get; } = new()
{
- EnableDefaultExceptionHandler = false,
EnablePosixBundling = false,
ResponseFileTokenReplacer = TokenPerLine
};
+ public static InvocationConfiguration InvocationConfiguration { get; } = new()
+ {
+ EnableDefaultExceptionHandler = false,
+ };
+
+ ///
+ /// The root command for the .NET CLI.
+ ///
+ ///
+ /// If you use this Command directly, you _must_ use
+ /// and to ensure that the command line parser
+ /// and invoker are configured correctly.
+ ///
+ public static RootCommand RootCommand { get; } = ConfigureCommandLine(new()
+ {
+ Directives = { new DiagramDirective(), new SuggestDirective(), new EnvironmentVariablesDirective() }
+ });
+
+ ///
+ /// You probably want to use instead of this method.
+ /// This has to internally split the string into an array of arguments
+ /// before parsing, which is not as efficient as using the array overload.
+ /// And also won't always split tokens the way the user will expect on their shell.
+ ///
+ public static ParseResult Parse(string commandLineUnsplit) => RootCommand.Parse(commandLineUnsplit, ParserConfiguration);
+ public static ParseResult Parse(string[] args) => RootCommand.Parse(args, ParserConfiguration);
+ public static int Invoke(ParseResult parseResult) => parseResult.Invoke(InvocationConfiguration);
+ public static Task InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken = default) => parseResult.InvokeAsync(InvocationConfiguration, cancellationToken);
+ public static int Invoke(string[] args) => Invoke(Parse(args));
+ public static Task InvokeAsync(string[] args, CancellationToken cancellationToken = default) => InvokeAsync(Parse(args), cancellationToken);
+
+
internal static int ExceptionHandler(Exception exception, ParseResult parseResult)
{
if (exception is TargetInvocationException)
@@ -407,7 +433,7 @@ internal PrintCliSchemaAction()
}
public override int Invoke(ParseResult parseResult)
{
- CliSchema.PrintCliSchema(parseResult.CommandResult, parseResult.Configuration.Output, Program.TelemetryClient);
+ CliSchema.PrintCliSchema(parseResult.CommandResult, parseResult.InvocationConfiguration.Output, Program.TelemetryClient);
return 0;
}
}
diff --git a/src/Cli/dotnet/Program.cs b/src/Cli/dotnet/Program.cs
index fa3fc09973f0..e7932f44c25b 100644
--- a/src/Cli/dotnet/Program.cs
+++ b/src/Cli/dotnet/Program.cs
@@ -129,7 +129,7 @@ internal static int ProcessArgs(string[] args, TimeSpan startupTime)
ParseResult parseResult;
using (new PerformanceMeasurement(performanceData, "Parse Time"))
{
- parseResult = Parser.Instance.Parse(args);
+ parseResult = Parser.Parse(args);
// Avoid create temp directory with root permission and later prevent access in non sudo
// This method need to be run very early before temp folder get created
@@ -298,7 +298,7 @@ internal static int ProcessArgs(string[] args, TimeSpan startupTime)
otherTokens.Add(token.Value);
}
}
- parseResult = Parser.Instance.Parse(["run", unmatchedCommandOrFile, .. otherTokens]);
+ parseResult = Parser.Parse(["run", unmatchedCommandOrFile, .. otherTokens]);
InvokeBuiltInCommand(parseResult, out var exitCode);
return exitCode;
@@ -315,7 +315,7 @@ static void InvokeBuiltInCommand(ParseResult parseResult, out int exitCode)
try
{
- exitCode = parseResult.Invoke();
+ exitCode = Parser.Invoke(parseResult);
exitCode = AdjustExitCode(parseResult, exitCode);
}
catch (Exception exception)
diff --git a/src/System.CommandLine.StaticCompletions/CompletionsCommand.cs b/src/System.CommandLine.StaticCompletions/CompletionsCommand.cs
index 3b1520693dd9..d6ee05b6d353 100644
--- a/src/System.CommandLine.StaticCompletions/CompletionsCommand.cs
+++ b/src/System.CommandLine.StaticCompletions/CompletionsCommand.cs
@@ -114,7 +114,7 @@ public GenerateScriptCommand(Argument shellArg)
{
IShellProvider shell = args.GetValue(shellArg)!; // this cannot be null due to the way the shellArg is defined/configured
var script = shell.GenerateCompletions(args.RootCommandResult.Command);
- args.Configuration.Output.Write(script);
+ args.InvocationConfiguration.Output.Write(script);
});
}
}
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets
index 324d7a1ba638..3ad44991d7a6 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets
@@ -53,7 +53,10 @@ Copyright (c) .NET Foundation. All rights reserved.
+ Condition="'$(RestoreEnablePackagePruning)' == 'true'
+ AND '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
+ AND '$(TargetFrameworkVersion)' != ''
+ AND $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '8.0'))">
$(NetCoreRoot)\sdk\$(NETCoreSdkVersion)\PrunePackageData\
diff --git a/test/ArgumentForwarding.Tests/ArgumentForwardingTests.cs b/test/ArgumentForwarding.Tests/ArgumentForwardingTests.cs
index 9f7250d5984f..ab4d043740ed 100644
--- a/test/ArgumentForwarding.Tests/ArgumentForwardingTests.cs
+++ b/test/ArgumentForwarding.Tests/ArgumentForwardingTests.cs
@@ -151,8 +151,7 @@ public void TestArgumentForwardingCmdFailsWithUnbalancedQuote(string testArgStri
public void ForwardAsWorks()
{
var cmd = Microsoft.DotNet.Cli.Commands.Package.Add.PackageAddCommandParser.GetCommand();
- var parser = new System.CommandLine.CommandLineConfiguration(cmd);
- var parseResult = parser.Parse(["package", "add", "thing", "--prerelease"]);
+ var parseResult = cmd.Parse(["package", "add", "thing", "--prerelease"]);
var forwardedValues = parseResult.OptionValuesToBeForwarded();
forwardedValues.Should().Contain("--prerelease");
}
diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithoutTransitiveProjectRefs.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithoutTransitiveProjectRefs.cs
index 591444054cf4..acc7cb050244 100644
--- a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithoutTransitiveProjectRefs.cs
+++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithoutTransitiveProjectRefs.cs
@@ -28,14 +28,15 @@ public void It_builds_the_project_successfully_with_static_graph_and_isolation()
[Fact]
public void It_cleans_the_project_successfully_with_static_graph_and_isolation()
{
- var (testAsset, outputDirectories) = BuildAppWithTransitiveDependenciesAndTransitiveCompileReference(new[] { "/graph" });
+ var (testAsset, outputDirectories) = BuildAppWithTransitiveDependenciesAndTransitiveCompileReference(new[] { "/graph", "/bl:build-{}.binlog" });
var cleanCommand = new DotnetCommand(
Log,
"msbuild",
Path.Combine(testAsset.TestRoot, "1", "1.csproj"),
"/t:clean",
- "/graph");
+ "/graph",
+ "/bl:clean-{}.binlog");
cleanCommand
.Execute()
diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToResolveConflicts.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToResolveConflicts.cs
index 4d926061e571..f201aaf8feda 100644
--- a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToResolveConflicts.cs
+++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToResolveConflicts.cs
@@ -282,6 +282,7 @@ public void PlatformPackagesCanBePruned(bool prunePackages)
IsExe = false
};
referencedProject.PackageReferences.Add(new TestPackageReference("System.Text.Json", "8.0.0"));
+ referencedProject.AdditionalProperties["RestoreEnablePackagePruning"] = prunePackages.ToString();
var testProject = new TestProject()
{
@@ -315,21 +316,21 @@ public void PlatformPackagesCanBePruned(bool prunePackages)
[InlineData(ToolsetInfo.CurrentTargetFramework)]
[InlineData("net9.0")]
[InlineData("net8.0")]
- [InlineData("net7.0")]
- [InlineData("net6.0")]
- [InlineData("netcoreapp3.1")]
- [InlineData("netcoreapp3.0")]
- [InlineData("netcoreapp2.1")]
- [InlineData("netcoreapp2.0")]
+ // [InlineData("net7.0", false)] TODO: https://github.com/NuGet/Home/issues/14424
+ // [InlineData("net6.0", false)] TODO: https://github.com/NuGet/Home/issues/14424
+ // [InlineData("netcoreapp3.1")] TODO: https://github.com/NuGet/Home/issues/14424
+ // [InlineData("netcoreapp3.0")] TODO: https://github.com/NuGet/Home/issues/14424
+ [InlineData("netcoreapp2.1", false)]
+ [InlineData("netcoreapp2.0", false)]
[InlineData("netcoreapp1.1", false)]
[InlineData("netcoreapp1.0", false)]
- [InlineData("netstandard2.1")]
- [InlineData("netstandard2.0")]
+ [InlineData("netstandard2.1", false)]
+ [InlineData("netstandard2.0", false)]
[InlineData("netstandard1.1", false)]
[InlineData("netstandard1.0", false)]
[InlineData("net451", false)]
- [InlineData("net462")]
- [InlineData("net481")]
+ [InlineData("net462", false)]
+ [InlineData("net481", false)]
public void PrunePackageDataSucceeds(string targetFramework, bool shouldPrune = true)
{
var nugetFramework = NuGetFramework.Parse(targetFramework);
diff --git a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs
index d4c4671169b8..8e5a4e24a227 100644
--- a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs
+++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs
@@ -966,14 +966,20 @@ public void ILLink_verify_analysis_warnings_framework_assemblies(string targetFr
"ILLink : Trim analysis warning IL2026: System.ComponentModel.DefaultValueAttribute.DefaultValueAttribute(Type, String): Using member"
});
}
- // windows-only COM warnings
- if (Net10Plus.Any(tfm => (string)tfm[0] == targetFramework) && RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ if (Net10Plus.Any(tfm => (string)tfm[0] == targetFramework))
{
expectedWarnings.AddRange(new string[] {
- "ILLink : Trim analysis warning IL2045: Internal.Runtime.InteropServices.ComActivator.BasicClassFactory.CreateValidatedInterfaceType(Type, Guid&, Object): Attribute 'System.Runtime.InteropServices.ClassInterfaceAttribute' is being referenced in code but the trimmer was instructed to remove all instances of this attribute. If the attribute instances are necessary make sure to either remove the trimmer attribute XML portion which removes the attribute instances, or override the removal by using the trimmer XML descriptor to keep the attribute type (which in turn keeps all of its instances).",
- "ILLink : Trim analysis warning IL2045: Internal.Runtime.InteropServices.ComActivator.BasicClassFactory.CreateValidatedInterfaceType(Type, Guid&, Object): Attribute 'System.Runtime.InteropServices.ClassInterfaceAttribute' is being referenced in code but the trimmer was instructed to remove all instances of this attribute. If the attribute instances are necessary make sure to either remove the trimmer attribute XML portion which removes the attribute instances, or override the removal by using the trimmer XML descriptor to keep the attribute type (which in turn keeps all of its instances).",
- "ILLink : Trim analysis warning IL2045: Internal.Runtime.InteropServices.ComActivator.BasicClassFactory.CreateValidatedInterfaceType(Type, Guid&, Object): Attribute 'System.Runtime.InteropServices.ClassInterfaceAttribute' is being referenced in code but the trimmer was instructed to remove all instances of this attribute. If the attribute instances are necessary make sure to either remove the trimmer attribute XML portion which removes the attribute instances, or override the removal by using the trimmer XML descriptor to keep the attribute type (which in turn keeps all of its instances)."
+ "ILLink : Trim analysis warning IL2067: System.ComponentModel.DefaultValueAttribute.DefaultValueAttribute(Type, String): 'typeToConvert' argument does not satisfy 'DynamicallyAccessedMemberTypes.All' in call to 'System.ComponentModel.DefaultValueAttribute"
});
+ // windows-only COM warnings
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ {
+ expectedWarnings.AddRange(new string[] {
+ "ILLink : Trim analysis warning IL2045: Internal.Runtime.InteropServices.ComActivator.BasicClassFactory.CreateValidatedInterfaceType(Type, Guid&, Object): Attribute 'System.Runtime.InteropServices.ClassInterfaceAttribute' is being referenced in code but the trimmer was instructed to remove all instances of this attribute. If the attribute instances are necessary make sure to either remove the trimmer attribute XML portion which removes the attribute instances, or override the removal by using the trimmer XML descriptor to keep the attribute type (which in turn keeps all of its instances).",
+ "ILLink : Trim analysis warning IL2045: Internal.Runtime.InteropServices.ComActivator.BasicClassFactory.CreateValidatedInterfaceType(Type, Guid&, Object): Attribute 'System.Runtime.InteropServices.ClassInterfaceAttribute' is being referenced in code but the trimmer was instructed to remove all instances of this attribute. If the attribute instances are necessary make sure to either remove the trimmer attribute XML portion which removes the attribute instances, or override the removal by using the trimmer XML descriptor to keep the attribute type (which in turn keeps all of its instances).",
+ "ILLink : Trim analysis warning IL2045: Internal.Runtime.InteropServices.ComActivator.BasicClassFactory.CreateValidatedInterfaceType(Type, Guid&, Object): Attribute 'System.Runtime.InteropServices.ClassInterfaceAttribute' is being referenced in code but the trimmer was instructed to remove all instances of this attribute. If the attribute instances are necessary make sure to either remove the trimmer attribute XML portion which removes the attribute instances, or override the removal by using the trimmer XML descriptor to keep the attribute type (which in turn keeps all of its instances)."
+ });
+ }
}
var testProject = CreateTestProjectForILLinkTesting(_testAssetsManager, targetFramework, projectName);
diff --git a/test/Microsoft.NET.TestFramework/Assertions/StringAssertionsExtensions.cs b/test/Microsoft.NET.TestFramework/Assertions/StringAssertionsExtensions.cs
index 47fc2a014d90..83367ee3df6c 100644
--- a/test/Microsoft.NET.TestFramework/Assertions/StringAssertionsExtensions.cs
+++ b/test/Microsoft.NET.TestFramework/Assertions/StringAssertionsExtensions.cs
@@ -3,6 +3,8 @@
using System.Globalization;
using FluentAssertions.Primitives;
+using DiffPlex.Renderer;
+using System.Diagnostics.CodeAnalysis;
namespace Microsoft.NET.TestFramework.Assertions
{
@@ -13,14 +15,46 @@ private static string NormalizeLineEndings(string s)
return s.Replace("\r\n", "\n");
}
- public static AndConstraint BeVisuallyEquivalentTo(this StringAssertions assertions, string expected, string because = "", params object[] becauseArgs)
+ ///
+ /// Checks that two strings look to same to humans - if not a git-style diff will be reported.
+ ///
+ /// Supply a non-default reason for the failure. By default, a git-style diff is reported. If you override this, the diff string will be added to the
+ /// so you can use it in your template string.
+ public static AndConstraint BeVisuallyEquivalentTo(
+ this StringAssertions assertions,
+ string expected,
+#if NET
+ [StringSyntax(nameof(CompositeFormat))]
+#endif
+ string because = "",
+ params object[] becauseArgs)
{
- string.Compare(NormalizeLineEndings(assertions.Subject), NormalizeLineEndings(expected), CultureInfo.CurrentCulture, CompareOptions.IgnoreSymbols)
- .Should().Be(0, $"String \"{assertions.Subject}\" is not visually equivalent to expected string \"{expected}\".");
+ var normalizedActual = NormalizeLineEndings(assertions.Subject);
+ var normalizedExpected = NormalizeLineEndings(expected);
+ var areSame = string.Compare(normalizedActual, normalizedExpected, CultureInfo.CurrentCulture, CompareOptions.IgnoreSymbols) == 0;
+ if (!areSame)
+ {
+ var diff = UnidiffRenderer.GenerateUnidiff(oldText: normalizedExpected, newText: normalizedActual, oldFileName: "expected", newFileName: "actual", ignoreWhitespace: true);
+ areSame.Should().Be(true, because: string.IsNullOrEmpty(because) ? $"The input strings are not visually equivalent. Diff is:\n" + diff : because, becauseArgs: [.. becauseArgs, diff]);
+ }
+
return new AndConstraint(assertions);
}
- public static AndConstraint BeVisuallyEquivalentToIfNotLocalized(this StringAssertions assertions, string expected, string because = "", params object[] becauseArgs)
+ ///
+ /// Checks that two strings look to same to humans - if not a git-style diff will be reported.
+ ///
+ /// Supply a non-default reason for the failure. By default, a git-style diff is reported. If you override this, the diff string will be added to the
+ /// so you can use it in your template string.
+ public static AndConstraint BeVisuallyEquivalentToIfNotLocalized(
+ this StringAssertions assertions,
+ string expected,
+#if NET
+ [StringSyntax(nameof(CompositeFormat))]
+#endif
+ string because = "",
+ params object[] becauseArgs
+ )
{
if (!TestContext.IsLocalized())
{
diff --git a/test/Microsoft.NET.TestFramework/Microsoft.NET.TestFramework.csproj b/test/Microsoft.NET.TestFramework/Microsoft.NET.TestFramework.csproj
index fef4cf243d82..7829d0829246 100644
--- a/test/Microsoft.NET.TestFramework/Microsoft.NET.TestFramework.csproj
+++ b/test/Microsoft.NET.TestFramework/Microsoft.NET.TestFramework.csproj
@@ -45,12 +45,13 @@
Some tests (e.g. dotnet-watch.Tests) need to have total control over the loading of MSBuild assemblies.
-->
+
-
-
-
+
+
+
diff --git a/test/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/Approvals/HelpTests.CanShowCommandOptions_Basic.verified.txt b/test/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/Approvals/HelpTests.CanShowCommandOptions_Basic.verified.txt
index c1cf414ee89a..c31a69227973 100644
--- a/test/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/Approvals/HelpTests.CanShowCommandOptions_Basic.verified.txt
+++ b/test/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/Approvals/HelpTests.CanShowCommandOptions_Basic.verified.txt
@@ -1,8 +1,8 @@
Options:
-n, --name The name for the output being created. If no name is specified, the name of the output directory is used.
-o, --output