-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add workload SDK resolver project * Import workload props and targets * Resolve workload manifests and packs from dotnet root * Resolve workload manifests on .NET Framework * Read workload manifest from XML * Include workload resolver in MSBuildSdkResolver * Update to new workload manifest reader APIs, compile with MSBuild SDK resolver * Switch to sdk-manifests folder * Don't crash on workload manifest folder without manifest * Add test workloads to layout * Add workload tests * Code review feedback * Put workload resolution behind feature flag * Use MSBuild SDK resolver to import workload manifest targets This allows the calculation of the manifest paths to be centralized in C# code instead of duplicated in MSBuild XML. * Add localized error message for missing workloads * Use workload resolver to get workload pack paths * Rename workload SDK resolver to avoid namespace conflict * Fix testing with resolver on full framework * Use stage 2 MSBuild SDK resolver for full Framework tests * Fix compiling on non-Windows * Retarget workload / resolver projects to net472 * Fix error packing SDK Resolver * Disable workload tests on full framework * Fix casing mismatch in test workload
- Loading branch information
1 parent
ec443d4
commit ea0db05
Showing
52 changed files
with
720 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/Assets/TestWorkloads/manifests/Microsoft.NET.Sdk.TestWorkload/WorkloadManifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"version": 5, | ||
"workloads": { | ||
"microsoft-net-sdk-testworkload": { | ||
"description": "SDK Test Workload", | ||
"packs": [ | ||
"Microsoft.NET.Sdk.TestWorkload.Pack" | ||
] | ||
}, | ||
"microsoft-net-sdk-missingtestworkload": { | ||
"description": "SDK Test Workload (missing)", | ||
"packs": [ | ||
"Microsoft.NET.Sdk.MissingTestWorkload.Pack" | ||
] | ||
} | ||
}, | ||
"packs": { | ||
"Microsoft.NET.Sdk.TestWorkload.Pack": { | ||
"kind": "sdk", | ||
"version": "0.42.42" | ||
}, | ||
"Microsoft.NET.Sdk.MissingTestWorkload.Pack": { | ||
"kind": "sdk", | ||
"version": "0.42.42" | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/Assets/TestWorkloads/manifests/Microsoft.NET.Sdk.TestWorkload/WorkloadManifest.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Project> | ||
<Import Project="Sdk.targets" | ||
Sdk="Microsoft.NET.SDK.TestWorkload.Pack" | ||
Condition="'$(TargetPlatformIdentifier)'=='WorkloadTestPlatform'" /> | ||
|
||
<Import Project="Sdk.targets" | ||
Sdk="Microsoft.NET.SDK.MissingTestWorkload.Pack" | ||
Condition="'$(TargetPlatformIdentifier)'=='MissingWorkloadTestPlatform'" /> | ||
</Project> |
8 changes: 8 additions & 0 deletions
8
...sets/TestWorkloads/packs/Microsoft.NET.Sdk.TestWorkload.Pack/0.42.42/Sdk/AutoImport.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<!-- Default item includes (globs and implicit references) --> | ||
<!-- <Import Project="..\targets\Microsoft.NET.Sdk.TestWorkload.DefaultItems.props" /> --> | ||
|
||
<PropertyGroup> | ||
<TestWorkloadAutoImportPropsImported>true</TestWorkloadAutoImportPropsImported> | ||
</PropertyGroup> | ||
</Project> |
9 changes: 9 additions & 0 deletions
9
src/Assets/TestWorkloads/packs/Microsoft.NET.Sdk.TestWorkload.Pack/0.42.42/Sdk/Sdk.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<TargetPlatformSupported>true</TargetPlatformSupported> | ||
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == ''">42.0</TargetPlatformVersion> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<SdkSupportedTargetPlatformVersion Include="42.0" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/Microsoft.DotNet.TemplateLocator/Microsoft.DotNet.TemplateLocator.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/FXVersion.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/Resolvers/Microsoft.DotNet.SdkResolver/Microsoft.DotNet.SdkResolver.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...ft.NET.Sdk.WorkloadMSBuildSdkResolver/Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>$(SdkTargetFramework);net472</TargetFrameworks> | ||
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">$(SdkTargetFramework)</TargetFrameworks> | ||
<IsPackable>true</IsPackable> | ||
</PropertyGroup> | ||
|
||
|
||
|
||
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'"> | ||
<None Update="SdkResolvers\Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver\Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.xml" CopyToOutputDirectory="PreserveNewest" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<EmbeddedResource Update="**\*.resx" GenerateSource="true" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildPackageVersion)" PrivateAssets="All" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Microsoft.NET.Sdk.WorkloadManifestReader\Microsoft.NET.Sdk.WorkloadManifestReader.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'"> | ||
<ProjectReference Include="..\..\Cli\Microsoft.DotNet.Cli.Utils\Microsoft.DotNet.Cli.Utils.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'"> | ||
<ProjectReference Include="..\Microsoft.DotNet.SdkResolver\Microsoft.DotNet.SdkResolver.csproj" /> | ||
</ItemGroup> | ||
|
||
<Target Name="WriteFullFrameworkResolverManifest" AfterTargets="AfterBuild" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'"> | ||
<ItemGroup> | ||
<ManifestLines Include="<SdkResolver>" /> | ||
<ManifestLines Include="<Path>$(TargetPath)</Path>" /> | ||
<ManifestLines Include="</SdkResolver>" /> | ||
</ItemGroup> | ||
|
||
<WriteLinesToFile File="$(OutputPath)\SdkResolvers\$(AssemblyName)\$(AssemblyName).xml" Lines="@(ManifestLines)" Overwrite="true" WriteOnlyWhenDifferent="true" /> | ||
</Target> | ||
|
||
</Project> |
3 changes: 3 additions & 0 deletions
3
...osoft.NET.Sdk.WorkloadMSBuildSdkResolver/Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<SdkResolver> | ||
<Path>..\..\Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.dll</Path> | ||
</SdkResolver> |
Oops, something went wrong.