-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
The guide along with the sample it uses has this for non-private project references:
<ProjectReference Include="PluginBase">
<Private>false</Private>
</ProjectReference>
This works for the sample itself, but it doesn't always correctly translate for more complex projects. Specifically if PluginBase
would have a PackageReference
, the "Private=false" doesn't correctly propagate over to the PackageReference
and the output contains "traces" of the NuGet package (in the .deps.json
). This can cause issues when loading plugins.
The workaround seems to be to include "ExcludeAssets=runtime" as well, so the project reference would look like this:
<ProjectReference Include="PluginBase">
<Private>false</Private>
<ExcludeAssets>runtime</ExcludeAssets>
</ProjectReference>
The exact workaround needs to be validated with the product team (@nguerrera).
Even though this is not necessary for the sample in question, fixing it here will make people using the guide more likely to a working state at first try.
We're still trying to figure out if this is an actual product bug or if this is a desired behavior. Either way for .NET Core 3.0 this is how it works, and so fixing the guide is preferable.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 06023407-704f-0ace-e89a-eedd9f95a007
- Version Independent ID: f25a6e1a-cb10-867b-0522-a377bf9d016b
- Content: Create a .NET Core application with plugins - .NET Core
- Content Source: docs/core/tutorials/creating-app-with-plugin-support.md
- Product: dotnet-core
- GitHub Login: @jkoritzinsky
- Microsoft Alias: jekoritz