3F / MvsSln

🧩 Customizable VisualStudio .sln parser with project support (.vcxproj, .csproj., …). Pluggable lightweight r/w handlers at runtime, and more …
MIT License
135 stars 27 forks source link

C++ projects and their initialization via Microsoft.Build.Evaluation #1

Closed 3F closed 2 months ago

3F commented 7 years ago

yes, again... https://social.msdn.microsoft.com/Forums/en-US/2badfe39-1321-4ec4-9cc8-74bf4efd39b3/

// InvalidProjectFileException:"D:\Microsoft.Cpp.Default.props" - yes, because $(VCTargetsPath) is not defined.
new Project("Sample.vcxproj", new Dictionary<string, string>(), null);

// OK, because I also have 14.0
new Project("Sample.vcxproj", new Dictionary<string, string>(), "14.0");

// InvalidProjectFileException: The tools version "15.0" is unrecognized. 
// Available tools versions are: "12.0", "14.0", "2.0", "3.5", "4.0". - yes, I know why is so -_-
new Project("Sample.vcxproj", new Dictionary<string, string>(), "15.0");
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

-_-

Looks like the most easy way should be init by null and to define related properties to .ctor. I think should work o_o

3F commented 5 years ago

Same here, https://github.com/3F/MvsSln/issues/5#issuecomment-410464661 solves problem. But this only for .netfx 4.6

v14.3.0 (.netfx 4.5) contains same problem by the way.

3F commented 2 months ago

Too many changes... The main problem will be resolved together with #23

Looks like the most easy way should be init by null and to define related properties to .ctor. I think should work o_o

I think it does (populate everything what is needed) but this is wrong way according to Sdk etc. My priority is IeXod Closed.