C# Support: Project References
I have a Managed C++ project created by CMake. I also have a C# project (library). When I specify the C# library as a dependency of the Managed C++ project, it gets added as a <Reference>
instead of <ProjectReference>
.
Proposed solution: CMake should first check if items in VS_DOTNET_REFERENCES
are actual C# targets. If it is, it should add a <ProjectReference>
. If it's not a C# target, then it should use its current behavior of adding as <Reference>
.
Example as it is generated today:
<Reference Include="ToolCommon">
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</Reference>
ToolCommon
, being a C# project created and controlled by CMake, should have been added like:
<ProjectReference Include="..\..\ToolCommon\ToolCommon.csproj">
<Project>{eb41f669-2b22-3721-be81-8398b2bc685a}</Project>
</ProjectReference>
Version Information:
- CMake: v3.10.2
- Visual Studio 2017