1

我使用 VS 2013 和 TFS 2013。

我创建了一个全新的解决方案并按照此处编写的步骤操作: http ://www.ewaldhofman.nl/post/2010/04/29/Customize-Team-Build-2010-e28093-Part-4-Create-your-own -activity.aspx

注意与他的 vs\tfs 版本和我的版本不同。

从源代码管理中获取流程模板 xaml 后,将其复制并粘贴到 Template 文件夹中,将其添加到项目中,将构建操作更改为 XamlAppDef,尝试构建程序并出现此错误:

错误 2 扩展“Microsoft.Activities.Build.Validation.ValidationBuildExtension”引发了“System.Activities.InvalidWorkflowException”类型的异常:“处理工作流树时遇到以下错误:“VisualBasicValue”:遇到编译器错误处理表达式“BuildNumberFormat”。未声明“BuildNumberFormat”。由于其保护级别,它可能无法访问。'。模板

有任何想法吗?提前致谢!

4

3 回答 3

4

转到 template.xaml 的属性并将构建操作属性设置为无: http ://tfsbuildextensions.codeplex.com/wikipage?title=How%20to%20integrate%20the%20extensions%20into%20a%20build%20template

于 2014-07-31T23:33:38.627 回答
3

您可以将 BuildAction 保留为 XamlAppDef。要使其编译,您所要做的就是添加所有必需的程序集引用,包括来自的LibGit2Sharp

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer

而不是 NuGet 包。如果您添加 nuget 包,您将收到有关缺少强名称的错误。

于 2014-10-13T21:03:41.903 回答
0

I received this error as well. My custom activities dll was still created and after I submitted it to TFS and pointed the build controller at it my builds were able to run. The BuildNumberFormat errors were all in my XAML projects, not in my code project. In my case, this error only appeared to occur when I tried to build locally. My build definitions ran fine. It is an irritating error but shouldn't stop you from creating your TFS builds.

于 2014-07-10T12:27:57.597 回答