-
Notifications
You must be signed in to change notification settings - Fork 252
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
CopyToOutput does not support transitive references #6151
Comments
The You can set Changing the reference to the following should resolve your problem: <ItemGroup>
<ProjectReference Include="..\Beta\Beta.csproj" PrivateAssets="analyzers;build" />
</ItemGroup> |
@dasMulli A huge thanks. I'm sure I had tried various combinations of IncludeAssets and ExcludeAssets, but it seems I missed the most simple cases. Your solution does indeed work, however I have also found that the following works: <ItemGroup>
<ProjectReference Include="..\Beta\Beta.csproj" IncludeAssets="contentFiles" />
</ItemGroup> I think this more closely represents the intention to anyone viewing the code. |
@dasMulli Thanks, that solved the same problem for me. |
The problem is that this doesn't work if the import is a NuGet package. IncludeAssets="all" has no effect to pull the runtime folders. The only very hacky workaround is to explicitly add a reference to the exact WebView runtime needed to the parent project. Scenario is this:
The What I wanted to accomplish is to isolate my WebView usage to my library, that I then import to any project that need it. So instead of updating WV in all projects I can just use the single reference. Doesn't work though due to this issue and I still have to add the explicit WV reference along with trying to match the runtime version which is a royal pain in the ass. |
The default value for
I have some draft docs with an explanation about |
Details about Problem
Scenario
I have two packages (Alpha and Beta both target netStandard2.0) being built via
dotnet pack
that specify content to be copied to output:These packages build and pack correctly and contain the correct information in their nuspecs:
I also have a project (netcoreapp2.0) that consumes package Alpha via nuget.
The Project references package Alpha. Package Alpha has a dependency on package Beta
So the dependency tree is:
Issue
Performing a
dotnet build
ordotnet publish
on the Project only copies the content files for the Alpha package. It does not copy the content files for the transitive Beta package.Info
I did find a previously raised issue for this here: https://github.com/dotnet/cli/issues/2902
However, this relates to project.json and has been closed due to no longer being supported.
Dotnet Info
Sample Project
A sample project is attached: contentFilesRepro.zip
Run
.\Build.ps1
and check the contents of theartifacts
directory for the created assets.The text was updated successfully, but these errors were encountered: