Reputation: 31
I have .NET 7 mixed project with C++ managed and C dlls. I'm using Visual Studio 22 Enterprise. When I try to publish the project using the command dotnet publish -c Release --self-contained -p:PublishSingleFile=true I get erron on the Managed C++ project - error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found for the line in the VCXproj: <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props/>
Searching for this problem - I looked what other people mentioned but I could not find the **VCTargetsPath **not in the environement variables,not in the registry and looking on the installation of Visual Studio - it is installed under C:\Program Files\Microsoft Visual Studio\2022\Enterprise and not C:\Program Files (x86). I have no idea what's missing.
Upvotes: 2
Views: 746