Compilation errors
See original GitHub issueI 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?
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (9 by maintainers)
Top Results From Across the Web
What Is a Compilation Error?
A compilation error is an error in building a machine code file for a computer language. Many computer languages compile their source code ......
Read more >Difference between Compile Time Errors and Runtime Errors
Compile-Time Errors: Errors that occur when you violate the rules of writing syntax are known as Compile-Time errors. This compiler error ...
Read more >7.3. Compile Errors and Warnings
A compile error happens when the compiler reports something wrong with your program, and does not produce a machine-language translation.
Read more >What are the compilation errors and how to fix them?
Compilation errors are thrown while you are compiling, however, the actual error that you get is ArrayIndexOutOfBoundsException, ...
Read more >Reading/Fixing Compilation Errors
Below is an example which shows some errors that could occur when compiling a program. :~$ javac CompileErrors.java. CompileErrors.java:1 error: '{' expected.
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
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.
@AaronRobinsonMSFT sorry for the late reply, I haven’t had the time to check yet. I’ll let you know when I’ve been able to confirm.