Publishing dotnet standard 2.1 library VS2019 RRS feed

  • Question

  • I have a dotnet standard 2.1 class library that is meant to be deployed as a plugin assembly.  This project has a dependency on a Nuget package (EntityFramework).  This assembly (Entity Framework) along with the plugin assembly, need to be published to a plugin folder.

    I have experimented with the "Excluded Assets, Included Assets, and Private Assets" settings, but have had no luck.

    The only workaround that has worked is to add  <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> to the project file, which copies all dependent libraries to the output, and then write a post build script that will remove all of the unnecessary libraries included.  This seems to be rather cumbersome.

    Another issue is that Microsoft recommends that assemblies be deployed using dot net publish, which makes sense.

    The issue I'm having is that publishing only creates a Nuget Package.  Why?

    How does one deploy this package to the desired location?

    I inspect the Nuget Package, and I can see that only the Plugin assembly is included in the lib folder, not the dependent assembly.  So even if I try to use the package as my deployment source, it does not include the necessary assemblies.

    Bill Behning

    Thursday, October 22, 2020 1:21 PM


All replies