hvanbakel / CsprojToVs2017

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

Can it migrate PreBuildEvent and PostBuildEvent too #267

Open kirchsth opened 5 years ago

kirchsth commented 5 years ago

Thank you for the tool, it makes a great job.

Could you migrate the PreBuildEvent and PostBuildEvent too? Because without changes no macros like e.g. $(ProjectDir) are replaced anymore. But if you would convert them into tasks then they are replaced again.

e.g. Old:

<PropertyGroup>
     <PreBuildEvent>"$(ProjectDir)PreBuildEvent.bat" "$(ProjectDir)..\" "$(ProjectDir)" "$(TargetDir)" 0 />
</PropertyGroup>

New:

<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
   <Exec Command="&quot;$(ProjectDir)PreBuildEvent.bat&quot; &quot;$(ProjectDir)..\&quot; &quot;$(ProjectDir)&quot; &quot;$(TargetDir)&quot; &quot;$(DevEnvDir)&quot; 0" />
</Target>

Details can be found https://github.com/dotnet/project-system/issues/1569

Thank you and best regards Helmut