I have a .NET 6 project MyProject
which is referencing a NuGet package. The NuGet package contains a MyHost.exe
and MyHost.runtimeconfig.json
and MyHost.deps.json
files, all in lib\net6.0
folder.
The problem is that when I publish MyProject
the MyHost.runtimeconfig.json
and MyHost.deps.json
files are not copied to the output folder.
I've tried <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
and <IncludeAssets>all</IncludeAssets>
in PackageReference but it didn't help. There is also a proposed solution with adding *.targets file to NuGet package which looks like a heavy artillery.
Since runtimeconfig.json
file is required I would think there should be a straightforward way to have it automatically copied.