" TargetFrameworkVersion" “SignFile”不支持参数。任务 [英] "TargetFrameworkVersion" parameter is not supported by the "SignFile" task

查看:73
本文介绍了" TargetFrameworkVersion" “SignFile”不支持参数。任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好


我有一个包含VSTO项目的解决方案。

这个解决方案是在TFS构建服务器上构建的,在那里它失败并出现以下错误:

C:\Program文件(x86)\ MSBuild \ Microoft\VisualStudio \v14.0 \ OffOfficeTools \ Microsoft.VisualStudio.Tools.Office.targets(268):"TargetFrameworkVersion""参数不是"SignFile"支持的
。任务。验证任务上是否存在参数,它是一个可设置的公共实例属性。


C:\Program Files(x86)\ MSBuild\Microsoft\VisualStudio \v14.0 \ OfficeTools \ Microsoft.VisualStudio.Tools.Office.targets (264):"SignFile"和"SignFile"。任务无法使用其输入参数初始化
。 


我正在使用Visual Studio 2015 Enterprise,并且可以在我自己的电脑上构建项目。 


我有在构建服务器上安装了Visual Studio 2015 Enterprise,并尝试手动构建项目。这很好。


在构建模板中,我指定了以下参数:

/ p:GenerateProjectSpecificOutputFolder = true /p:VisualStudioVersion=14.0 /p :SkipInvalidConfigurations = true


我已安装以下内容来解决此问题:


Visual Studio Tools for Office system 3.0 Runtime

用于Office运行时的Microsoft Visual Studio 2010工具(x64)

用于Visual Studio 2015的Microsoft Office开发人员工具

Microsoft Office Professional Plus 2016


该项目的目标是.NET 4.5.2


构建服务器是Windows Server 2016版本1607


不幸的是我没有去过能够很好地了解这个问题。我认为它可能与项目文件中配置的ClickOnce清单的签名有关,但我无法找到使用TFS构建
代理无法解决的原因。


看起来很奇怪的是,从活动日志中我可以看到Build代理从这个位置使用MSBuild:


C:\ Windows \ MyMicrosoft.NET \ Framework\v4.0.30319\msbuild.exe


我已经阅读了一些Visual Studio 2015使用C:\Program Files(x86)\ MSBuild\14.0 \\的地方\\ bin\msbuild.exe


为什么我的tfs构建使用的版本与Visual Studio不同,我如何更改它以便tfs构建使用与Visual Studio相同的版本?




 



解决方案


好朋友,


>>我正在使用Visual Studio 2015 Enterprise,并且能够在我自己的电脑上构建项目。 


>>我也在构建服务器上安装了Visual Studio 2015 Enterprise,并尝试手动构建项目。这很好。



I t 似乎 你可以在没有TFS构建的情况下在本地构建
项目。
并且只有TFS构建引擎出错。( < span style ="font-size:11.0pt; font-family:'Calibri',sans-serif; color:black">如果我误解了任何内容,请更正
me。


如果是这样,我担心我们需要在  stackoverflow 
TFS标记或  DeveloperCommunity  获得更多关于TFS的专业支持,因为它与使用TFS构建更相关。



感谢您的理解与合作。 



最好的问候



兰斯


hi you guys

I have a solution that includes a VSTO project.
This solution is build on a TFS build server, where it fails with the following error:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets (268): The "TargetFrameworkVersion" parameter is not supported by the "SignFile" task. Verify the parameter exists on the task, and it is a settable public instance property.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets (264): The "SignFile" task could not be initialized with its input parameters. 

I am using Visual Studio 2015 Enterprise and is able to build the project on my own pc. 

I have installed Visual Studio 2015 Enterprise on the build server as well and tried to build the project manually. This works fine.

In the build template i have specified the following parameters:
/p:GenerateProjectSpecificOutputFolder=true /p:VisualStudioVersion=14.0 /p:SkipInvalidConfigurations=true

I have installed the following to solve the issue:

Visual studio Tools for the Office system 3.0 Runtime
Microsoft Visual Studio 2010 Tools for Office Runtime (x64)
Microsoft Office Developer Tools for Visual Studio 2015
Microsoft Office Professional Plus 2016

The project is targeting .NET 4.5.2

The build server is a Windows Server 2016 version 1607

Unfortunatly i have not been able to finde much about this issue. I think it could have something to do with the Signing of the ClickOnce manifest configured in the project file, but i just can't finde a reason why this would not work using the TFS build agent.

Something that looks strange is that from the activity log i can see that the Build agent uses MSBuild from this location:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe

I have read some where that Visual Studio 2015 uses C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe

Why does my tfs build use a different version than Visual Studio and how can i change it so the tfs build use the same as Visual Studio?


 

解决方案

Hi friend,

>>I am using Visual Studio 2015 Enterprise and is able to build the project on my own pc. 

>>I have installed Visual Studio 2015 Enterprise on the build server as well and tried to build the project manually. This works fine.

It seems that you can build the project successfully , locally without TFS build. And only has error with TFS build engine. (If I misunderstand anything, please correct me.)

If so, I’m afraid we need to open a new thread in stackoverflow with TFS tag or DeveloperCommunity to get more professional supports about TFS since it’s more related to build with TFS.

Thanks for your understanding and cooperation. 

Best regards

Lance


这篇关于&QUOT; TargetFrameworkVersion&QUOT; “SignFile”不支持参数。任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆