question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet publish of net461 does not copy native assets but netcoreapp2.1 will

See original GitHub issue

I 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:

  1. Clone https://github.com/wixtoolset/Core.git
  2. Run “appveyor.cmd
  3. Note present build\Release\publish\netcoreapp2.1\wixnative.*.exe
  4. 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:closed
  • Created 5 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
dasMullicommented, Jul 15, 2018

So I get the repro when fixing the reference to WixToolset.Core.Native back to 4.0.12 (before the RID change in the package) in WixToolset.Core.csproj. When I then added a reference to Microsoft.NETCore.Platforms/2.1.0 the rid-specific assets appeared in the publish output.

1reaction
dasMullicommented, Jul 14, 2018

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found