[Broken Build]: Manually copied DLL to output directory not copied to depdendent project
See original GitHub issueIssue Description
I manually copy a DLL from a NuGet package to the output directory in project A:
<Target Name="CopyNewestDllsToOutput" BeforeTargets="Build">
<Copy SourceFiles="$(PkgMyPackage)\x64\My.dll" DestinationFolder="$(OutputPath)\Implementation" />
</Target>
Project B depends on project A, however, it does not receive this DLL as part of the output. How to fix this?
Best regards, D.R.
Steps to Reproduce
Expected Behavior
Actual Behavior
Ask us questions
Issue Analytics
- State:
- Created 2 months ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Dependent DLL is not getting copied to the build output ...
You can check this by selecting your project, then press ALT + ENTER , then select Application from left side and then select...
Read more >Unnecessary dlls copied to output folder · Issue #2227
Consider the following solution where all projects use the new SDK (VS 15.6.7): Util: a DLL project targeting netstandard1.3 MyApp: an EXE ...
Read more >Dependent DLL is not getting copied to the build output ...
The simple solution I encountered was to add the NuGet package to my MVC project. In one particular case this solved my problem....
Read more >How to copy dependent assemblies to the bin folder on build?
Open your project file. Simple enough, just select “Edit Project File” by clicking your project using the right mouse button in the Solution ......
Read more >Referenced dependencies not being copied to bin folder
The Problem: Rebuilding the project, only ClassLibrary1.dll is added to the output folder. Both file exists in the .nuget\packages\testing.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve found a better solution thanks to a colleague of mine:
This makes it work in all dependent projects as well and does not require me to reference the NuGet package in all projects again.
Best regards, D.R.
Unfortunately, this is not going to happen 😕 I’ve worked around it by referencing the NuGet package in project A and project B (even though it should not be necessary in project B). Then the None-ItemGroup from above works as the
$(PkgMyPackage)
variable exists in both projects.If anybody has a better solution I’ll gladly accept it 😃 For now: thanks @JanKrivanek for helping me out!
Best regards, D.R.