0

I've created NuGet package containing native x86 binaries. Binaries are copying to bin directory by MSBuild script from this answer.

But this approach does not work with DNX projects (ASP.NET 5 web app for example), because MSBuild script is not installing. So I have FileNotFoundException.

How to make it alive?

Community
  • 1
  • 1
Denis Sokolov
  • 85
  • 1
  • 8
  • You could include your native bits by updating the project.json file - e.g. https://github.com/aspnet/KestrelHttpServer/blob/dev/src/Microsoft.AspNet.Server.Kestrel/project.json#L84-L90 You can also take a look at the post I wrote on using native libraries in ASP.NET 5: http://blog.3d-logic.com/2015/11/10/using-native-libraries-in-asp-net-5/ but I don't know if it will be useful for you if you don't distribute your native binaries as NuGet packages. – Pawel Jan 04 '16 at 22:07

1 Answers1

1

Solution for me was to make runtimes\win\native directory in NuGet package structure, as described here: https://docs.nuget.org/Create/uwp-create

In runtime DNX adds this directory to PATH variable, so managed dll can load it.

Denis Sokolov
  • 85
  • 1
  • 8