CppSharp
CppSharp copied to clipboard
NuGet packages are missing the CppSharp.h header
Brief Description
I'm just trying to create a simple POC targeting C++/CLI. I have a newly created (empty) C++/CLI project in Visual Studio. When I add CppSharp.h to the project it comes up with a number of errors (see attached).
I noticed the latest nuget package doesn't include CppSharp.h, but the generated C++/CLI files have an include for it.
Are there working example projects somewhere? I'm resurrecting my C++ skills so bear with me, it does feel like I missed something obvious.
OS: Windows / OS X / Linux (include version and/or distro) Windows 10
Used headers
windows.h Cppsharp.h FastDelegates.h
Used settings
N/A
Target: MSVC/GCC/Clang MSVC
Other settings .NET 4.5.2 Framework VS2019 with VS2015 toolset (I've tried the 2019 toolset also)
Stack trace or incompatible generated code

Not sure what the errors could be... we do test the C++/CLI backend on CI, and all tests are passing right now, so the most likely issue is on the C++/CLI project setup there.
It's been a while since I set up a C++/CLI project, so I cannot recall all that is needed. Maybe you are missing some references?
About CppSharp.h not being on the package, that is an issue, we should be packaging that header too.
About the examples, I don't think we have anything to point you at right now, especially for C++/CLI.
Looks like I was missing some C++ components for Visual Studio, wishing I'd thought of that a day ago. I'm not sure exactly which ones fixed the issue.
You can close this unless you want to track the missing header issue. Using package 0.11.2 from nuget.org.
Thanks for the quick response.