Tag: tfs

如何在特定选定项目内的TFS源代码管理中搜索特定文件?

码: string spName = “usp_Test_Procedure.sql”; var tfsPp = new TeamProjectPicker(TeamProjectPickerMode.SingleProject, false); tfsPp.ShowDialog(); _tfs = tfsPp.SelectedTeamProjectCollection; if (tfsPp.SelectedProjects.Any()) { _selectedTeamProject = tfsPp.SelectedProjects[0]; } string selectedProjectName = _selectedTeamProject.Name; var tfs = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(_tfs.Uri); var vsStore = tfs.GetService(); var project = “project”; var branchVersion = “1.0.0”; var folders = vsStore.GetItems(“$/” + selectedProjectName + “/*”, RecursionType.Full); 如何在特定选定项目内的TFS源代码控件中 搜索特定文件 , 以及用户从c#UI […]

用于TFS持续集成的NuGet包

我正在尝试使我们的TFS构建过程从我们的解决方案项目中生成NuGet包。 我们的目标是创建一个私有包源,因此所有其他内部产品可以使用NuGet下载/更新框架。 到目前为止,我们已经运行了构建过程(很长一段时间)并对我们的库进行版本控制,唯一剩下的就是“ nuget pack ”所有项目。 到目前为止我尝试了什么: nuget spec * .csproj,然后是nuget pack * .nuspec; nuget spec * .dll,然后是nuget pack * .nuspec; nuget pack * .csproj直接(没有.nuspec文件); 所有这些似乎都有效,但所有这些似乎都失败了我实际需要它们成功的步骤。 我通过上述步骤实际得到的结果: 没有列出依赖¹, 没有列出参考²; 没有列出依赖关系¹, 没有列出引用²,目录中的所有dll都打包在同一个.nupkg上(whitout使用-IncludeReferencedProjects); (目前为止最好的)列出了一些依赖项¹, 没有列出引用,只有实际的项目dll在.nupkg上的lib文件夹中。 ¹: 依赖于我的意思是NuGet依赖,来自NuGet的包 ²: 参考我的意思是解决方案项目参考。 示例场景: Solution1.sln – ProjectA – ProjectB ProjectA有ProjectB的项目参考 。 我希望在生成的.nuspec上发生什么: ProjectA <- OK 1.2.0.0 < – OK ProjectA <- […]

防止TFS添加临时文件

我正在开发一个在TFS中绑定的Project,这个项目给了我一个文件夹Log。 当我执行我的项目并进行一些测试时,它会生成文本文件并存储在Log文件夹中。 之后,当我尝试检入文件时,这些文件将作为TFS中的新文件签入。 我希望TFS排除这些文件。 我存储临时文件的文件夹是: \WebPages\ErrorLogs \WebPages\TempReports 在TFS中是否有设置,我可以说它不在TFS中包含此文件夹但是从服务器获取最新信息? 是否可以为此问题创建签入策略?

如何创建和使用符号服务器?

我创建了一个powershell脚本,在构建设置为release后,从drop位置获取所有pdb文件,并将它们复制到网络上共享的文件夹中。 我还创建了一个示例应用程序,并添加了包含我需要的程序集的nuget包(没有pdb文件)。 我在网上找到了一些引用,但我无法使用pdb文件调试程序集。 我正在使用VPN连接来连接到包含pdb文件和Visual Studio 2010的共享文件夹。 为了使用网络上共享的pdb文件能够调试我使用nuget包管理器获得的程序集,我需要做出哪些确切的步骤? 谢谢 !

无法解决程序集引用 – dependentAssembly问题?

我的构建服务器(TFS / Visual Studio Online)上发生以下错误: CA0055 : Could not load C:\a\Binaries\Api.dll. The following error was encountered while reading module ‘System.Net.Http.Formatting’: Assembly reference cannot be resolved: Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed. CA0058 : The referenced assembly ‘Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed’ could not be found. This assembly is required for analysis and was referenced by: C:\a\Binaries\Api.dll, C:\a\Sources\MyLocation\packages\Microsoft.AspNet.WebApi.Client.5.1.1\lib\net45\System.Net.Http.Formatting.dll. 以下是此程序集的Api.dll项目中的web.config […]

如何在C#中从TFS中检索工作项列表?

我正在尝试用WPF / C#编写项目报告工具。 我想访问TFS(Team Foundation Server)上的所有项目名称,然后显示给定项目中每个工作项的统计信息。 我有项目名称,但获得实际的工作项目正在给我带来困难。 这是我到目前为止所得到的: public const string tfsLocation = “http://whatever”; // get the top list of project names from the team foundation server public List LoadProjectList() { var tpc = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri(tfsLocation)); var workItemStore = new WorkItemStore(tpc); var projects = (from Project project in workItemStore.Projects select project.Name).ToList(); return projects; } public […]

TFS 2013在构建/部署期间引发Lib2GitSharp错误(间歇性)

有一段时间了,我一直遇到Team Foundation Server构建/部署过程的问题,间歇性地抛出以下错误: Unhandled Exception: System.TypeInitializationException: The type initializer for ‘LibGit2Sharp.Core.NativeMethods’ threw an exception. —> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) at LibGit2Sharp.Core.NativeMethods.git_threads_init() at LibGit2Sharp.Core.NativeMethods.LibraryLifetimeObject..ctor() at LibGit2Sharp.Core.NativeMethods..cctor() — End of inner exception stack trace — at LibGit2Sharp.Core.NativeMethods.RemoveHandle() at LibGit2Sharp.Core.NativeMethods.LibraryLifetimeObject.Finalize() Exception Message: MSBuild error 255 […]

使用VSTest运行unit testing用例而不是MSTest

我在TFS2010服务器上有一个x64平台C#解决方案(VS2012)。 我已将unit testing项目(也是x64)附加到此解决方案并创建了构建定义。 当我对构建进行排队时,它会成功,但不会执行unit testing用例。 这是因为MSTest是一个32位应用程序。 因此,我决定自定义默认构建过程模板(DefaultTemplate.xaml)以调用VSTest(VSTest.console.exe)而不是MSTest。 这非常复杂,我无法为VSTest的工具箱添加构建活动。 有人做过这种定制吗? 我还考虑过配置.runsettings文件等其他方法。 我们是否有可以添加到.runsettings文件中的VSTest适配器接口?

‘CSC:CSC(0,0):错误CS2001:找不到源文件。 在进行门控检查时(C#)

我似乎与我的项目有点混淆,每当一个门控构建和签入运行时,我得到以下错误….. Summary | Phase 1 15 error(s), 602 warning(s) Phase 1 – 15 error(s), 602 warning(s) CSC:CSC(0,0): Error CS2001: Source file ‘d:\a\3\s\Main\SmartEndPointAssessment\SA.SEPA.Web.UI.Selenium\Features\AssessmentCentreEpaFeatures.feature.cs’ could not be found. CSC:CSC(0,0): Error CS2001: Source file ‘d:\a\3\s\Main\SmartEndPointAssessment\SA.SEPA.Web.UI.Selenium\Features\AssessmentCentreFeatures.feature.cs’ could not be found. CSC:CSC(0,0): Error CS2001: Source file ‘d:\a\3\s\Main\SmartEndPointAssessment\SA.SEPA.Web.UI.Selenium\Features\AssessorEpaFeatures.feature.cs’ could not be found. CSC:CSC(0,0): Error CS2001: Source file ‘d:\a\3\s\Main\SmartEndPointAssessment\SA.SEPA.Web.UI.Selenium\Features\AssessorFeatures.feature.cs’ could not be […]

Team Foundation Server 2012 Express BuildTemplate处理xaml文件无法打开

我安装了Team Foundation Server 2012 Express的Visual Studio 2013 Express版本:12.0.21005.1REL。 我需要更改Build Process xaml文件,但是当我从源代码控制下载并打开文件时会发生这种情况: 我使用的机器是运行64位Windows 7的64位系统 – 但我很惊讶这应该发生。 当设计视图不可操作且xml难以阅读/更改时,我究竟如何改变此构建过程。 有没有什么资源可以帮助我? 或者无论如何我可以解决这个问题?