Answered by:
Publishing dotnet standard 2.1 library VS2019

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
- Moved by Xingyu ZhaoMicrosoft contingent staff Friday, October 23, 2020 7:11 AM
Thursday, October 22, 2020 1:21 PM
Answers
-
I'd try asking for help over here.
https://docs.microsoft.com/en-us/answers/topics/vs-general.html
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Guido Franzke Friday, October 23, 2020 9:44 AM
- Marked as answer by Guido Franzke Thursday, October 29, 2020 6:55 AM
Friday, October 23, 2020 8:28 AM -
Hello,
if this article does not already help you: https://stackoverflow.com/questions/58101078/is-there-a-way-to-publish-a-net-standard-library-without-producing-a-nupkg-in
https://docs.microsoft.com/en-us/answers/topics/windows-uwp.html
- Proposed as answer by Dave PatrickMVP Friday, October 23, 2020 9:49 AM
- Marked as answer by Guido Franzke Thursday, October 29, 2020 6:55 AM
Friday, October 23, 2020 8:29 AM
All replies
-
Hi WRBehning,
Thank you for posting here.
In order to help you find the correct forum to go ask questions, I have moved the thread to 'where is the forum for' forum.
Thank you for your understanding.
Best Regards,
Xingyu Zhao
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.Friday, October 23, 2020 7:11 AM -
I'd try asking for help over here.
https://docs.microsoft.com/en-us/answers/topics/vs-general.html
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Guido Franzke Friday, October 23, 2020 9:44 AM
- Marked as answer by Guido Franzke Thursday, October 29, 2020 6:55 AM
Friday, October 23, 2020 8:28 AM -
Hello,
if this article does not already help you: https://stackoverflow.com/questions/58101078/is-there-a-way-to-publish-a-net-standard-library-without-producing-a-nupkg-in
https://docs.microsoft.com/en-us/answers/topics/windows-uwp.html
- Proposed as answer by Dave PatrickMVP Friday, October 23, 2020 9:49 AM
- Marked as answer by Guido Franzke Thursday, October 29, 2020 6:55 AM
Friday, October 23, 2020 8:29 AM -
Thanks, that explains the xx.nupkg. It seems though that there is no elegant way to accomplish what I need without hacking the csproj file along with executing a post build script.
Bill Behning
Friday, October 23, 2020 12:54 PM