From 6a81401977fc2ea39e9824cd76caea98efc92b30 Mon Sep 17 00:00:00 2001
From: Ben Villalobos <4691428+BenVillalobos@users.noreply.github.com>
Date: Tue, 5 Jul 2022 16:33:56 -0500
Subject: [PATCH 01/26] Change 6's to 7's, then see what happens
---
eng/BootStrapMSBuild.targets | 2 +-
eng/cibuild_bootstrapped_msbuild.ps1 | 2 +-
eng/cibuild_bootstrapped_msbuild.sh | 2 +-
global.json | 2 +-
scripts/Deploy-MSBuild.ps1 | 2 +-
src/Build.UnitTests/Microsoft.Build.Engine.UnitTests.csproj | 4 ++--
src/Build/Microsoft.Build.csproj | 2 +-
src/Directory.BeforeCommon.targets | 2 +-
src/Directory.Build.props | 6 +++---
src/Framework/README.md | 2 +-
src/MSBuild.Bootstrap/MSBuild.Bootstrap.csproj | 2 +-
src/Package/Localization/Localization.csproj | 2 +-
src/Samples/ProjectCachePlugin/ProjectCachePlugin.csproj | 4 ++--
src/Tasks/Microsoft.Build.Tasks.csproj | 2 +-
src/Utilities/README.md | 2 +-
15 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/eng/BootStrapMSBuild.targets b/eng/BootStrapMSBuild.targets
index 288c062da35..4ba21444d67 100644
--- a/eng/BootStrapMSBuild.targets
+++ b/eng/BootStrapMSBuild.targets
@@ -210,7 +210,7 @@
Copy it from "next to MSBuild" in the pre-bootstrap SDK to our little weirdo bootstrap
layout next to the SDK tasks, so it can get loaded by the SDK tasks that need it. -->
+ DestinationFolder="$(BootstrapDestination)Sdks\Microsoft.NET.Sdk\tools\net7.0" />
diff --git a/eng/cibuild_bootstrapped_msbuild.ps1 b/eng/cibuild_bootstrapped_msbuild.ps1
index b9c1cf4fe0c..906a33dc12f 100644
--- a/eng/cibuild_bootstrapped_msbuild.ps1
+++ b/eng/cibuild_bootstrapped_msbuild.ps1
@@ -91,7 +91,7 @@ try {
else
{
$buildToolPath = $dotnetExePath
- $buildToolCommand = Join-Path $bootstrapRoot "net6.0\MSBuild\MSBuild.dll"
+ $buildToolCommand = Join-Path $bootstrapRoot "net7.0\MSBuild\MSBuild.dll"
$buildToolFramework = "netcoreapp3.1"
}
diff --git a/eng/cibuild_bootstrapped_msbuild.sh b/eng/cibuild_bootstrapped_msbuild.sh
index e5425507f47..b4404b7e4ad 100755
--- a/eng/cibuild_bootstrapped_msbuild.sh
+++ b/eng/cibuild_bootstrapped_msbuild.sh
@@ -63,7 +63,7 @@ bootstrapRoot="$Stage1Dir/bin/bootstrap"
if [ $host_type = "core" ]
then
_InitializeBuildTool="$_InitializeDotNetCli/dotnet"
- _InitializeBuildToolCommand="$bootstrapRoot/net6.0/MSBuild/MSBuild.dll"
+ _InitializeBuildToolCommand="$bootstrapRoot/net7.0/MSBuild/MSBuild.dll"
_InitializeBuildToolFramework="netcoreapp3.1"
elif [ $host_type = "mono" ]
then
diff --git a/global.json b/global.json
index 471f88dbc9b..efd25efd1f4 100644
--- a/global.json
+++ b/global.json
@@ -3,7 +3,7 @@
"allowPrerelease": true
},
"tools": {
- "dotnet": "6.0.200",
+ "dotnet": "7.0.100-preview.5.22307.18",
"vs": {
"version": "17.0"
}
diff --git a/scripts/Deploy-MSBuild.ps1 b/scripts/Deploy-MSBuild.ps1
index ef1959fc3b6..8cfecb6a09a 100644
--- a/scripts/Deploy-MSBuild.ps1
+++ b/scripts/Deploy-MSBuild.ps1
@@ -69,7 +69,7 @@ else {
if ($runtime -eq "Desktop") {
$targetFramework = "net472"
} else {
- $targetFramework = "net6.0"
+ $targetFramework = "net67.0"
}
$bootstrapBinDirectory = "artifacts\bin\MSBuild.Bootstrap\$configuration\$targetFramework"
diff --git a/src/Build.UnitTests/Microsoft.Build.Engine.UnitTests.csproj b/src/Build.UnitTests/Microsoft.Build.Engine.UnitTests.csproj
index 8ddca6108ac..83a4382d8ed 100644
--- a/src/Build.UnitTests/Microsoft.Build.Engine.UnitTests.csproj
+++ b/src/Build.UnitTests/Microsoft.Build.Engine.UnitTests.csproj
@@ -36,14 +36,14 @@
TargetFramework=$(FullFrameworkTFM)
TargetFramework=$(FullFrameworkTFM)
- TargetFramework=net6.0
+ TargetFramework=net7.0
TargetFramework=$(FullFrameworkTFM)
TargetFramework=$(FullFrameworkTFM)
- TargetFramework=net6.0
+ TargetFramework=net7.0
diff --git a/src/Build/Microsoft.Build.csproj b/src/Build/Microsoft.Build.csproj
index 309d14bdc83..c4eb0bce69a 100644
--- a/src/Build/Microsoft.Build.csproj
+++ b/src/Build/Microsoft.Build.csproj
@@ -4,7 +4,7 @@
- $(FullFrameworkTFM);net6.0
+ $(FullFrameworkTFM);net7.0
$(RuntimeOutputTargetFrameworks)
Microsoft.Build
Microsoft.Build
diff --git a/src/Directory.BeforeCommon.targets b/src/Directory.BeforeCommon.targets
index 6696e3861ba..40bc57ecbc1 100644
--- a/src/Directory.BeforeCommon.targets
+++ b/src/Directory.BeforeCommon.targets
@@ -92,7 +92,7 @@
$(DefineConstants);WORKAROUND_COREFX_19110
-
+
$(DefineConstants);FEATURE_PIPEOPTIONS_CURRENTUSERONLY
$(DefineConstants);FEATURE_NODE_REUSE
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index ccffd9b5c05..6e12f1557f7 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -30,13 +30,13 @@
AnyCPU;x64;arm64
- $(FullFrameworkTFM);net6.0;netstandard2.0
- net6.0;netstandard2.0
+ $(FullFrameworkTFM);net7.0;netstandard2.0
+ net7.0;netstandard2.0
$(FullFrameworkTFM);netstandard2.0
AnyCPU
- net6.0
+ net7.0
$(FullFrameworkTFM);$(RuntimeOutputTargetFrameworks)
$(FullFrameworkTFM)
diff --git a/src/Framework/README.md b/src/Framework/README.md
index 1b72454f526..8a86bc21cc5 100644
--- a/src/Framework/README.md
+++ b/src/Framework/README.md
@@ -6,6 +6,6 @@ The items in this namespace are primarily base-level classes and interfaces shar
[`ITask`](https://docs.microsoft.com/dotnet/api/microsoft.build.framework.itask), and [`ILogger`](https://docs.microsoft.com/dotnet/api/microsoft.build.framework.ilogger).
### netstandard2.0 target
-The `netstandard2.0` target of this build is configured only to output reference assemblies; at runtime MSBuild will be `net6.0` or `net472`. Please use the `net6.0`-targeted assemblies for .NET Core 6+ scenarios.
+The `netstandard2.0` target of this build is configured only to output reference assemblies; at runtime MSBuild will be `net7.0` or `net472`. Please use the `net7.0`-targeted assemblies for .NET Core 6+ scenarios.
For context, see https://github.com/dotnet/msbuild/pull/6148
\ No newline at end of file
diff --git a/src/MSBuild.Bootstrap/MSBuild.Bootstrap.csproj b/src/MSBuild.Bootstrap/MSBuild.Bootstrap.csproj
index 9bb2da04989..4766c041881 100644
--- a/src/MSBuild.Bootstrap/MSBuild.Bootstrap.csproj
+++ b/src/MSBuild.Bootstrap/MSBuild.Bootstrap.csproj
@@ -43,7 +43,7 @@
-
+
diff --git a/src/Package/Localization/Localization.csproj b/src/Package/Localization/Localization.csproj
index e15af6ed02a..e6c8a82eeaf 100644
--- a/src/Package/Localization/Localization.csproj
+++ b/src/Package/Localization/Localization.csproj
@@ -1,6 +1,6 @@
- net6.0
+ net7.0
net472
Microsoft.Build.Localization.nuspec
false
diff --git a/src/Samples/ProjectCachePlugin/ProjectCachePlugin.csproj b/src/Samples/ProjectCachePlugin/ProjectCachePlugin.csproj
index 6972b5e9ab0..0e37d41d98e 100644
--- a/src/Samples/ProjectCachePlugin/ProjectCachePlugin.csproj
+++ b/src/Samples/ProjectCachePlugin/ProjectCachePlugin.csproj
@@ -4,8 +4,8 @@
false
false
- net6.0
- $(FullFrameworkTFM);net6.0
+ net7.0
+ $(FullFrameworkTFM);net7.0
$(RuntimeOutputTargetFrameworks)
diff --git a/src/Tasks/Microsoft.Build.Tasks.csproj b/src/Tasks/Microsoft.Build.Tasks.csproj
index 5bd98bfbe0c..54707593938 100644
--- a/src/Tasks/Microsoft.Build.Tasks.csproj
+++ b/src/Tasks/Microsoft.Build.Tasks.csproj
@@ -1013,7 +1013,7 @@
-
+
diff --git a/src/Utilities/README.md b/src/Utilities/README.md
index a85d56e11cc..99a1651b52c 100644
--- a/src/Utilities/README.md
+++ b/src/Utilities/README.md
@@ -7,6 +7,6 @@ This package contains `Microsoft.Build.Utilities.Core.dll`, which defines helper
* [`Logger`](https://docs.microsoft.com/dotnet/api/microsoft.build.utilities.logger), a base class for custom logging functionality.
### netstandard2.0 target
-The `netstandard2.0` target of this build is configured only to output reference assemblies; at runtime MSBuild will be `net6.0` or `net472`. Please use the `net6.0`-targeted assemblies for .NET Core 6+ scenarios.
+The `netstandard2.0` target of this build is configured only to output reference assemblies; at runtime MSBuild will be `net7.0` or `net472`. Please use the `net7.0`-targeted assemblies for .NET Core 6+ scenarios.
For context, see https://github.com/dotnet/msbuild/pull/6148
\ No newline at end of file
From 40b07d3eab84b5dffc7fa73662578cf6f5084bfe Mon Sep 17 00:00:00 2001
From: Logan Bussell
Date: Wed, 20 Jul 2022 08:57:56 -0700
Subject: [PATCH 02/26] Add nowarn for SYSLIB warnings
---
Directory.Build.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Directory.Build.props b/Directory.Build.props
index 0df28a5b8b2..3a959f894ae 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -38,7 +38,7 @@
SYSLIB0011: Removing binary formatter will happen as part of a larger .NET-wide effort.
-->
- $(NoWarn);NU1603;NU5105;1701;1702;SYSLIB0011
+ $(NoWarn);NU1603;NU5105;1701;1702;SYSLIB0011;SYSLIB0037;SYSLIB0044
From ea0b750ba085fdf88557200d42c622a035d06b63 Mon Sep 17 00:00:00 2001
From: Ben Villalobos <4691428+BenVillalobos@users.noreply.github.com>
Date: Wed, 20 Jul 2022 12:29:01 -0700
Subject: [PATCH 03/26] Resolve CS8981: lowercase preserved types
---
.../RemoteProjectsProviderMock/CollectionsHelpers.cs | 8 ++++----
src/Build/Definition/ToolsetReader.cs | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/CollectionsHelpers.cs b/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/CollectionsHelpers.cs
index b6d935f41a7..83035cd5042 100644
--- a/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/CollectionsHelpers.cs
+++ b/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/CollectionsHelpers.cs
@@ -85,13 +85,13 @@ public static IList ExportCollection(this ProjectCollectionLink
}
- public static IDictionary ImportDictionary(this ProjectCollectionLinker importer, IDictionary source)
+ public static IDictionary ImportDictionary(this ProjectCollectionLinker importer, IDictionary source)
where T : class
where RMock : MockLinkRemoter, new()
{
if (source == null) return null;
// Just copy ...
- Dictionary result = new Dictionary();
+ Dictionary result = new Dictionary();
foreach (var sRemoter in source)
{
var value = importer.Import(sRemoter.Value);
@@ -101,13 +101,13 @@ public static IDictionary ImportDictionary(this ProjectCo
return result;
}
- public static IDictionary ExportDictionary(this ProjectCollectionLinker exporter, IDictionary source)
+ public static IDictionary ExportDictionary(this ProjectCollectionLinker exporter, IDictionary source)
where T : class
where RMock : MockLinkRemoter, new()
{
if (source == null) return null;
// Just copy ...
- Dictionary result = new Dictionary();
+ Dictionary result = new Dictionary();
foreach (var s in source)
{
var valueRemoter = exporter.Export(s.Value);
diff --git a/src/Build/Definition/ToolsetReader.cs b/src/Build/Definition/ToolsetReader.cs
index 8887b9cca2b..ddb164cb778 100644
--- a/src/Build/Definition/ToolsetReader.cs
+++ b/src/Build/Definition/ToolsetReader.cs
@@ -12,7 +12,7 @@
using Microsoft.Build.Framework;
using Microsoft.Build.Internal;
using Microsoft.Build.Shared.FileSystem;
-using error = Microsoft.Build.Shared.ErrorUtilities;
+using ErrorUtils = Microsoft.Build.Shared.ErrorUtilities;
using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException;
using InvalidToolsetDefinitionException = Microsoft.Build.Exceptions.InvalidToolsetDefinitionException;
using ReservedPropertyNames = Microsoft.Build.Internal.ReservedPropertyNames;
@@ -366,7 +366,7 @@ internal string ReadToolsets
out string defaultOverrideToolsVersion
)
{
- error.VerifyThrowArgumentNull(toolsets, "Toolsets");
+ ErrorUtils.VerifyThrowArgumentNull(toolsets, "Toolsets");
ReadEachToolset(toolsets, globalProperties, initialProperties, accumulateProperties);
From 21ab8aaed85b28dc56f9852e922ef0224d804bab Mon Sep 17 00:00:00 2001
From: Ben Villalobos <4691428+BenVillalobos@users.noreply.github.com>
Date: Tue, 26 Jul 2022 13:21:59 -0700
Subject: [PATCH 04/26] Net7.0 not net67.0
---
scripts/Deploy-MSBuild.ps1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/Deploy-MSBuild.ps1 b/scripts/Deploy-MSBuild.ps1
index 8cfecb6a09a..d2014e0a63c 100644
--- a/scripts/Deploy-MSBuild.ps1
+++ b/scripts/Deploy-MSBuild.ps1
@@ -69,7 +69,7 @@ else {
if ($runtime -eq "Desktop") {
$targetFramework = "net472"
} else {
- $targetFramework = "net67.0"
+ $targetFramework = "net7.0"
}
$bootstrapBinDirectory = "artifacts\bin\MSBuild.Bootstrap\$configuration\$targetFramework"
From 5dad33d0eb170b40145a3dd195ccff96dfc218a3 Mon Sep 17 00:00:00 2001
From: Ben Villalobos <4691428+BenVillalobos@users.noreply.github.com>
Date: Tue, 26 Jul 2022 15:15:38 -0700
Subject: [PATCH 05/26] Remove shipped api's causing errors, place them in
unshipped apis
---
.../PublicAPI/netstandard/PublicAPI.Shipped.txt | 12 ------------
.../PublicAPI/netstandard/PublicAPI.Unshipped.txt | 12 ++++++++++++
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/Tasks/PublicAPI/netstandard/PublicAPI.Shipped.txt b/src/Tasks/PublicAPI/netstandard/PublicAPI.Shipped.txt
index 942972d067e..2b8d77d2d6b 100644
--- a/src/Tasks/PublicAPI/netstandard/PublicAPI.Shipped.txt
+++ b/src/Tasks/PublicAPI/netstandard/PublicAPI.Shipped.txt
@@ -1320,7 +1320,6 @@ Microsoft.Build.Tasks.Hosting.IVbcHostObject3.SetLanguageVersion(string language
Microsoft.Build.Tasks.Hosting.IVbcHostObject4
Microsoft.Build.Tasks.Hosting.IVbcHostObject4.SetVBRuntime(string VBRuntime) -> bool
Microsoft.Build.Tasks.Hosting.IVbcHostObject5
-Microsoft.Build.Tasks.Hosting.IVbcHostObject5.CompileAsync(out System.IntPtr buildSucceededEvent, out System.IntPtr buildFailedEvent) -> int
Microsoft.Build.Tasks.Hosting.IVbcHostObject5.EndCompile(bool buildSuccess) -> int
Microsoft.Build.Tasks.Hosting.IVbcHostObject5.GetFreeThreadedHostObject() -> Microsoft.Build.Tasks.Hosting.IVbcHostObjectFreeThreaded
Microsoft.Build.Tasks.Hosting.IVbcHostObject5.SetHighEntropyVA(bool highEntropyVA) -> bool
@@ -1329,25 +1328,14 @@ Microsoft.Build.Tasks.Hosting.IVbcHostObject5.SetSubsystemVersion(string subsyst
Microsoft.Build.Tasks.Hosting.IVbcHostObjectFreeThreaded
Microsoft.Build.Tasks.Hosting.IVbcHostObjectFreeThreaded.Compile() -> bool
Microsoft.Build.Tasks.IFixedTypeInfo
-Microsoft.Build.Tasks.IFixedTypeInfo.AddressOfMember(int memid, System.Runtime.InteropServices.ComTypes.INVOKEKIND invKind, out System.IntPtr ppv) -> void
Microsoft.Build.Tasks.IFixedTypeInfo.CreateInstance(object pUnkOuter, ref System.Guid riid, out object ppvObj) -> void
Microsoft.Build.Tasks.IFixedTypeInfo.GetContainingTypeLib(out System.Runtime.InteropServices.ComTypes.ITypeLib ppTLB, out int pIndex) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.GetDllEntry(int memid, System.Runtime.InteropServices.ComTypes.INVOKEKIND invKind, System.IntPtr pBstrDllName, System.IntPtr pBstrName, System.IntPtr pwOrdinal) -> void
Microsoft.Build.Tasks.IFixedTypeInfo.GetDocumentation(int index, out string strName, out string strDocString, out int dwHelpContext, out string strHelpFile) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.GetFuncDesc(int index, out System.IntPtr ppFuncDesc) -> void
Microsoft.Build.Tasks.IFixedTypeInfo.GetIDsOfNames(string[] rgszNames, int cNames, int[] pMemId) -> void
Microsoft.Build.Tasks.IFixedTypeInfo.GetImplTypeFlags(int index, out System.Runtime.InteropServices.ComTypes.IMPLTYPEFLAGS pImplTypeFlags) -> void
Microsoft.Build.Tasks.IFixedTypeInfo.GetMops(int memid, out string pBstrMops) -> void
Microsoft.Build.Tasks.IFixedTypeInfo.GetNames(int memid, string[] rgBstrNames, int cMaxNames, out int pcNames) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.GetRefTypeInfo(System.IntPtr hRef, out Microsoft.Build.Tasks.IFixedTypeInfo ppTI) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.GetRefTypeOfImplType(int index, out System.IntPtr href) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.GetTypeAttr(out System.IntPtr ppTypeAttr) -> void
Microsoft.Build.Tasks.IFixedTypeInfo.GetTypeComp(out System.Runtime.InteropServices.ComTypes.ITypeComp ppTComp) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.GetVarDesc(int index, out System.IntPtr ppVarDesc) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.Invoke(object pvInstance, int memid, short wFlags, ref System.Runtime.InteropServices.ComTypes.DISPPARAMS pDispParams, System.IntPtr pVarResult, System.IntPtr pExcepInfo, out int puArgErr) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.ReleaseFuncDesc(System.IntPtr pFuncDesc) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.ReleaseTypeAttr(System.IntPtr pTypeAttr) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.ReleaseVarDesc(System.IntPtr pVarDesc) -> void
Microsoft.Build.Tasks.LC
Microsoft.Build.Tasks.LC.LC() -> void
Microsoft.Build.Tasks.LC.LicenseTarget.get -> Microsoft.Build.Framework.ITaskItem
diff --git a/src/Tasks/PublicAPI/netstandard/PublicAPI.Unshipped.txt b/src/Tasks/PublicAPI/netstandard/PublicAPI.Unshipped.txt
index e69de29bb2d..fff8535fc09 100644
--- a/src/Tasks/PublicAPI/netstandard/PublicAPI.Unshipped.txt
+++ b/src/Tasks/PublicAPI/netstandard/PublicAPI.Unshipped.txt
@@ -0,0 +1,12 @@
+Microsoft.Build.Tasks.Hosting.IVbcHostObject5.CompileAsync(out System.IntPtr buildSucceededEvent, out System.IntPtr buildFailedEvent) -> int
+Microsoft.Build.Tasks.IFixedTypeInfo.AddressOfMember(int memid, System.Runtime.InteropServices.ComTypes.INVOKEKIND invKind, out System.IntPtr ppv) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.GetDllEntry(int memid, System.Runtime.InteropServices.ComTypes.INVOKEKIND invKind, System.IntPtr pBstrDllName, System.IntPtr pBstrName, System.IntPtr pwOrdinal) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.GetFuncDesc(int index, out System.IntPtr ppFuncDesc) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.GetRefTypeInfo(System.IntPtr hRef, out Microsoft.Build.Tasks.IFixedTypeInfo ppTI) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.GetRefTypeOfImplType(int index, out System.IntPtr href) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.GetTypeAttr(out System.IntPtr ppTypeAttr) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.GetVarDesc(int index, out System.IntPtr ppVarDesc) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.Invoke(object pvInstance, int memid, short wFlags, ref System.Runtime.InteropServices.ComTypes.DISPPARAMS pDispParams, System.IntPtr pVarResult, System.IntPtr pExcepInfo, out int puArgErr) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.ReleaseFuncDesc(System.IntPtr pFuncDesc) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.ReleaseTypeAttr(System.IntPtr pTypeAttr) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.ReleaseVarDesc(System.IntPtr pVarDesc) -> void
\ No newline at end of file
From 0da734e94514e3cf1fb907d120a611791952346b Mon Sep 17 00:00:00 2001
From: Ben Villalobos <4691428+BenVillalobos@users.noreply.github.com>
Date: Tue, 26 Jul 2022 15:28:22 -0700
Subject: [PATCH 06/26] Do public interfaces need their functions marked as
public???
---
src/Tasks/IVbcHostObject5.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Tasks/IVbcHostObject5.cs b/src/Tasks/IVbcHostObject5.cs
index bbf959e4f68..75b483b17cb 100644
--- a/src/Tasks/IVbcHostObject5.cs
+++ b/src/Tasks/IVbcHostObject5.cs
@@ -20,7 +20,7 @@ public interface IVbcHostObject5 : IVbcHostObject4
{
IVbcHostObjectFreeThreaded GetFreeThreadedHostObject();
[PreserveSig]
- int CompileAsync(out IntPtr buildSucceededEvent, out IntPtr buildFailedEvent);
+ public int CompileAsync(out IntPtr buildSucceededEvent, out IntPtr buildFailedEvent);
[PreserveSig]
int EndCompile(bool buildSuccess);
From c026de805bb936d1d622bd06000c670bcae13591 Mon Sep 17 00:00:00 2001
From: Ben Villalobos <4691428+BenVillalobos@users.noreply.github.com>
Date: Wed, 27 Jul 2022 11:07:46 -0700
Subject: [PATCH 07/26] Ignore analyzer warnings, for now
---
Directory.Build.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Directory.Build.props b/Directory.Build.props
index 3a959f894ae..3ce5a3d5ce1 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -38,7 +38,7 @@
SYSLIB0011: Removing binary formatter will happen as part of a larger .NET-wide effort.
-->
- $(NoWarn);NU1603;NU5105;1701;1702;SYSLIB0011;SYSLIB0037;SYSLIB0044
+ $(NoWarn);NU1603;NU5105;1701;1702;SYSLIB0011;SYSLIB0037;SYSLIB0044;RS0016;RS0017
From e25c75598aa4033a0d7349a8108fe18d2b873488 Mon Sep 17 00:00:00 2001
From: Ben Villalobos <4691428+BenVillalobos@users.noreply.github.com>
Date: Fri, 12 Aug 2022 16:23:52 -0700
Subject: [PATCH 08/26] Revert "Remove shipped api's causing errors, place them
in unshipped apis"
This reverts commit 5dad33d0eb170b40145a3dd195ccff96dfc218a3.
---
.../PublicAPI/netstandard/PublicAPI.Shipped.txt | 12 ++++++++++++
.../PublicAPI/netstandard/PublicAPI.Unshipped.txt | 14 --------------
2 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/src/Tasks/PublicAPI/netstandard/PublicAPI.Shipped.txt b/src/Tasks/PublicAPI/netstandard/PublicAPI.Shipped.txt
index 2b8d77d2d6b..942972d067e 100644
--- a/src/Tasks/PublicAPI/netstandard/PublicAPI.Shipped.txt
+++ b/src/Tasks/PublicAPI/netstandard/PublicAPI.Shipped.txt
@@ -1320,6 +1320,7 @@ Microsoft.Build.Tasks.Hosting.IVbcHostObject3.SetLanguageVersion(string language
Microsoft.Build.Tasks.Hosting.IVbcHostObject4
Microsoft.Build.Tasks.Hosting.IVbcHostObject4.SetVBRuntime(string VBRuntime) -> bool
Microsoft.Build.Tasks.Hosting.IVbcHostObject5
+Microsoft.Build.Tasks.Hosting.IVbcHostObject5.CompileAsync(out System.IntPtr buildSucceededEvent, out System.IntPtr buildFailedEvent) -> int
Microsoft.Build.Tasks.Hosting.IVbcHostObject5.EndCompile(bool buildSuccess) -> int
Microsoft.Build.Tasks.Hosting.IVbcHostObject5.GetFreeThreadedHostObject() -> Microsoft.Build.Tasks.Hosting.IVbcHostObjectFreeThreaded
Microsoft.Build.Tasks.Hosting.IVbcHostObject5.SetHighEntropyVA(bool highEntropyVA) -> bool
@@ -1328,14 +1329,25 @@ Microsoft.Build.Tasks.Hosting.IVbcHostObject5.SetSubsystemVersion(string subsyst
Microsoft.Build.Tasks.Hosting.IVbcHostObjectFreeThreaded
Microsoft.Build.Tasks.Hosting.IVbcHostObjectFreeThreaded.Compile() -> bool
Microsoft.Build.Tasks.IFixedTypeInfo
+Microsoft.Build.Tasks.IFixedTypeInfo.AddressOfMember(int memid, System.Runtime.InteropServices.ComTypes.INVOKEKIND invKind, out System.IntPtr ppv) -> void
Microsoft.Build.Tasks.IFixedTypeInfo.CreateInstance(object pUnkOuter, ref System.Guid riid, out object ppvObj) -> void
Microsoft.Build.Tasks.IFixedTypeInfo.GetContainingTypeLib(out System.Runtime.InteropServices.ComTypes.ITypeLib ppTLB, out int pIndex) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.GetDllEntry(int memid, System.Runtime.InteropServices.ComTypes.INVOKEKIND invKind, System.IntPtr pBstrDllName, System.IntPtr pBstrName, System.IntPtr pwOrdinal) -> void
Microsoft.Build.Tasks.IFixedTypeInfo.GetDocumentation(int index, out string strName, out string strDocString, out int dwHelpContext, out string strHelpFile) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.GetFuncDesc(int index, out System.IntPtr ppFuncDesc) -> void
Microsoft.Build.Tasks.IFixedTypeInfo.GetIDsOfNames(string[] rgszNames, int cNames, int[] pMemId) -> void
Microsoft.Build.Tasks.IFixedTypeInfo.GetImplTypeFlags(int index, out System.Runtime.InteropServices.ComTypes.IMPLTYPEFLAGS pImplTypeFlags) -> void
Microsoft.Build.Tasks.IFixedTypeInfo.GetMops(int memid, out string pBstrMops) -> void
Microsoft.Build.Tasks.IFixedTypeInfo.GetNames(int memid, string[] rgBstrNames, int cMaxNames, out int pcNames) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.GetRefTypeInfo(System.IntPtr hRef, out Microsoft.Build.Tasks.IFixedTypeInfo ppTI) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.GetRefTypeOfImplType(int index, out System.IntPtr href) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.GetTypeAttr(out System.IntPtr ppTypeAttr) -> void
Microsoft.Build.Tasks.IFixedTypeInfo.GetTypeComp(out System.Runtime.InteropServices.ComTypes.ITypeComp ppTComp) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.GetVarDesc(int index, out System.IntPtr ppVarDesc) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.Invoke(object pvInstance, int memid, short wFlags, ref System.Runtime.InteropServices.ComTypes.DISPPARAMS pDispParams, System.IntPtr pVarResult, System.IntPtr pExcepInfo, out int puArgErr) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.ReleaseFuncDesc(System.IntPtr pFuncDesc) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.ReleaseTypeAttr(System.IntPtr pTypeAttr) -> void
+Microsoft.Build.Tasks.IFixedTypeInfo.ReleaseVarDesc(System.IntPtr pVarDesc) -> void
Microsoft.Build.Tasks.LC
Microsoft.Build.Tasks.LC.LC() -> void
Microsoft.Build.Tasks.LC.LicenseTarget.get -> Microsoft.Build.Framework.ITaskItem
diff --git a/src/Tasks/PublicAPI/netstandard/PublicAPI.Unshipped.txt b/src/Tasks/PublicAPI/netstandard/PublicAPI.Unshipped.txt
index d1b1f84dff5..e69de29bb2d 100644
--- a/src/Tasks/PublicAPI/netstandard/PublicAPI.Unshipped.txt
+++ b/src/Tasks/PublicAPI/netstandard/PublicAPI.Unshipped.txt
@@ -1,14 +0,0 @@
-Microsoft.Build.Tasks.Hosting.IVbcHostObject5.CompileAsync(out System.IntPtr buildSucceededEvent, out System.IntPtr buildFailedEvent) -> int
-Microsoft.Build.Tasks.IFixedTypeInfo.AddressOfMember(int memid, System.Runtime.InteropServices.ComTypes.INVOKEKIND invKind, out System.IntPtr ppv) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.GetDllEntry(int memid, System.Runtime.InteropServices.ComTypes.INVOKEKIND invKind, System.IntPtr pBstrDllName, System.IntPtr pBstrName, System.IntPtr pwOrdinal) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.GetFuncDesc(int index, out System.IntPtr ppFuncDesc) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.GetRefTypeInfo(System.IntPtr hRef, out Microsoft.Build.Tasks.IFixedTypeInfo ppTI) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.GetRefTypeOfImplType(int index, out System.IntPtr href) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.GetTypeAttr(out System.IntPtr ppTypeAttr) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.GetVarDesc(int index, out System.IntPtr ppVarDesc) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.Invoke(object pvInstance, int memid, short wFlags, ref System.Runtime.InteropServices.ComTypes.DISPPARAMS pDispParams, System.IntPtr pVarResult, System.IntPtr pExcepInfo, out int puArgErr) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.ReleaseFuncDesc(System.IntPtr pFuncDesc) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.ReleaseTypeAttr(System.IntPtr pTypeAttr) -> void
-Microsoft.Build.Tasks.IFixedTypeInfo.ReleaseVarDesc(System.IntPtr pVarDesc) -> void
-Microsoft.Build.Tasks.XslTransformation.PreserveWhitespace.get -> bool
-Microsoft.Build.Tasks.XslTransformation.PreserveWhitespace.set -> void
From 56f78e9a47b48980bc7601430f8e266a03f0999f Mon Sep 17 00:00:00 2001
From: Ben Villalobos <4691428+BenVillalobos@users.noreply.github.com>
Date: Mon, 15 Aug 2022 15:25:07 -0700
Subject: [PATCH 09/26] Workaround CS8347 & update to C# 11
---
src/StringTools/InternableString.cs | 2 +-
src/StringTools/StringTools.csproj | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/StringTools/InternableString.cs b/src/StringTools/InternableString.cs
index f04d2a9e931..6a2bbcc3473 100644
--- a/src/StringTools/InternableString.cs
+++ b/src/StringTools/InternableString.cs
@@ -33,7 +33,7 @@ public ref struct Enumerator
///
private int _charIndex;
- internal Enumerator(ref InternableString str)
+ internal Enumerator(scoped ref InternableString str)
{
_string = str;
_spanIndex = -1;
diff --git a/src/StringTools/StringTools.csproj b/src/StringTools/StringTools.csproj
index fb76d610862..a5424544205 100644
--- a/src/StringTools/StringTools.csproj
+++ b/src/StringTools/StringTools.csproj
@@ -6,7 +6,7 @@
true
true
true
- 8.0
+ 11.0
Microsoft.NET.StringTools
true
From f52d41aca6ec3baaaf66aa488e254ea01535277a Mon Sep 17 00:00:00 2001
From: Ben Villalobos <4691428+BenVillalobos@users.noreply.github.com>
Date: Tue, 16 Aug 2022 15:35:15 -0700
Subject: [PATCH 10/26] Update net compilers toolset & use langversion 11.0
---
eng/Versions.props | 2 +-
src/StringTools/InternableString.Simple.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/eng/Versions.props b/eng/Versions.props
index 4fe264d8fce..8bac92bd761 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -45,7 +45,7 @@
6.0.0-beta.22362.2
6.0.0-preview.2.21154.6
6.0.0
- 4.3.0-3.22329.30
+ 4.4.0-1.final
6.2.0-rc.146
6.0.0
6.0.0
diff --git a/src/StringTools/InternableString.Simple.cs b/src/StringTools/InternableString.Simple.cs
index 88126da5c6f..39c867fea9f 100644
--- a/src/StringTools/InternableString.Simple.cs
+++ b/src/StringTools/InternableString.Simple.cs
@@ -51,7 +51,7 @@ public ref struct Enumerator
///
private int _charIndex;
- public Enumerator(ref InternableString spanBuilder)
+ public Enumerator(scoped ref InternableString spanBuilder)
{
_string = spanBuilder;
_charIndex = -1;
From 85ab2996013a2cbeedf42fd128817499294652ce Mon Sep 17 00:00:00 2001
From: Ben Villalobos <4691428+BenVillalobos@users.noreply.github.com>
Date: Wed, 17 Aug 2022 12:00:34 -0700
Subject: [PATCH 11/26] Compiler toolset does not have net7.0
---
src/Tasks/Microsoft.Build.Tasks.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Tasks/Microsoft.Build.Tasks.csproj b/src/Tasks/Microsoft.Build.Tasks.csproj
index 54707593938..5bd98bfbe0c 100644
--- a/src/Tasks/Microsoft.Build.Tasks.csproj
+++ b/src/Tasks/Microsoft.Build.Tasks.csproj
@@ -1013,7 +1013,7 @@
-
+
From 8ca87bb5e150e0a1419986397d512d2e528862bd Mon Sep 17 00:00:00 2001
From: Ben Villalobos <4691428+BenVillalobos@users.noreply.github.com>
Date: Wed, 17 Aug 2022 14:04:55 -0700
Subject: [PATCH 12/26] Revert "Do public interfaces need their functions
marked as public???"
This reverts commit 0da734e94514e3cf1fb907d120a611791952346b.
---
src/Tasks/IVbcHostObject5.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Tasks/IVbcHostObject5.cs b/src/Tasks/IVbcHostObject5.cs
index 75b483b17cb..bbf959e4f68 100644
--- a/src/Tasks/IVbcHostObject5.cs
+++ b/src/Tasks/IVbcHostObject5.cs
@@ -20,7 +20,7 @@ public interface IVbcHostObject5 : IVbcHostObject4
{
IVbcHostObjectFreeThreaded GetFreeThreadedHostObject();
[PreserveSig]
- public int CompileAsync(out IntPtr buildSucceededEvent, out IntPtr buildFailedEvent);
+ int CompileAsync(out IntPtr buildSucceededEvent, out IntPtr buildFailedEvent);
[PreserveSig]
int EndCompile(bool buildSuccess);
From 2151902098b54cf156725dd65b7c760dd0d386a0 Mon Sep 17 00:00:00 2001
From: Ben Villalobos <4691428+BenVillalobos@users.noreply.github.com>
Date: Wed, 17 Aug 2022 14:22:06 -0700
Subject: [PATCH 13/26] Revert "Add nowarn for SYSLIB warnings"
This reverts commit 40b07d3eab84b5dffc7fa73662578cf6f5084bfe.
---
Directory.Build.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Directory.Build.props b/Directory.Build.props
index 3ce5a3d5ce1..0df28a5b8b2 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -38,7 +38,7 @@
SYSLIB0011: Removing binary formatter will happen as part of a larger .NET-wide effort.
-->
- $(NoWarn);NU1603;NU5105;1701;1702;SYSLIB0011;SYSLIB0037;SYSLIB0044;RS0016;RS0017
+ $(NoWarn);NU1603;NU5105;1701;1702;SYSLIB0011
From e878f083b21a6883a57280a9924f1ac6987638cb Mon Sep 17 00:00:00 2001
From: Ben Villalobos <4691428+BenVillalobos@users.noreply.github.com>
Date: Fri, 19 Aug 2022 12:54:29 -0700
Subject: [PATCH 14/26] Revert "Revert "Add nowarn for SYSLIB warnings""
This reverts commit 2151902098b54cf156725dd65b7c760dd0d386a0.
---
Directory.Build.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Directory.Build.props b/Directory.Build.props
index 0df28a5b8b2..3ce5a3d5ce1 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -38,7 +38,7 @@
SYSLIB0011: Removing binary formatter will happen as part of a larger .NET-wide effort.
-->
- $(NoWarn);NU1603;NU5105;1701;1702;SYSLIB0011
+ $(NoWarn);NU1603;NU5105;1701;1702;SYSLIB0011;SYSLIB0037;SYSLIB0044;RS0016;RS0017
From 36cb62cec9f4344025b5d6da6df84c8da8368db7 Mon Sep 17 00:00:00 2001
From: Ben Villalobos <4691428+BenVillalobos@users.noreply.github.com>
Date: Fri, 19 Aug 2022 16:03:24 -0700
Subject: [PATCH 15/26] One property to rule them all
---
Directory.Build.props | 12 ++++++++++++
eng/BootStrapMSBuild.targets | 2 +-
.../Microsoft.Build.Engine.UnitTests.csproj | 4 ++--
src/Build/Microsoft.Build.csproj | 2 +-
src/Directory.BeforeCommon.targets | 2 +-
src/Directory.Build.props | 4 ++--
src/MSBuild.Bootstrap/MSBuild.Bootstrap.csproj | 2 +-
src/Package/Localization/Localization.csproj | 2 +-
.../ProjectCachePlugin/ProjectCachePlugin.csproj | 4 ++--
9 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/Directory.Build.props b/Directory.Build.props
index 3ce5a3d5ce1..aea5d30a0de 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -14,6 +14,18 @@
net472
+
+
+ net7.0
diff --git a/eng/BootStrapMSBuild.targets b/eng/BootStrapMSBuild.targets
index 4ba21444d67..7b23330685f 100644
--- a/eng/BootStrapMSBuild.targets
+++ b/eng/BootStrapMSBuild.targets
@@ -210,7 +210,7 @@
Copy it from "next to MSBuild" in the pre-bootstrap SDK to our little weirdo bootstrap
layout next to the SDK tasks, so it can get loaded by the SDK tasks that need it. -->
+ DestinationFolder="$(BootstrapDestination)Sdks\Microsoft.NET.Sdk\tools\$(LatestDotNetCoreForMSBuild)" />
diff --git a/src/Build.UnitTests/Microsoft.Build.Engine.UnitTests.csproj b/src/Build.UnitTests/Microsoft.Build.Engine.UnitTests.csproj
index 83a4382d8ed..d017ffbe1cc 100644
--- a/src/Build.UnitTests/Microsoft.Build.Engine.UnitTests.csproj
+++ b/src/Build.UnitTests/Microsoft.Build.Engine.UnitTests.csproj
@@ -36,14 +36,14 @@
TargetFramework=$(FullFrameworkTFM)
TargetFramework=$(FullFrameworkTFM)
- TargetFramework=net7.0
+ TargetFramework=$(LatestDotNetCoreForMSBuild)
TargetFramework=$(FullFrameworkTFM)
TargetFramework=$(FullFrameworkTFM)
- TargetFramework=net7.0
+ TargetFramework=$(LatestDotNetCoreForMSBuild)
diff --git a/src/Build/Microsoft.Build.csproj b/src/Build/Microsoft.Build.csproj
index 418d16140f9..7ec2ec46738 100644
--- a/src/Build/Microsoft.Build.csproj
+++ b/src/Build/Microsoft.Build.csproj
@@ -4,7 +4,7 @@
- $(FullFrameworkTFM);net7.0
+ $(FullFrameworkTFM);$(LatestDotNetCoreForMSBuild)
$(RuntimeOutputTargetFrameworks)
Microsoft.Build
Microsoft.Build
diff --git a/src/Directory.BeforeCommon.targets b/src/Directory.BeforeCommon.targets
index 67ae24a57ff..a9a3c18801d 100644
--- a/src/Directory.BeforeCommon.targets
+++ b/src/Directory.BeforeCommon.targets
@@ -93,7 +93,7 @@
$(DefineConstants);FEATURE_SYMLINK_TARGET
-
+
$(DefineConstants);FEATURE_PIPEOPTIONS_CURRENTUSERONLY
$(DefineConstants);FEATURE_NODE_REUSE
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 6e12f1557f7..ee0ec04823f 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -30,8 +30,8 @@
AnyCPU;x64;arm64
- $(FullFrameworkTFM);net7.0;netstandard2.0
- net7.0;netstandard2.0
+ $(FullFrameworkTFM);$(LatestDotNetCoreForMSBuild);netstandard2.0
+ $(LatestDotNetCoreForMSBuild);netstandard2.0
$(FullFrameworkTFM);netstandard2.0
AnyCPU
diff --git a/src/MSBuild.Bootstrap/MSBuild.Bootstrap.csproj b/src/MSBuild.Bootstrap/MSBuild.Bootstrap.csproj
index 4766c041881..bdd2f2e19c5 100644
--- a/src/MSBuild.Bootstrap/MSBuild.Bootstrap.csproj
+++ b/src/MSBuild.Bootstrap/MSBuild.Bootstrap.csproj
@@ -43,7 +43,7 @@
-
+
diff --git a/src/Package/Localization/Localization.csproj b/src/Package/Localization/Localization.csproj
index e6c8a82eeaf..e1ecca1aab4 100644
--- a/src/Package/Localization/Localization.csproj
+++ b/src/Package/Localization/Localization.csproj
@@ -1,6 +1,6 @@
- net7.0
+ $(LatestDotNetCoreForMSBuild)
net472
Microsoft.Build.Localization.nuspec
false
diff --git a/src/Samples/ProjectCachePlugin/ProjectCachePlugin.csproj b/src/Samples/ProjectCachePlugin/ProjectCachePlugin.csproj
index 0e37d41d98e..3c6a05caadc 100644
--- a/src/Samples/ProjectCachePlugin/ProjectCachePlugin.csproj
+++ b/src/Samples/ProjectCachePlugin/ProjectCachePlugin.csproj
@@ -4,8 +4,8 @@
false
false
- net7.0
- $(FullFrameworkTFM);net7.0
+ $(LatestDotNetCoreForMSBuild)
+ $(FullFrameworkTFM);$(LatestDotNetCoreForMSBuild)
$(RuntimeOutputTargetFrameworks)
From 261cf97dab772c3b114e407b76a7ba2e95fce4a5 Mon Sep 17 00:00:00 2001
From: Ben Villalobos <4691428+BenVillalobos@users.noreply.github.com>
Date: Mon, 22 Aug 2022 11:51:24 -0700
Subject: [PATCH 16/26] Document new NoWarns
---
Directory.Build.props | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Directory.Build.props b/Directory.Build.props
index aea5d30a0de..21b6d6694f2 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -48,9 +48,11 @@
CS1701 and CS1702 are by default ignored by Microsoft.NET.Sdk, but if you define the NoWarn property in Directory.Build.props,
you don't get those defaults.
SYSLIB0011: Removing binary formatter will happen as part of a larger .NET-wide effort.
+ SYSLIB0037 & SYSLIB0044: The deprecated AssemblyName members could require a bigger refactor for us: https://github.com/dotnet/msbuild/issues/7902
+ RS0016 & RS0017: Roslyn analyzers seem to be bugged, claiming that API's that exist don't and vise-versa: https://github.com/dotnet/msbuild/issues/7903
-->
- $(NoWarn);NU1603;NU5105;1701;1702;SYSLIB0011;SYSLIB0037;SYSLIB0044;RS0016;RS0017
+ $(NoWarn);NU1603;NU5105;1701;1702;SYSLIB0011;SYSLIB0037;SYSLIB0044;RS0016;RS0017;
From f11ee627b7d7853148d04f48f0e6a8d32be2c915 Mon Sep 17 00:00:00 2001
From: Ben Villalobos <4691428+BenVillalobos@users.noreply.github.com>
Date: Mon, 22 Aug 2022 11:51:42 -0700
Subject: [PATCH 17/26] Add API's that were removed
---
src/Tasks/PublicAPI/netstandard/PublicAPI.Unshipped.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/Tasks/PublicAPI/netstandard/PublicAPI.Unshipped.txt b/src/Tasks/PublicAPI/netstandard/PublicAPI.Unshipped.txt
index e69de29bb2d..68779602973 100644
--- a/src/Tasks/PublicAPI/netstandard/PublicAPI.Unshipped.txt
+++ b/src/Tasks/PublicAPI/netstandard/PublicAPI.Unshipped.txt
@@ -0,0 +1,2 @@
+Microsoft.Build.Tasks.XslTransformation.PreserveWhitespace.get -> bool
+Microsoft.Build.Tasks.XslTransformation.PreserveWhitespace.set -> void
\ No newline at end of file
From 6db9faf88d18dcaba81597fcc767b62645c9e870 Mon Sep 17 00:00:00 2001
From: Ben Villalobos <4691428+BenVillalobos@users.noreply.github.com>
Date: Mon, 22 Aug 2022 12:13:27 -0700
Subject: [PATCH 18/26] Keep stringtools on latest
---
src/StringTools/StringTools.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/StringTools/StringTools.csproj b/src/StringTools/StringTools.csproj
index a5424544205..ea30adf57fd 100644
--- a/src/StringTools/StringTools.csproj
+++ b/src/StringTools/StringTools.csproj
@@ -6,7 +6,7 @@
true
true
true
- 11.0
+ latest
Microsoft.NET.StringTools
true
From 1f066caa45809d1e97f61ef3675f7bbd9ece3eee Mon Sep 17 00:00:00 2001
From: Ben Villalobos <4691428+BenVillalobos@users.noreply.github.com>
Date: Mon, 22 Aug 2022 12:15:24 -0700
Subject: [PATCH 19/26] Leave context comment for scoped refs
---
src/StringTools/InternableString.Simple.cs | 1 +
src/StringTools/InternableString.cs | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/StringTools/InternableString.Simple.cs b/src/StringTools/InternableString.Simple.cs
index 39c867fea9f..296365717a8 100644
--- a/src/StringTools/InternableString.Simple.cs
+++ b/src/StringTools/InternableString.Simple.cs
@@ -51,6 +51,7 @@ public ref struct Enumerator
///
private int _charIndex;
+ // https://github.com/dotnet/msbuild/pull/7790#issuecomment-1213603253
public Enumerator(scoped ref InternableString spanBuilder)
{
_string = spanBuilder;
diff --git a/src/StringTools/InternableString.cs b/src/StringTools/InternableString.cs
index 6a2bbcc3473..1076c26d24e 100644
--- a/src/StringTools/InternableString.cs
+++ b/src/StringTools/InternableString.cs
@@ -33,6 +33,7 @@ public ref struct Enumerator
///
private int _charIndex;
+ // https://github.com/dotnet/msbuild/pull/7790#issuecomment-1213603253
internal Enumerator(scoped ref InternableString str)
{
_string = str;
From 5227adc809b1a98e0583922e2d70e2183f00a8cd Mon Sep 17 00:00:00 2001
From: Rainer Sigwald
Date: Fri, 16 Sep 2022 14:00:51 -0500
Subject: [PATCH 20/26] Avoid SYSLIB0045 errors on core
The hash-creation overloads that take a string are obsolete as of
.NET 7 RC1. Introduce `FEATURE_CRYPTOGRAPHIC_FACTORY_ALGORITHM_NAMES` to
avoid using them but preserve .NET Framework behavior exactly.
---
src/Directory.BeforeCommon.targets | 1 +
.../BootstrapperUtil/BootstrapperBuilder.cs | 6 ++++-
src/Tasks/ManifestUtil/Util.cs | 12 ++++++++--
src/Tasks/ManifestUtil/mansign2.cs | 24 +++++++++++++++----
4 files changed, 36 insertions(+), 7 deletions(-)
diff --git a/src/Directory.BeforeCommon.targets b/src/Directory.BeforeCommon.targets
index a9a3c18801d..d136a2607c9 100644
--- a/src/Directory.BeforeCommon.targets
+++ b/src/Directory.BeforeCommon.targets
@@ -25,6 +25,7 @@
$(DefineConstants);FEATURE_COMPILE_IN_TESTS
$(DefineConstants);FEATURE_CONSTRAINED_EXECUTION
$(DefineConstants);FEATURE_CODETASKFACTORY
+ $(DefineConstants);FEATURE_CRYPTOGRAPHIC_FACTORY_ALGORITHM_NAMES
$(DefineConstants);FEATURE_CULTUREINFO_GETCULTURES
$(DefineConstants);FEATURE_ENCODING_DEFAULT
$(DefineConstants);FEATURE_ENVIRONMENT_SYSTEMDIRECTORY
diff --git a/src/Tasks/BootstrapperUtil/BootstrapperBuilder.cs b/src/Tasks/BootstrapperUtil/BootstrapperBuilder.cs
index b8960252b8a..ce5faa9fb28 100644
--- a/src/Tasks/BootstrapperUtil/BootstrapperBuilder.cs
+++ b/src/Tasks/BootstrapperUtil/BootstrapperBuilder.cs
@@ -1645,7 +1645,11 @@ private static string GetFileHash(string filePath)
// the .NET Framework we are targeting. In ideal situations, bootstrapper files will be
// pre-signed anwyay; this is a fallback in case we ever encounter a bootstrapper that is
// not signed.
- System.Security.Cryptography.SHA256 sha = System.Security.Cryptography.SHA256.Create("System.Security.Cryptography.SHA256CryptoServiceProvider");
+ System.Security.Cryptography.SHA256 sha = System.Security.Cryptography.SHA256.Create(
+#if FEATURE_CRYPTOGRAPHIC_FACTORY_ALGORITHM_NAMES
+ "System.Security.Cryptography.SHA256CryptoServiceProvider"
+#endif
+ );
using (Stream s = fi.OpenRead())
{
diff --git a/src/Tasks/ManifestUtil/Util.cs b/src/Tasks/ManifestUtil/Util.cs
index 56ba265c495..85434a45d44 100644
--- a/src/Tasks/ManifestUtil/Util.cs
+++ b/src/Tasks/ManifestUtil/Util.cs
@@ -227,11 +227,19 @@ private static void GetFileInfoImpl(string path, string targetFrameWorkVersion,
if (string.IsNullOrEmpty(targetFrameWorkVersion) || CompareFrameworkVersions(targetFrameWorkVersion, Constants.TargetFrameworkVersion40) <= 0)
{
- hashAlg = SHA1.Create("System.Security.Cryptography.SHA1CryptoServiceProvider");
+ hashAlg = SHA1.Create(
+#if FEATURE_CRYPTOGRAPHIC_FACTORY_ALGORITHM_NAMES
+ "System.Security.Cryptography.SHA1CryptoServiceProvider"
+#endif
+ );
}
else
{
- hashAlg = SHA256.Create("System.Security.Cryptography.SHA256CryptoServiceProvider");
+ hashAlg = SHA256.Create(
+#if FEATURE_CRYPTOGRAPHIC_FACTORY_ALGORITHM_NAMES
+ "System.Security.Cryptography.SHA256CryptoServiceProvider"
+#endif
+ );
}
byte[] hashBytes = hashAlg.ComputeHash(s);
hash = Convert.ToBase64String(hashBytes);
diff --git a/src/Tasks/ManifestUtil/mansign2.cs b/src/Tasks/ManifestUtil/mansign2.cs
index a5404f5b920..9c29d1cbb1d 100644
--- a/src/Tasks/ManifestUtil/mansign2.cs
+++ b/src/Tasks/ManifestUtil/mansign2.cs
@@ -555,7 +555,11 @@ private static byte[] ComputeHashFromManifest(XmlDocument manifestDom, bool oldF
if (useSha256)
{
- using (SHA256 sha2 = SHA256.Create("System.Security.Cryptography.SHA256CryptoServiceProvider"))
+ using (SHA256 sha2 = SHA256.Create(
+#if FEATURE_CRYPTOGRAPHIC_FACTORY_ALGORITHM_NAMES
+ "System.Security.Cryptography.SHA256CryptoServiceProvider"
+#endif
+ ))
{
byte[] hash = sha2.ComputeHash(exc.GetOutput() as MemoryStream);
if (hash == null)
@@ -568,7 +572,11 @@ private static byte[] ComputeHashFromManifest(XmlDocument manifestDom, bool oldF
}
else
{
- using (SHA1 sha1 = SHA1.Create("System.Security.Cryptography.SHA1CryptoServiceProvider"))
+ using (SHA1 sha1 = SHA1.Create(
+#if FEATURE_CRYPTOGRAPHIC_FACTORY_ALGORITHM_NAMES
+ "System.Security.Cryptography.SHA1CryptoServiceProvider"
+#endif
+ ))
{
byte[] hash = sha1.ComputeHash(exc.GetOutput() as MemoryStream);
if (hash == null)
@@ -603,7 +611,11 @@ private static byte[] ComputeHashFromManifest(XmlDocument manifestDom, bool oldF
if (useSha256)
{
- using (SHA256 sha2 = SHA256.Create("System.Security.Cryptography.SHA256CryptoServiceProvider"))
+ using (SHA256 sha2 = SHA256.Create(
+#if FEATURE_CRYPTOGRAPHIC_FACTORY_ALGORITHM_NAMES
+ "System.Security.Cryptography.SHA256CryptoServiceProvider"
+#endif
+ ))
{
byte[] hash = sha2.ComputeHash(exc.GetOutput() as MemoryStream);
if (hash == null)
@@ -616,7 +628,11 @@ private static byte[] ComputeHashFromManifest(XmlDocument manifestDom, bool oldF
}
else
{
- using (SHA1 sha1 = SHA1.Create("System.Security.Cryptography.SHA1CryptoServiceProvider"))
+ using (SHA1 sha1 = SHA1.Create(
+#if FEATURE_CRYPTOGRAPHIC_FACTORY_ALGORITHM_NAMES
+ "System.Security.Cryptography.SHA1CryptoServiceProvider"
+#endif
+ ))
{
byte[] hash = sha1.ComputeHash(exc.GetOutput() as MemoryStream);
if (hash == null)
From 88bacdbecb5182778ba5c0a133316cedc0101501 Mon Sep 17 00:00:00 2001
From: Rainer Sigwald
Date: Fri, 16 Sep 2022 14:02:46 -0500
Subject: [PATCH 21/26] Update to .NET 7.0.100-rc.1
---
global.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/global.json b/global.json
index c6b05988b58..2b4212cde00 100644
--- a/global.json
+++ b/global.json
@@ -3,7 +3,7 @@
"allowPrerelease": true
},
"tools": {
- "dotnet": "7.0.100-preview.5.22307.18",
+ "dotnet": "7.0.100-rc.1.22431.12",
"vs": {
"version": "17.2.1"
},
From 7754733d37dd91ef29719eb04da01357d6caff22 Mon Sep 17 00:00:00 2001
From: Rainer Sigwald
Date: Fri, 16 Sep 2022 14:09:12 -0500
Subject: [PATCH 22/26] Revert "Leave context comment for scoped refs"
This reverts commit 1f066caa45809d1e97f61ef3675f7bbd9ece3eee.
---
src/StringTools/InternableString.Simple.cs | 1 -
src/StringTools/InternableString.cs | 1 -
2 files changed, 2 deletions(-)
diff --git a/src/StringTools/InternableString.Simple.cs b/src/StringTools/InternableString.Simple.cs
index 296365717a8..39c867fea9f 100644
--- a/src/StringTools/InternableString.Simple.cs
+++ b/src/StringTools/InternableString.Simple.cs
@@ -51,7 +51,6 @@ public ref struct Enumerator
///
private int _charIndex;
- // https://github.com/dotnet/msbuild/pull/7790#issuecomment-1213603253
public Enumerator(scoped ref InternableString spanBuilder)
{
_string = spanBuilder;
diff --git a/src/StringTools/InternableString.cs b/src/StringTools/InternableString.cs
index 1076c26d24e..6a2bbcc3473 100644
--- a/src/StringTools/InternableString.cs
+++ b/src/StringTools/InternableString.cs
@@ -33,7 +33,6 @@ public ref struct Enumerator
///
private int _charIndex;
- // https://github.com/dotnet/msbuild/pull/7790#issuecomment-1213603253
internal Enumerator(scoped ref InternableString str)
{
_string = str;
From 1426184d17c55c37a1e57daecd546e3492f1ca89 Mon Sep 17 00:00:00 2001
From: Rainer Sigwald
Date: Fri, 16 Sep 2022 14:09:23 -0500
Subject: [PATCH 23/26] Revert "Keep stringtools on latest"
This reverts commit 6db9faf88d18dcaba81597fcc767b62645c9e870.
---
src/StringTools/StringTools.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/StringTools/StringTools.csproj b/src/StringTools/StringTools.csproj
index ea30adf57fd..a5424544205 100644
--- a/src/StringTools/StringTools.csproj
+++ b/src/StringTools/StringTools.csproj
@@ -6,7 +6,7 @@
true
true
true
- latest
+ 11.0
Microsoft.NET.StringTools
true
From d56006db85185a162794e6807e3211e64bc1ecb9 Mon Sep 17 00:00:00 2001
From: Rainer Sigwald
Date: Fri, 16 Sep 2022 14:12:17 -0500
Subject: [PATCH 24/26] Revert "Update net compilers toolset & use langversion
11.0"
This reverts commit f52d41aca6ec3baaaf66aa488e254ea01535277a.
---
src/StringTools/InternableString.Simple.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/StringTools/InternableString.Simple.cs b/src/StringTools/InternableString.Simple.cs
index 39c867fea9f..88126da5c6f 100644
--- a/src/StringTools/InternableString.Simple.cs
+++ b/src/StringTools/InternableString.Simple.cs
@@ -51,7 +51,7 @@ public ref struct Enumerator
///
private int _charIndex;
- public Enumerator(scoped ref InternableString spanBuilder)
+ public Enumerator(ref InternableString spanBuilder)
{
_string = spanBuilder;
_charIndex = -1;
From 2954cb0fab29664d0e714c141c8365a7de259299 Mon Sep 17 00:00:00 2001
From: Rainer Sigwald
Date: Fri, 16 Sep 2022 14:12:25 -0500
Subject: [PATCH 25/26] Revert "Workaround CS8347 & update to C# 11"
This reverts commit 56f78e9a47b48980bc7601430f8e266a03f0999f.
---
src/StringTools/InternableString.cs | 2 +-
src/StringTools/StringTools.csproj | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/StringTools/InternableString.cs b/src/StringTools/InternableString.cs
index 6a2bbcc3473..f04d2a9e931 100644
--- a/src/StringTools/InternableString.cs
+++ b/src/StringTools/InternableString.cs
@@ -33,7 +33,7 @@ public ref struct Enumerator
///
private int _charIndex;
- internal Enumerator(scoped ref InternableString str)
+ internal Enumerator(ref InternableString str)
{
_string = str;
_spanIndex = -1;
diff --git a/src/StringTools/StringTools.csproj b/src/StringTools/StringTools.csproj
index a5424544205..fb76d610862 100644
--- a/src/StringTools/StringTools.csproj
+++ b/src/StringTools/StringTools.csproj
@@ -6,7 +6,7 @@
true
true
true
- 11.0
+ 8.0
Microsoft.NET.StringTools
true
From 7db54b966202a120536cb0ecaff78252737d1f02 Mon Sep 17 00:00:00 2001
From: Rainer Sigwald
Date: Fri, 16 Sep 2022 15:45:12 -0500
Subject: [PATCH 26/26] Style: Use TKey/TValue in CollectionsHelpers
---
.../CollectionsHelpers.cs | 20 +++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/CollectionsHelpers.cs b/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/CollectionsHelpers.cs
index 83035cd5042..ea551d51ac1 100644
--- a/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/CollectionsHelpers.cs
+++ b/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/CollectionsHelpers.cs
@@ -85,32 +85,32 @@ public static IList ExportCollection(this ProjectCollectionLink
}
- public static IDictionary ImportDictionary(this ProjectCollectionLinker importer, IDictionary source)
- where T : class
- where RMock : MockLinkRemoter, new()
+ public static IDictionary ImportDictionary(this ProjectCollectionLinker importer, IDictionary source)
+ where TValue : class
+ where RMock : MockLinkRemoter, new()
{
if (source == null) return null;
// Just copy ...
- Dictionary result = new Dictionary();
+ Dictionary result = new Dictionary();
foreach (var sRemoter in source)
{
- var value = importer.Import(sRemoter.Value);
+ var value = importer.Import(sRemoter.Value);
result.Add(sRemoter.Key, value);
}
return result;
}
- public static IDictionary ExportDictionary(this ProjectCollectionLinker exporter, IDictionary source)
- where T : class
- where RMock : MockLinkRemoter, new()
+ public static IDictionary ExportDictionary(this ProjectCollectionLinker exporter, IDictionary source)
+ where TValue : class
+ where RMock : MockLinkRemoter, new()
{
if (source == null) return null;
// Just copy ...
- Dictionary result = new Dictionary();
+ Dictionary result = new Dictionary();
foreach (var s in source)
{
- var valueRemoter = exporter.Export(s.Value);
+ var valueRemoter = exporter.Export(s.Value);
result.Add(s.Key, valueRemoter);
}