I am having a problem with Visual Studio 2017 compiling a DLL project:
I did "Install-Package UnmanagedExports" on Package Manager Console...
The error:
The "RGiesecke.DllExport.MSBuild.DllExportAppDomainIsolatedTask" task could not be loaded from the assembly C:\Users\Tom\Desktop\CSharpProjects\MSBuildDLL\MSBuildDLL\packages\UnmanagedExports.1.2.7\tools\RGiesecke.DllExport.MSBuild.dll. Could not load file or assembly 'RGiesecke.DllExport, Version=1.6.0.1449, Culture=neutral, PublicKeyToken=479f08790debacee' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
I compiled the exact same code on Visual Studio 2013 and it worked great but unfortunately it doesn't work on VS 2017. I have searched everywhere for a solution to this issue and didn't find anything that solve the problem.
The C# code:
namespace DLLTest
{
public class Test
{
[DllExport(CallingConvention = CallingConvention.Cdecl)]
static public int Add(int a, int b)
{
return a + b;
}
}
}
Thanks to @RobertHarvey for his guess in the comments above.
I had this same problem after setting up a brand new workstation and installing Visual Studio 2019. I resolved the problem by:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With