So I've been working on writing a C++/CLI wrapper around an unmanaged library. I've now got that working, but only on the command line, and I was hoping to get some quick help on how to get this all working in Visual Studio 2008.
I have the following files:
MyWrapper.dll
MyWrapper.dll.manifest
MyUnmanagedLibrary.lib
TestProgram.cs
MyWrapper.dll is compiled from C++/CLI code, MyUnmanagedLibrary.lib is compiled from unmanaged C code and TestProgram.cs is a C# program which calls functions defined in MyWrapper.dll
When I compile this code at the command line the following two commands are executed.
$ csc TestProgram.cs /r:MyWrapper.dll
$ mt /manifest MyWrapper.dll.manifest /outputresource:TestProgram.exe
Which produces TestProgram.exe
I'd like to know how I would go about importing this into, or creating, a Visual Studio 2008 project.
If TestProgram.cs contains text for Console application (function main), create new C# project of type "Console Application". Paste code from TestProgram.cs to the file generated by Application Wizard. In the Solution Explorer, open References, right-click and select "Add Reference". Add reference to MyWrapper.dll. Compile and run the program.
Bookmarks