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

Fixup native chrome lookup for installed tool scenario #1

Merged
merged 2 commits into from
Jun 3, 2022
Merged

Conversation

kzu
Copy link
Member

@kzu kzu commented Jun 3, 2022

It is unfortunately not possible to conditionally reference native assets depending on the installed tool's runtime platform. This means we need to assume the dependency will be restored at the project level and look it up via the project.assets.json, rather than the runtime deps.

See

kzu added 2 commits June 2, 2022 01:35
It is unfortunately not possible to conditionally reference native assets depending on the installed tool's runtime platform. This means we need to assume the dependency will be restored at the project level and look it up via the project.assets.json, rather than the runtime deps.

See
- How a tool project is installed/restored: https://github.com/dotnet/sdk/blob/main/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs
- Native files not being automatically added to the runtime deps.json: dotnet/sdk#11373
- How to do that via custom targets, but this wouldn't be possible on the target machine when restoring the temp project created for global tools: https://github.com/ericstj/sample-code/blob/nativeLibSample/addNative/addNative.csproj
- How runtime.json might work but it's going away: dotnet/runtime#11404
- Really going away: dotnet/runtime#49137
- How it's still not solved for .net6: NuGet/Home#5862
@kzu kzu merged commit 0461f94 into main Jun 3, 2022
@kzu kzu deleted the dev/native branch June 3, 2022 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant