You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Including native libraries in dotnet projects without nuget package #7017
According to the current documentation the packOptions would allow us to specify a native library for inclusion in a nuget package. Wouldn't it be great if we could have something similar for a normal app publish? That would allow us to bypass the creation of a nuget package for simple scenarios.
I somehow thought I'd have to create all the runtime directories dynamically and copy the DLL to all of them. In my case the DLL is the same for all runtimes and it works by simply copying it to the publish base directory.
@nicolasr75 I will assume that this worked since MSbuild's <Content> is tried and true so will therefore close this issue. :) If you run into problems or it doesn't work, please reopen.
Activity
thesmithee commentedon Jan 13, 2017
MSBuild allows this very easily using the
<Content>element. Is this what is looked for here?tmds commentedon Jan 13, 2017
@nicolasr75 try using
publishOptions(see https://docs.microsoft.com/en-us/dotnet/articles/core/tools/project-json)nicolasr75 commentedon Jan 15, 2017
@tmds thanks, indeed it seems to be as easy as
I somehow thought I'd have to create all the runtime directories dynamically and copy the DLL to all of them. In my case the DLL is the same for all runtimes and it works by simply copying it to the publish base directory.
nicolasr75 commentedon Jan 15, 2017
@BlackDwarf yes, I guess
<Content>may work. I will try it as soon as I port the project to VS2017.thesmithee commentedon Jan 20, 2017
@nicolasr75 I will assume that this worked since MSbuild's
<Content>is tried and true so will therefore close this issue. :) If you run into problems or it doesn't work, please reopen.