InstallShield LE 2012 ToolsVersion默认为3.5,TFS自动构建失败(InstallShield LE 2012 ToolsVersion Defaults to 3.

编程入门 行业动态 更新时间:2024-10-26 08:30:23
InstallShield LE 2012 ToolsVersion默认为3.5,TFS自动构建失败(InstallShield LE 2012 ToolsVersion Defaults to 3.5, TFS Automated Build fails)

有没有办法更改InstallShield LE 2012项目,以便它始终默认为MSBuild ToolsVersion 4.0?

我看到当我将它设置为3.5时,我的自动构建在TFS中失败。 当我用记事本手动设置为4.0时,它工作正常。 但是,在IDE之后对项目文件的任何更改都会导致它恢复为3.5。

反正默认这是4.0吗?

谢谢

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

最满意答案

我还没有找到让项目默认使用4.0工具版本的方法,但是你总是可以将/tv:4.0 MSBuild参数传递给你的TFS自动构建版本。 唯一的问题是,如果您的解决方案有任何不应在4.0工具下构建的项目。

另一个选项是确保在构建服务器上安装并正确配置3.5工具。 我知道这有一些问题,它需要对Installshield Target文件进行一些修改才能使3.5正常工作。

为了使其能够安装3.5和4.0工具,您可以替换读取的部分

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

有以下几点

<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'"/>

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'"/>

更多推荐

本文发布于:2023-07-09 14:56:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1087150.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:默认为   ToolsVersion   LE   InstallShield   Build

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!