-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build] extract .NET workloads to a temp folder (#1027)
Our build currently emits some confusing warnings such as: Microsoft.NET.Sdk.ImportWorkloads.props(14,3): warning MSB4243: The NuGet-based SDK resolver failed to run because NuGet assemblies could not be located. Check your installation of MSBuild or set the environment variable "MSBUILD_NUGET_PATH" to the folder that contains the required NuGet assemblies. Could not find file 'D:\repos\dotnet\maui\bin\dotnet\sdk-manifests\6.0.100\microsoft.build.notargets\WorkloadManifest.json'. Only the very last line is actually relevant: Could not find file 'D:\repos\dotnet\maui\bin\dotnet\sdk-manifests\6.0.100\microsoft.build.notargets\WorkloadManifest.json'. This is because we are extracting the workload `.nupkg` files directly into `bin/dotnet/sdk-manifests/6.0.100` with the `$NUGET_PACKAGES` environment variable. Because we are using NuGet to do this, we hit some weird problems like extra directories getting created by NuGet: * `microsoft.build.notargets` * `microsoft.netcore.platforms` * `netstandard.library` A better fix for this problem is to extract the files into: .\bin\temp\ ...and then we move the `WorkloadManifest.*` files to the locations we need. Any extra files can just be left in `temp`, so they will not cause problems in future builds. To clean things up more, I removed the `.manifest-6.0.100` string from the directory names, so they match what is in dotnet/installer. I also moved a few MSBuild properties to `Directory.Build.props` so they could be used throughout the entire repo down the road. This will assist in making .NET MAUI a workload.
- Loading branch information
1 parent
57bf776
commit e02ec40
Showing
2 changed files
with
50 additions
and
25 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
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