Skip to content
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

[build] extract .NET workloads to a temp folder #1027

Merged
merged 1 commit into from
May 17, 2021

Commits on May 14, 2021

  1. [build] extract .NET workloads to a temp folder

    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.
    jonathanpeppers committed May 14, 2021
    Configuration menu
    Copy the full SHA
    7d7ff75 View commit details
    Browse the repository at this point in the history