Question

Is there any way to change an InstallShield LE 2012 project so that it always defaults to MSBuild ToolsVersion 4.0?

I'm seeing that when I leave it set to 3.5, my automated builds fail in TFS. When I set it manually with notepad to 4.0, it works fine. However, any changes to the project file after that in the IDE cause it to revert back to 3.5.

Is there anyway to default this to being 4.0?

Thanks

Was it helpful?

Solution

I have not found a way to get the project to default to the 4.0 tools version, but you could always pass the /tv:4.0 MSBuild parameter to your TFS automated build. The only issue with this is if your solution has any projects that should not be built under the 4.0 tools.

The other option is to make sure the 3.5 tools are installed and properly configured on the build server. I know there are some issues with this, and it requires some modification of the Installshield Target files for the 3.5 to work properly.

In order to make it work with both 3.5 and 4.0 tools installed you replace the section that reads

<UsingTask TaskName="Microsoft.Build.Tasks.AssignProjectConfiguration"
           AssemblyName="Microsoft.Build.Tasks.v3.5"
                   Condition="'$(MsBuildToolsVersion)'=='3.5'"/>

With the following

<UsingTask TaskName="Microsoft.Build.Tasks.AssignProjectConfiguration"
           AssemblyName="Microsoft.Build.Tasks.v3.5,Version=3.5.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"   
                   Condition="'$(MsBuildToolsVersion)'=='3.5'"/>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top