dotnet publish of net461 does not copy native assets but netcoreapp2.1 will
See original GitHub issueI have a managed .nupkg (WixToolset.Core.Native) that depends on a .nupkg with native assets (runtime.win.WixToolset.Core.Native). The native assets are in runtimes\win\native
.
I have two other projects that consume the WixToolset.Core.Native.nupkg. One project is netcoreapp2.1
and one is net461
. When publishing the netcoreapp2.1
project all of the assets from runtimes\win\native
are copied. When publishing the net461
project none of the native assets are copied.
The following will demonstrate the above behavior:
- Clone https://github.com/wixtoolset/Core.git
- Run “appveyor.cmd”
- Note present build\Release\publish\netcoreapp2.1\wixnative.*.exe
- Note missing build\Release\publish\net461\wixnative.*.exe
@nick_guerrera (Twitter) suggested opening this issue after discussing in this thread: https://twitter.com/nick_guerrera/status/1017903818367881216
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Cannot find dependencies when executing an assembly ...
I wrote a .NET Core 2.0 console application. Publish using dotnet publish , But there was an error during execution: ...
Read more >dotnet publish command - .NET CLI
The dotnet publish command calls MSBuild, which invokes the Publish target. If the IsPublishable property is set to false for a particular ...
Read more >Publish .NET apps with the .NET CLI
This article demonstrates how you can publish your .NET application from the command line. .NET provides three ways to publish your ...
Read more >Dotnet build quiet. 18. In this article. For more information, see ...
I was greeted with Could not execute because the specified command or file was not ... But, that one comes with a whole...
Read more >Please stop lying about .NET Standard 2.0 support!
In this post I have a bit of a rant about Microsoft's NuGet packages lying about supporting .NET Standard 2.0 when they kinda...
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 FreeTop 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
Top GitHub Comments
So I get the repro when fixing the reference to
WixToolset.Core.Native
back to4.0.12
(before the RID change in the package) inWixToolset.Core.csproj
. When I then added a reference toMicrosoft.NETCore.Platforms/2.1.0
the rid-specific assets appeared in the publish output.Quick hypothesis from my mobile: does it change when you also reference Microsoft.NETCore.Platforms? If there is no package pulling that in transitively, there’s no RID graph specifying the win-x*>win relationship