Skip to content

Add pass 2 specifications for sdk projects #43694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions eng/Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,11 @@
<ProjectToBuild Include="$(RepoRoot)src/VirtualMonoRepo/InitializeVMR.proj" BuildInParallel="false" />
</ItemGroup>

<!-- Do not populate ProjectToBuild except when we are explicitly in a non-default pass (pass 1, DotNetBuildPass == '')
so that we get the arcade defaults for what to build. -->
<ItemGroup Condition="'$(DotNetBuildPass)' != ''">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After @jkoritzinsky's change propagates to the VMR, this should be no longer necessary

<ProjectToBuild Include="$(RepoRoot)src/Resolvers/Microsoft.DotNet.SdkResolver/Microsoft.DotNet.SdkResolver.csproj" DotNetBuildPass="2" />
<ProjectToBuild Include="$(RepoRoot)src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj" DotNetBuildPass="2" />
<ProjectToBuild Include="$(RepoRoot)src/Microsoft.DotNet.TemplateLocator/Microsoft.DotNet.TemplateLocator.csproj" DotNetBuildPass="2" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

<!--https://github.com/NuGet/Home/issues/3891#issuecomment-377319939-->
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
<!-- This project references the sdk resolver, which requires the hostxfr for multiple arches on windows. -->
<ExcludeFromDotNetBuild Condition="'$(DotNetBuildPass)' != '2'">true</ExcludeFromDotNetBuild>
</PropertyGroup>

<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="ResolveReferences">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

<!--https://github.com/NuGet/Home/issues/3891#issuecomment-377319939-->
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
<!-- This project requires the hostfxr from x86, x64 and arm64 when building on windows. -->
<ExcludeFromDotNetBuild Condition="'$(DotNetBuildPass)' != '2'">true</ExcludeFromDotNetBuild>
</PropertyGroup>

<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="ResolveReferences" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<TargetFrameworks>$(ResolverTargetFramework);net472</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">$(ResolverTargetFramework)</TargetFrameworks>
<PlatformTarget>AnyCPU</PlatformTarget>
<RuntimeIdentifiers Condition="'$(OS)' == 'Windows_NT'">win-x86;win-x64</RuntimeIdentifiers>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RootNamespace>Microsoft.DotNet.NativeWrapper</RootNamespace>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<!-- Create FileDefinitions items for ResolveHostfxrCopyLocalContent target -->
<EmitLegacyAssetsFileItems>true</EmitLegacyAssetsFileItems>
<RootNamespace>Microsoft.DotNet.DotNetSdkResolver</RootNamespace>
<!-- This project requires the hostfxr from x86 and x64 when building on windows. -->
<ExcludeFromDotNetBuild Condition="'$(DotNetBuildPass)' != '2'">true</ExcludeFromDotNetBuild>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<TargetFrameworks Condition="'$([MSBuild]::IsOSPlatform(`Windows`))' == 'false'">$(ResolverTargetFramework)</TargetFrameworks>

<PlatformTarget>AnyCPU</PlatformTarget>
<RuntimeIdentifiers Condition="$([MSBuild]::IsOSPlatform(`Windows`))">win-x86;win-x64</RuntimeIdentifiers>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>

Expand Down
Loading