Skip to content

Commit

Permalink
Merge pull request #7289 from crummel/sourceBuildPatches
Browse files Browse the repository at this point in the history
Apply source-build patches
  • Loading branch information
ladipro authored Jan 24, 2022
2 parents afb0dc9 + f1fdbcd commit 5611bb9
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
7 changes: 4 additions & 3 deletions src/Build/Microsoft.Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
<Import Project="..\Shared\DebuggingSources.proj" />

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(FullFrameworkTFM);net6.0</TargetFrameworks>
<TargetFrameworks>$(FullFrameworkTFM);net6.0</TargetFrameworks>
<TargetFrameworks Condition="'$(MonoBuild)'=='true'">$(RuntimeOutputTargetFrameworks)</TargetFrameworks>
<RootNamespace>Microsoft.Build</RootNamespace>
<AssemblyName>Microsoft.Build</AssemblyName>
Expand Down Expand Up @@ -40,8 +39,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>
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.BeforeCommon.targets
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,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>

Expand Down
3 changes: 1 addition & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@

<!-- Defaults for target frameworks and architecture -->
<LibraryTargetFrameworks>$(FullFrameworkTFM);netstandard2.0</LibraryTargetFrameworks>
<LibraryTargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">netstandard2.0</LibraryTargetFrameworks>
<LibraryTargetFrameworks Condition="'$(MonoBuild)'=='true'">$(FullFrameworkTFM)</LibraryTargetFrameworks>
<PlatformTarget>AnyCPU</PlatformTarget>

<!-- Target frameworks for Exe and unit test projects (ie projects with runtime output) -->
<RuntimeOutputTargetFrameworks>net6.0</RuntimeOutputTargetFrameworks>
<RuntimeOutputTargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(DotNetBuildFromSource)' != 'true'">$(FullFrameworkTFM);$(RuntimeOutputTargetFrameworks)</RuntimeOutputTargetFrameworks>
<RuntimeOutputTargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(FullFrameworkTFM);$(RuntimeOutputTargetFrameworks)</RuntimeOutputTargetFrameworks>
<RuntimeOutputTargetFrameworks Condition="'$(MonoBuild)' == 'true'">$(FullFrameworkTFM)</RuntimeOutputTargetFrameworks>

<!-- Don't automatically append target framework to output path, since we want to put the Platform Target beforehand, if it's not AnyCPU -->
Expand Down
1 change: 1 addition & 0 deletions src/Samples/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<EnableCentralPackageVersions>false</EnableCentralPackageVersions>

<IsShipping>false</IsShipping>
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
</PropertyGroup>

<!-- Import parent props -->
Expand Down
4 changes: 3 additions & 1 deletion src/Tasks/Microsoft.Build.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -974,8 +974,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" />
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/Microsoft.Build.Utilities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,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>

Expand Down

0 comments on commit 5611bb9

Please sign in to comment.