Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
348 views
in Technique[技术] by (71.8m points)

NuGet Package Restore Copies DLL of Assemblies with EmbedInteropType=True to bin Folder

In one of our project within a solution, we had to reference Microsoft.SqlServer.DTSPipelineWrap and Microsoft.SQLServer.DTSRuntimeWrap. Whenever we have a new person join the team and have to get our solution from TFS, the packages for the projects are correctly retrieved from our package directory and restored to every project in the solution. Specific to the two assemblies mentioned, it's also properly restored to the project that references them, and the Embed Interop Type value is likewise set to true.

Everything checks out until the person starts debugging. IIS Express would throw a "Could not find assembly" pointing to the ones I've mentioned above. Somehow, their DLLs are being copied into the local bin folder, and you'd have to delete both files to be able to continue debugging. Running debug again or rebuilding the solution does NOT add the DLLs back, it's just when NuGet is having to restore the packages that it happens. Thankfully, the issue is isolated to the local developer setup, it does not happen when we deploy our code to our test and production environments, which has a step to restore NuGet packages also.

Has anyone else encountered this? Is there a property that we need to set in our nuspec for these assemblies to prevent it from happening?

question from:https://stackoverflow.com/questions/65943881/nuget-package-restore-copies-dll-of-assemblies-with-embedinteroptype-true-to-bin

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...