Tag: 蔚DEVOPS

WPF VSTS应用程序挂在VS凭据提示上

我正在尝试编写一个使用Visual Studio Team Service(VSTS)API的应用程序来显示Visual Studio Online中的项目。 我有以下代码在控制台应用程序中完美运行: var connection = new VssConnection(new Uri(collectionUri), new VssClientCredentials()); using (var witClient = connection.GetClient()) { var wiql = new Wiql { Query = “SELECT [System.Id] FROM WorkItems WHERE State = ‘New'” }; var workItems = await witClient.QueryByWiqlAsync(wiql); } 在控制台应用程序中,我收到一个Visual Studio提示输入凭据,一切都很好。 但是,当我从WPF运行相同的代码时,我没有得到提示,并且应用程序似乎挂起了。 在允许它从按钮单击事件异步运行后,我在WPF应用程序中工作了一小段时间。 然后我做了一些更改,几小时后 – 我一直无法得到它。 我按照CTRL + Z的方式回到它工作的地步,但仍然没有。 我怀疑这与线程管理有关,我已经尝试了使用Dispatcher.Invoke并在Window_Loaded运行或将其连接到一个按钮所能想到的一切。 […]

msbuild命令行尚不支持WebPublishMethod(FileSystem)

我正在使用Visual Studio Team Services(在visualstudio.com上)和运行VS2015的内部部署构建代理。 在我们的解决方案中,有3个网站使用文件系统发布配置文件到Dev,Test,Demo环境并应用了配置转换。 从本地VS2015 IDE中运行时,这些工作正常。 尝试从Team Services中的构建定义中的“ Visual Studio Build ”任务发布相同的配置文件时,会遇到以下错误: msbuild命令行尚不支持此特定WebPublishMethod(FileSystem)。 请使用Visual Studio进行发布。 为任务上的MSBuild参数设置了以下内容。 / p:DeployOnBuild = true /p:OutDir=$(build.artifactstagingdirectory)/ p:PublishProfile = TestProfile 花了几个小时谷歌搜索我找不到一种方法来让构建任务通过错误。 我们要做的是将网站部署到文件位置,并为适当的环境应用配置转换。 无法使用Webdeploy或FTP,只能使用文件系统部署。 是否可以通过配置转换获取文件系统发布配置文件,以便从来自Team Services的内部部署构建代理工作? 或者我需要以另一种方式解决这个问题吗? 建议的副本不会遇到相同的问题或错误消息。 在那个问题中,发布配置文件有效,只是没有提供op期望的文件,这个问题是关于这里报告的错误。

‘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 […]

找不到项目文件

我有一个现有的TFS项目,其结构类似于: 我在框架目录中创建了一个包含2个项目的解决方案。 然后我将Cerberus&Cerberus.Mvc作为现有项目添加到OnFaitQuoi解决方案中。 (注意先前检查了cerberus溶液)。 当我签入我的项目时,我遇到了一些错误,包括: 是否意味着TFS azure不支持这种情况,或者只是我在某处犯了错误?

如何将以下JSON传递给C#补丁方法w或没有Javascript序列化程序

我正在开发一个程序来访问Visual Studio Team Services的REST API(是Visual Studio Online)。 我关注https://www.visualstudio.com/integrate/api/wit/work-items 我能够通过使用以下代码片段传递正确的ID来查询工作项: var uri = new Uri(“https://{instance}.visualstudio.com/DefaultCollection/_apis/wit/workitems/7?api-version=1.0”); GetWorkItem(uri); public static async void GetWorkItem(Uri uri) { try { var username = “my username”; var password = ” my pass word”; using (HttpClient client = new HttpClient()) { client.DefaultRequestHeaders.Accept.Add( new MediaTypeWithQualityHeaderValue(“application/json”)); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(“Basic”, Convert.ToBase64String( ASCIIEncoding.ASCII.GetBytes( string.Format(“{0}:{1}”, username, password)))); […]

使用TFS 2015 .NET客户端库从模板创建构建定义

我正在使用.NET Client Client for VSTS / TFS 2015以编程方式创建基于我在另一个团队项目中获取的模板的构建定义。 我可以使用以下命令获取构建定义模板(2.0): BuildDefinitionTemplate builddeftemplate = buildHttpClient.GetTemplateAsync(teamProject, templateId).Result; 我可以使用以下方法创建构建定义: BuildDefinition builddef = new BuildDefinition(); builddef.Project = newTeamProject; 但是看起来不像是将模板作为构建定义的属性传递,也不是从模板创建构建定义。 在查看REST API的文档时,GET请求实际上看起来像返回了很多JSON: { “id”: “vsBuild”, “name”: “Visual Studio”, “canDelete”: false, “category”: “Build”, “iconTaskId”: “71a9a2d3-a98a-4caa-96ab-affca411ecda”, “description”: “Build and run tests using Visual Studio. This template requires that Visual Studio be installed on […]

无法激活Xamarin Unhanded ERROR – Visual Studio 2015更新2

我尝试在Visual Studo 2015 Update 2上激活xamarin帐户,错误是: System.FormatException: One of the identified items was in an invalid format. at Xamarin.Components.Ide.Activation.ActivationService.GetErrorWorkflow(LicenseSyncResult[] results, Boolean ignoreSyncErrors) at Xamarin.Components.Ide.Activation.ActivationService.d__100.MoveNext() at Xamarin.Components.Ide.Activation.ActivationDialog.DisplayWorkflowStep(ActivationWorkflowStep step) at Xamarin.Components.Ide.Activation.ActivationDialog.c__DisplayClass11.b__12(Task t)

通过TFS API从Visual Studio Online获取构建定义

我在通过TFS API从Visual Studio Online项目检索构建信息时遇到问题。 我似乎可以连接到项目,并找到预期的团队项目集合和团队项目,但是尽管项目有两个构建定义和许多构建,但在查询构建时,TFS API总是向我返回零长度数组定义或构建。 该项目是一个Git项目。 我的生产代码类似于我为试图调试问题而编写的测试代码: var tfsUri = new Uri(“https://[my project].visualstudio.com”); var tcs = new TfsConfigurationServer(tfsUri); var teamProjCollections = tcs .CatalogNode .QueryChildren( new[] { CatalogResourceTypes.ProjectCollection }, false, CatalogQueryOptions.None) .Select(collectionNode => new Guid(collectionNode.Resource.Properties[“InstanceId”])) .Select(collectionId => tcs.GetTeamProjectCollection(collectionId)); var tpc = teamProjCollections .Single(x => x.Name == @”[my project].visualstudio.com\DefaultCollection”); var newTeamProjects = tpc .CatalogNode .QueryChildren( new[] […]