MvsSln icon indicating copy to clipboard operation
MvsSln copied to clipboard

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

Open 3F opened this issue 8 years ago • 1 comments

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 avatar Jul 08 '17 18:07 3F

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 avatar Aug 04 '18 17:08 3F

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.

3F avatar Apr 29 '24 23:04 3F