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

[workload] fix missing files during the build #22804

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

jonathanpeppers
Copy link
Member

I used to do this to build MAUI:

  • dotnet cake

  • ./bin/dotnet/dotnet build SomeCustomerProject.csproj

Unfortunately, the dotnet build command would give an error that the MAUI workload was not installed.

The Microsoft.Maui.Sdk project is copying its output to:

OutputPath = artifacts/bin/Microsoft.Maui.Sdk/Debug/

When it should be:

OutputPath = bin/dotnet/packs/Microsoft.Maui.Sdk/8.0.60-dev/

This appears to be caused by the migration to dotnet/arcade:

https://github.com/dotnet/arcade/blob/e6b3f32f9855dccbe2447471c8f729b66f17d242/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectLayout.props#L14

To fix this, I added a new target to copy files to an additional location.

After this change, I still got a warning:

warning NU1603: hellomaui depends on Microsoft.Maui.Controls (>= 8.0.60-dev) but Microsoft.Maui.Controls 8.0.60-dev was not found. An approximate best match of Microsoft.Maui.Controls 8.0.60-dev.24303.1 was resolved.

But will troubleshoot that one later, the .nupkg files in ./bin/dotnet/library-packs/, have a 8.0.60-dev.24303.1 version.

I used to do this to build MAUI:

* `dotnet cake`

* `./bin/dotnet/dotnet build SomeCustomerProject.csproj`

Unfortunately, the `dotnet build` command would give an error
that the MAUI workload was not installed.

The `Microsoft.Maui.Sdk` project is copying its output to:

    OutputPath = artifacts/bin/Microsoft.Maui.Sdk/Debug/

When it should be:

    OutputPath = bin/dotnet/packs/Microsoft.Maui.Sdk/8.0.60-dev/

This appears to be caused by the migration to dotnet/arcade:

https://github.com/dotnet/arcade/blob/e6b3f32f9855dccbe2447471c8f729b66f17d242/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectLayout.props#L14

To fix this, I added a new target to copy files to an additional location.

After this change, I still got a warning:

    warning NU1603: hellomaui depends on Microsoft.Maui.Controls (>= 8.0.60-dev) but Microsoft.Maui.Controls 8.0.60-dev was not found. An approximate best match of Microsoft.Maui.Controls 8.0.60-dev.24303.1 was resolved.

But will troubleshoot that one later, the `.nupkg` files in
`./bin/dotnet/library-packs/`, have a 8.0.60-dev.24303.1 version.
@jonathanpeppers jonathanpeppers requested a review from a team as a code owner June 3, 2024 19:09
@jonathanpeppers
Copy link
Member Author

On a different machine (Mac), I didn't see the warning:

warning NU1603: hellomaui depends on Microsoft.Maui.Controls (>= 8.0.60-dev) but Microsoft.Maui.Controls 8.0.60-dev was not found. An approximate best match of Microsoft.Maui.Controls 8.0.60-dev.24303.1 was resolved.

So git clean -dxf might solve this one, and it's a non-issue. ^^

@rmarinho rmarinho merged commit 36c0500 into dotnet:main Jun 4, 2024
49 checks passed
@jonathanpeppers jonathanpeppers deleted the fix-local-workload branch June 4, 2024 13:26
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants