DNNE: Compilation errors

I created a .net 5 library in VS preview. I added the DNNE package (latest version. Next I added a method public static int Add(int a, int b), and marked it with the UnmanagedCallersOnlyAttribute. When I compile in VS, I get an error saying the DNNE.BuildTasks.dll file couldn’t be loaded.

When I run dotnet build from the command line, I get an error from the c++ compiler, saying it can’t find libnethost.lib.

What am I doing wrong?

Is there a (working) sample project somewhere?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

I just noticed that this is for x86. I just tried that and there is indeed a build issue for that. My confirmation above was only for x86_64 - the default for .NET Core.

I will submit a PR with a fix today and publish a new package.