hvanbakel / CsprojToVs2017

Tooling for converting pre 2017 project to the new Visual Studio 2017 format.
MIT License
1.08k stars 120 forks source link

Fix #173 #183

Closed hvanbakel closed 6 years ago

hvanbakel commented 6 years ago

Warn about the output type becoming a win exe but then just convert it. It will still work as a windows 8 store app according to here.

andrew-boyarshin commented 6 years ago

Why did you not introduce new ApplicationType enumeration value? That seems more simple and will preserve the original value.

hvanbakel commented 6 years ago

And then on the writing side collapse them? I can do that, as far as I could tell this option is no longer supported so there’s nothing really that we an do about that. I see your point of not losing that information up until the point where we write, let me update that.

andrew-boyarshin commented 6 years ago

@hvanbakel wait, it's not supported in CPS? I mean, in MSBuild .props and .targets sources I've seen things related to that.

hvanbakel commented 6 years ago

I wasn’t able to find the proper output type for that. If it is supported than the entire PR is useless.

andrew-boyarshin commented 6 years ago

It should be. Example:

  <PropertyGroup>
    <TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='exe'">.exe</TargetExt>
    <TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='winexe'">.exe</TargetExt>
    <TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='appcontainerexe'">.exe</TargetExt>
    <TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='library'">.dll</TargetExt>
    <TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='module'">.netmodule</TargetExt>
    <TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='winmdobj'">.winmdobj</TargetExt>
  </PropertyGroup>

And there are more ocurrences of appcontainerexe in the same file. It certainly is a feature of Roslyn (hence the documentation page you linked).

andrew-boyarshin commented 6 years ago

The XML extract from Microsoft.Common.CurrentVersion.targets is also a good source of supported $(OutputType) values.

hvanbakel commented 6 years ago

Nice I'll revisit