1

I'm using the C++ wrapper in this link: https://github.com/TekRTSA/RSA_API

In order to use a driver written in C++ inside C# project. When I publish/release my C# project it doesn't work on other computers without Visual C++.

Is there any way that I can publish my project on computers that don't have the visual C++? Or is there any software package like .NET that I can use in order to make it work?

5
  • What kind of errors are you seeing on 'other' computers? Commented May 2, 2018 at 12:29
  • If I had to guess I'd the redistribuable might be needed by the library you're using, in which case there's not much you can do. Just make sure you let your user know they the the VC++ redist and it should be fine, it's a fairly common reditribuable Commented May 2, 2018 at 12:30
  • Thanks, This is the Error: Could not load file or assembly 'APILibrary.dll' or one of its dependencies. The specified module could not be found. Commented May 2, 2018 at 12:33
  • Alternatively, you could statically link your unmanaged C++ library so that it has no dependencies to any external DLLs. Commented May 2, 2018 at 12:35
  • You also need to distribute APILIbrary.dll to your customers computers too. Commented May 2, 2018 at 12:35

1 Answer 1

1

With .NET applications you need to make sure customers have a version of .NET that matches what you compiled your application with.

With (Microsoft) C++ applications that depend on the C Runtime, you need to make sure customers have a version of the Visual C++ Redistributables that matches what you compiled your application with. Do a google search for 'visual c++ redistributable' and you will see lots of suggestions on what to look for.

Sign up to request clarification or add additional context in comments.

3 Comments

I found this redistributable: support.microsoft.com/en-us/help/2977003/… But It looks like it for the visual studio and my app didn't work on computers without the visual studio. Is there any other redistributable that can run without VS?
Also make sure the C++ dll is compiled as Release build, debug builds cannot be redistributed without VS installed (at least not in a supported way)
You have to know what version of the visual c++ compiler you are compiling against. And then find the matching visual c++ redist.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.