*.dll.config from package reference not copied to output on publish
See original GitHub issueDescription
It seems that the *.dll.config
files from a package reference aren’t copied to the output directory during a dotnet publish
.
Use case
I stumbled across this problem while consuming my FubarDev.PamSharp
package, which requires having the ´.dll.configfile, because it contains a
dllmap` that is needed to find the correct native library.
dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.0.100-preview5-011568
Commit: b487ff10aa
Runtime Environment:
OS Name: ubuntu
OS Version: 16.04
OS Platform: Linux
RID: ubuntu.16.04-x64
Base Path: /home/fubar-coder/dotnet/sdk/3.0.100-preview5-011568/
Host (useful for support):
Version: 3.0.0-preview5-27626-15
Commit: 61f30f5a23
.NET Core SDKs installed:
3.0.100-preview5-011568 [/home/fubar-coder/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.0.0-preview5-19227-01 [/home/fubar-coder/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.0.0-preview5-27626-15 [/home/fubar-coder/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
System information
Windows 10 Pro for Workstation 1809 (Build 17763.475)
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Nuget package doesn't copy .dll.config files to output folder
I have an application that references this Nuget package. The assembly is correctly copied to the output folder, but the .dll.config is not....
Read more >PackageReference in project files - NuGet
Package references, using <PackageReference> MSBuild items, specify NuGet package dependencies directly within project files, as opposed to ...
Read more >How to copy dependent assemblies to the bin folder on build?
Solution · Open your project file. Simple enough, just select “Edit Project File” by clicking your project using the right mouse button in...
Read more >Copy files from the NuGet package to the destination ...
But I have an issue with copying files to the module folder in the destination project when installing. It creates some references for...
Read more >Microsoft assembly not copied to publish folder
DiagnosticSource package and ran a publish to File System and the DLL was in the published bin directory. This was using the packages.config...
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
We ran into the same problem. While I still think this is a actual bug (.config not copied along with the assembly when building, while this was promoted by Microsoft for many years), the following actually solves the problem in a kind of generic way.
@pfeigl, your solution worked–thanks for that. But while the
.dll.config
file was copied to thebin
folder of the consuming project, if that project is consumed by another, the config file is NOT copied to the parentbin
folder even though the.dll
and.pdb
files are copied.Any idea how to make it transitive.