sameerpjoshi
CMake to generate C# project and compile it
The csproj generated has following entry. Not sure how and where this entry is getting added from
<Compile Include="C:\Users\xxxx\source\repos\abcde\xyzc\src\MRC\MRCDNC\out\build\x64-Debug\obj\x64\Debug.NETFramework,Version=v4.0.AssemblyAttributes.cs">
<Link>out\build\x64-Debug\obj\x64\Debug.NETFramework,Version=v4.0.AssemblyAttributes.cs</Link>
</Compile>
21 replies
CMake to generate C# project and compile it
If I use msbuild directly , it works fine. I have used WSL for C++ compilation as well for Linux using MSBuild. However, not been able to make it work with CMake. CMake could give me a single way to have the files listed and projects created automatically during runtime and able to build it cross platform. CMake also triggers msbuild while building and when its at the first step of determining projects to restore, we get this error. It seems the msbuild that gets triggered through CMake is using the Csproj file for finding the dependencies. Not sure why its looking for .NET4.0 version of those dependencies when the target framework specified is .Netstandard2.0.
21 replies
CMake to generate C# project and compile it
The issue is occurring for many other packages as well which support .netstandard2.0 . It seems some issue with csproj file generated that its going to find some other non required version like net40 for the package targets. Not sure where its getting this net40 from
21 replies