104 lines
5.2 KiB
Diff
104 lines
5.2 KiB
Diff
From a75f4b17c3595079f69ea00041182368adea14c9 Mon Sep 17 00:00:00 2001
|
|
From: dseefeld <dseefeld@microsoft.com>
|
|
Date: Wed, 20 Oct 2021 21:49:51 +0000
|
|
Subject: [PATCH] Remove dependency on MS.VS.Setup.Configuration.Interop
|
|
|
|
Removes prebuilts.
|
|
|
|
Background Issue: https://github.com/dotnet/source-build/issues/2542
|
|
---
|
|
eng/Packages.props | 3 ---
|
|
src/Build/Microsoft.Build.csproj | 4 +++-
|
|
src/Directory.BeforeCommon.targets | 2 +-
|
|
src/Samples/Directory.Build.props | 1 +
|
|
src/Tasks/Microsoft.Build.Tasks.csproj | 4 +++-
|
|
src/Utilities/Microsoft.Build.Utilities.csproj | 2 +-
|
|
6 files changed, 9 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/eng/Packages.props b/eng/Packages.props
|
|
index 494c9c0..7689042 100644
|
|
--- a/eng/Packages.props
|
|
+++ b/eng/Packages.props
|
|
@@ -46,9 +46,6 @@
|
|
|
|
<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
|
|
<GlobalPackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="$(MicrosoftCodeAnalysisBannedApiAnalyzersVersion)" />
|
|
- </ItemGroup>
|
|
-
|
|
- <ItemGroup>
|
|
<GlobalPackageReference Include="Microsoft.VisualStudio.SDK.EmbedInteropTypes" Version="15.0.15" PrivateAssets="All" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />
|
|
</ItemGroup>
|
|
|
|
diff --git a/src/Build/Microsoft.Build.csproj b/src/Build/Microsoft.Build.csproj
|
|
index d08e337c5..3b173aee5 100644
|
|
--- a/src/Build/Microsoft.Build.csproj
|
|
+++ b/src/Build/Microsoft.Build.csproj
|
|
@@ -38,8 +38,10 @@
|
|
<PackageReference Include="Microsoft.IO.Redist" Condition="'$(FeatureMSIORedist)' == 'true'" />
|
|
</ItemGroup>
|
|
|
|
- <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
|
|
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(DotNetBuildFromSource)' != 'true'">
|
|
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" />
|
|
+ </ItemGroup>
|
|
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
|
|
<Reference Include="System.IO.Compression" />
|
|
<PackageReference Include="System.Memory" />
|
|
</ItemGroup>
|
|
diff --git a/src/Directory.BeforeCommon.targets b/src/Directory.BeforeCommon.targets
|
|
index 913c97b12..320bffa56 100644
|
|
--- a/src/Directory.BeforeCommon.targets
|
|
+++ b/src/Directory.BeforeCommon.targets
|
|
@@ -99,7 +99,7 @@
|
|
<DefineConstants>$(DefineConstants);FEATURE_DEBUGGER</DefineConstants>
|
|
<DefineConstants Condition="'$(MachineIndependentBuild)' != 'true'">$(DefineConstants);FEATURE_WIN32_REGISTRY</DefineConstants>
|
|
<DefineConstants>$(DefineConstants);FEATURE_WORKINGSET</DefineConstants>
|
|
- <DefineConstants Condition="'$(MonoBuild)' != 'true' and '$(MachineIndependentBuild)' != 'true' and '$(TargetFrameworkVersion)' != 'v3.5'">$(DefineConstants);FEATURE_VISUALSTUDIOSETUP</DefineConstants>
|
|
+ <DefineConstants Condition="'$(MonoBuild)' != 'true' and '$(MachineIndependentBuild)' != 'true' and '$(TargetFrameworkVersion)' != 'v3.5' and '$(DotNetBuildFromSource)' != 'true'">$(DefineConstants);FEATURE_VISUALSTUDIOSETUP</DefineConstants>
|
|
<DefineConstants>$(DefineConstants);FEATURE_MSCOREE</DefineConstants>
|
|
</PropertyGroup>
|
|
|
|
diff --git a/src/Samples/Directory.Build.props b/src/Samples/Directory.Build.props
|
|
index 6b9d6cd9f..317ef14a6 100644
|
|
--- a/src/Samples/Directory.Build.props
|
|
+++ b/src/Samples/Directory.Build.props
|
|
@@ -8,6 +8,7 @@
|
|
<EnableCentralPackageVersions>false</EnableCentralPackageVersions>
|
|
|
|
<IsShipping>false</IsShipping>
|
|
+ <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
|
|
</PropertyGroup>
|
|
|
|
<!-- Import parent props -->
|
|
diff --git a/src/Tasks/Microsoft.Build.Tasks.csproj b/src/Tasks/Microsoft.Build.Tasks.csproj
|
|
index d8f81bf99..3a5514094 100644
|
|
--- a/src/Tasks/Microsoft.Build.Tasks.csproj
|
|
+++ b/src/Tasks/Microsoft.Build.Tasks.csproj
|
|
@@ -999,8 +999,10 @@
|
|
<PackageReference Include="Microsoft.Net.Compilers.Toolset" ExcludeAssets="all" Condition="'$(UsingToolMicrosoftNetCompilers)' == 'false'" />
|
|
</ItemGroup>
|
|
|
|
- <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
|
|
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(DotNetBuildFromSource)' != 'true'">
|
|
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" />
|
|
+ </ItemGroup>
|
|
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
|
|
<PackageReference Include="System.Threading.Tasks.Dataflow" />
|
|
|
|
<Content Include="$(NuGetPackageRoot)microsoft.net.compilers.toolset\$(MicrosoftNetCompilersToolsetVersion)\tasks\net472\**\*" CopyToOutputDirectory="PreserveNewest" LinkBase="Roslyn" />
|
|
diff --git a/src/Utilities/Microsoft.Build.Utilities.csproj b/src/Utilities/Microsoft.Build.Utilities.csproj
|
|
index 09634e723..72d838d9d 100644
|
|
--- a/src/Utilities/Microsoft.Build.Utilities.csproj
|
|
+++ b/src/Utilities/Microsoft.Build.Utilities.csproj
|
|
@@ -25,7 +25,7 @@
|
|
<PackageReference Include="System.Configuration.ConfigurationManager" />
|
|
</ItemGroup>
|
|
|
|
- <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETStandard'">
|
|
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETStandard' and '$(DotNetBuildFromSource)' != 'true'">
|
|
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" />
|
|
</ItemGroup>
|
|
|
|
--
|
|
2.31.1
|
|
|