Wrapper Library Placement

Asked 1 years ago, Updated 1 years ago, 60 views

To use unmanaged C++ Dll from the C# side, we created a wrapper library using C++/CLI.
C# tried to create a Test project and verify its operation, but failed to load the library.

A copy of the wrapper library is created in the build output folder of the Test project. The reason seems to be that Dll in Unmanaged is not copied.
In this case, how should I set the project settings?

The running environment is VisualStudio 2013 Community
Unmanaged Dll also registers with the solution from the source code.

c# c++ c++-cli

2022-09-30 20:35

1 Answers

One way to do this is to make the output directory the same for both C# and C++/CLI projects.I often unify the output directory to $(SolutionDir)$(Configuration) or $(SolutionDir)$(Configuration)-$(PlatformShortName) for all projects in the solution.


2022-09-30 20:35

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.