Closed RehanSaeed closed 8 years ago
cc: @sayedihashimi
The value comes in via a property to the template. For example http://reasoncodeexample.com/2013/06/09/creating-visual-studio-project-templates/. If you want to customize content I'm not sure if there is a better way than a custom wizard.
So it looks like I can use $targetframeworkversion$
? I just want to add it to my csproj:
<PropertyGroup>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
</PropertyGroup>
And also in my Web.config:
<system.web>
<compilation debug="true" enablePrefetchOptimization="true" targetFramework="4.5.2" />
<httpRuntime targetFramework="4.5.2" />
</system.web>
Thanks, that sounds simple enough.
Yeah should be able to use that. FYI we have some examples of it being used here in SideWaffle https://github.com/ligershark/side-waffle/blob/b8c7e04b5ee287335bdf70b1eb3b38545dc59332/Project%20Templates/Nancy.CSharp.AspNetHost/_preprocess.xml. Can we close this or is there some other info/action needed?
In the VS new project dialogue, there is a .NET Target Framework Version ComboBox. How can we hook into this using SideWaffle if I want to change some code based on the target framework version?