-
Notifications
You must be signed in to change notification settings - Fork 1.2k
make the workload resolver only light up for the specific entrypoint SDKs we control #41268
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
Changes from all commits
38a7a62
62c28c2
cbb1a6b
ab7ca61
6fee29d
8cd126f
aeb2680
b22233a
930a84f
07fb03a
c612bc9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| <SdkResolver> | ||
| <Path>..\..\Microsoft.DotNet.MSBuildSdkResolver.dll</Path> | ||
| <ResolvableSdkPattern>Microsoft\..*|Samsung\..*|GtkSharp\..*|FSharp\.NET\.Sdk|NuGet\.Build\.Tasks\.Pack</ResolvableSdkPattern> | ||
| </SdkResolver> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| <SdkResolver> | ||
| <Path>..\..\Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.dll</Path> | ||
| <ResolvableSdkPattern>Microsoft\..*|Samsung\..*|GtkSharp\..*</ResolvableSdkPattern> | ||
| </SdkResolver> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,26 @@ | |
| <!-- Shared infra to build and use the sdk-tasks --> | ||
| <Import Project="$(RepoRoot)src\Tasks\sdk-tasks\sdk-tasks.InTree.targets" /> | ||
|
|
||
| <Target Name="GenerateLayout" Condition="'$(IsPackable)' == 'true'" DependsOnTargets="ResolveProjectReferences"> | ||
| <Target Name="_DeclareRewriteResolverXmlInputsAndOutputs"> | ||
| <PropertyGroup> | ||
| <_ResolverXmlPath>$(ArtifactsBinDir)Microsoft.DotNet.MSBuildSdkResolver\$(Configuration)\net472\SdkResolvers\Microsoft.DotNet.MSBuildSdkResolver\Microsoft.DotNet.MSBuildSdkResolver.xml</_ResolverXmlPath> | ||
| <_RewrittenResolverXmlPath>$(OutputPath)$([System.IO.Path]::GetFileName('$(_ResolverXmlPath)'))</_RewrittenResolverXmlPath> | ||
| </PropertyGroup> | ||
| </Target> | ||
|
|
||
| <Target Name="_RewriteResolverXml" DependsOnTargets="_DeclareRewriteResolverXmlInputsAndOutputs" Inputs="$(_ResolverXmlPath)" Outputs="$(_RewrittenResolverXmlPath)" Returns="@(VSMSBuildExtensionsContent)"> | ||
| <WriteLinesToFile File="$(_RewrittenResolverXmlPath)" Lines="$([System.IO.File]::ReadAllText($(_ResolverXmlPath)).Replace('..\..\',''))" Overwrite="true" WriteOnlyWhenDifferent="true" /> | ||
|
|
||
| <ItemGroup> | ||
| <!-- The generated MSBuildSdkResolver XML file is emitted to the SdkResolvers directory, but needs to be installed colocated to the dll. This is hard to do using the | ||
| templating and packing mechanisms on the above lines, so for this file specifically I've hard-coded the expected layouts. --> | ||
| <VSMSBuildExtensionsContent Include="$(_RewrittenResolverXmlPath)" | ||
| DestinationPath="$(OutputPath)\MSBuildSdkResolver\Microsoft.DotNet.MSBuildSdkResolver.xml" | ||
| PackagePath="/MSBuildSdkResolver/" /> | ||
| </ItemGroup> | ||
| </Target> | ||
|
|
||
| <Target Name="GenerateLayout" Condition="'$(IsPackable)' == 'true'" DependsOnTargets="ResolveProjectReferences;_RewriteResolverXml"> | ||
| <PropertyGroup> | ||
| <MSBuildExtensionsOutputPath>$(ArtifactsBinDir)$(Configuration)\Sdks\Microsoft.NET.Build.Extensions</MSBuildExtensionsOutputPath> | ||
| <SdkMSBuildExtensionsSwrFile>$(ArtifactsNonShippingPackagesDir)VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.swr</SdkMSBuildExtensionsSwrFile> | ||
|
|
@@ -57,20 +76,18 @@ | |
| <VSMSBuildExtensionsContent Include="$(ArtifactsBinDir)Microsoft.DotNet.MSBuildSdkResolver\$(Configuration)\net472\**\Microsoft.Deployment.DotNet.Releases*.dll" DeploymentSubpath="MSBuildSdkResolver/" /> | ||
| <VSMSBuildExtensionsContent Include="$(ArtifactsBinDir)Microsoft.DotNet.MSBuildSdkResolver\$(Configuration)\net472\**\Microsoft.DotNet.MSBuildSdkResolver*.dll" DeploymentSubpath="MSBuildSdkResolver/" /> | ||
|
|
||
| <VSMSBuildExtensionsContent Update="@(VSMSBuildExtensionsContent)"> | ||
| <DestinationPath>$(OutputPath)/%(VSMSBuildExtensionsContent.DeploymentSubpath)%(RecursiveDir)%(Filename)%(Extension)</DestinationPath> | ||
| </VSMSBuildExtensionsContent> | ||
| <VSMSBuildExtensionsContent Update="@(VSMSBuildExtensionsContent)" | ||
| DestinationPath="$([MSBuild]::ValueOrDefault(%(VSMSBuildExtensionsContent.DestinationPath), '$(OutputPath)/%(VSMSBuildExtensionsContent.DeploymentSubpath)%(RecursiveDir)%(Filename)%(Extension)'))" /> | ||
| </ItemGroup> | ||
|
|
||
| <Copy SourceFiles="@(VSMSBuildExtensionsContent)" DestinationFiles="%(VSMSBuildExtensionsContent.DestinationPath)" /> | ||
| <Copy SourceFiles="@(VSMSBuildExtensionsContent)" DestinationFiles="@(VSMSBuildExtensionsContent->'%(DestinationPath)')" /> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this change?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This coalesces the N Copy Task calls into a single call - this is way faster and the task internally handles up to date checking and such. So many people unintentionally batch over this Task, we should probably have a build check for it!
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm...batching was my first thought, but I thought it would batch in either case. Batching is confusing. |
||
|
|
||
| <GenerateMSBuildExtensionsSWR MSBuildExtensionsLayoutDirectory="$(OutputPath)" | ||
| OutputFile="$(SdkMSBuildExtensionsSwrFile)" /> | ||
| <ItemGroup> | ||
| <!-- Include the swr file in the nuget package for VS authoring --> | ||
| <Content Include="$(SdkMSBuildExtensionsSwrFile)" PackagePath="/" /> | ||
| <Content Include="@(VSMSBuildExtensionsContent)" PackagePath="/%(VSMSBuildExtensionsContent.DeploymentSubpath)%(RecursiveDir)%(Filename)%(Extension)" /> | ||
| <Content Include="@(VSMSBuildExtensionsContent)" PackagePath="$([MSBuild]::ValueOrDefault(%(VSMSBuildExtensionsContent.PackagePath), '/%(VSMSBuildExtensionsContent.DeploymentSubpath)%(RecursiveDir)%(Filename)%(Extension)'))" /> | ||
| </ItemGroup> | ||
| </Target> | ||
|
|
||
| </Target> | ||
| </Project> | ||
Uh oh!
There was an error while loading. Please reload this page.