-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Creating a plugin project will copy dependencies of your plugin base to the plugins output #31636
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Same result with dotnet/msbuild#4371 (comment) suggests setting <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DisableTransitiveProjectReferences>true</DisableTransitiveProjectReferences>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\PluginBase\PluginBase.csproj">
<Private>false</Private>
<ExcludeAssets>runtime</ExcludeAssets>
</ProjectReference>
<ProjectReference Include="..\PluginBaseDependency\PluginBaseDependency.csproj">
<Private>false</Private>
<ExcludeAssets>runtime</ExcludeAssets>
</ProjectReference>
<ProjectReference Include="..\PluginDependency\PluginDependency.csproj" />
</ItemGroup>
</Project> I do feel there should be a better way to control this, though. |
Also related dotnet/msbuild#8494 and dotnet/msbuild#8507. |
@nkolev92 @JonDouglas Is there a way to disable transitive package reference copy in this case? Is this a feature update needed in NuGet? |
There's no knobs for controlling transitivity in any way right now. IE, you can't specify includeassets/excludeassets for transitive packages or anything like that. I think I've seen related issues, but I was unable to find it. |
Thanks. Sounds like there's no built in way to do this today. Moving to the backlog to gather additional feedback for consideration in the future. |
I encountered a similar problem, the issue is in the backlog and you can’t expect a solution? Can anyone share workarounds to solve the problem? |
Describe the bug
i created a plugin like is described in https://learn.microsoft.com/en-us/dotnet/core/tutorials/creating-app-with-plugin-support
this will still cause dependencies of your PluginBase to be copied to the output of your Plugin project. in the Plugin project
<Private>false</Private>
is added to avoid the dll of PluginBase being copied but its dependencies will still be copied.i created a small sample to illustrate that issue: PluginSample.zip
here is the tree that gets built:
since the dependencies of the PluginBase is already part of your application, they should not be copied to the output of your plugin. they should be used from your application like it is with the PluginBase itself
To Reproduce
Further technical details
dotnet --info
The text was updated successfully, but these errors were encountered: