tfsbuild

TFS 2015 Build vNext recursive variable substitution

a 夏天 提交于 2019-12-06 21:37:29
Is it possible that the variable substitution is not recursive? Example1: Variable Value SqlInstance (localDb)\mssqllocaldb DbCatalogName FooDb ConnStr data source=$(SqlInstance);initial catalog=$(DbCatalogName)$(Build.BuildId); During the build the connection string substituted to: data source=(localDb)\mssqllocaldb;initial catalog=FooDb3211; This configuration works perfectly. But if i move the BuildId parameter to DbCatalogName variable it won't be substituted. Example2: Variable Value SqlInstance (localDb)\mssqllocaldb DbCatalogName FooDb$(Build.BuildId) ConnStr data source=$(SqlInstance)

Could not get dependencies for project reference

亡梦爱人 提交于 2019-12-06 16:36:41
问题 I have a C# solution with a website project and a C# library. When compiling the solution, the website gives the message: Could not get dependencies for project reference 'MyLibrary'. This does not stop the wbsite compiling and running until I try and build it with a TFS build, when this error message fails the build. What does this mean and how can I get round it? 回答1: Open the Website proj file in notepad and check the reference etc... can help 回答2: After trying many things, I realized

VSTS build summary tab with visible condition or Task dependency

こ雲淡風輕ζ 提交于 2019-12-06 15:44:35
I try to add new custom tab to summary page for build result, but which will be added only for builds with my custom build Task. For example, Task "publish artifacts", only if this task was added, the tab "artifacts" added in summary page. I want the same behavior for my task and tab. For now, I've just added in vss-extension.json, in "contributions" { "id": "build-info-tab", "type": "ms.vss-build-web.build-results-tab", "description": "A tab contributing to build results view", "targets": [ "ms.vss-build-web.build-results-view" ], "properties": { "name": "My Build info", "uri": "infoTab.html"

How do you send a patch request from a c# client?

妖精的绣舞 提交于 2019-12-06 15:01:55
I have a powershell script that does this : $uri = "$($tfsUri)/$($teamproject)/_apis/build/builds/$($buildID)?api-version=2.0" $data = @{keepForever = $keepForever} | ConvertTo-Json $response = $webclient.UploadString($uri,"PATCH", $data) I'm trying to rewrite this in C#, using a Webclient. WebClient client = new WebClient(); client.Encoding = System.Text.Encoding.UTF8; string reply = client.UploadString(url, "keepForever = true"); Console.WriteLine(reply); But I get : The remote server returned an error: (401) Unauthorized. This is TFS 2015 VNext, if that helps. You are missing the METHOD in

TFS 2010 Issue with tracking Changesets in Builds that are a result of Gated Checkins

北城以北 提交于 2019-12-06 11:59:37
问题 In order to retrieve the information which Changeset was included in which Build, we use "Label Sidekick" of Team Foundation Sidekicks, where we place the Label of the Build & expect to find the newly built Changeset. Our development process in TFS 2010 is making use of 'Gated' checkins, so we are faced with the situation that the latest checkins are not presented in Sidekicks (we actually receive the changeset of the previous build). This is explainable, since at the time the labeling takes

How do you hook an editor for TFS 2010 WF BuildProcessTemplate arguments for built-in types that have a converter?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 11:25:27
I've followed the Team Foundation Server 2010 book 's custom editor for a dictionary<string,string> and can't get it to go. I have another custom editor in the same assembly, and consumed by the same build template that works. This SO hints at it being a TypeConverter issue, but I don't think any part of a custom build assembly is just run when it is loaded. I'm getting the default generic Collection Editor instead of mine. I have tried using code more like my credential UITypeEditor uses, and then tried typing exactly what's in the book for a UITypeEditor . The dialog itself should not matter

Team Build - Get Workspace - get latest from specific paths, NOT everything

放肆的年华 提交于 2019-12-06 10:06:29
问题 I have a simple build definition which I want to use to build just one project, and every time I choose to run this build, I want to get latest from the branch/directories that pertain only to the project in question. How do I do that? The call to "Get Workspace" gets everything from source control, and I do not want to (or need to, for that matter) get latest from everything for various reasons. I hope I am not asking for much. Thanks in advance. 回答1: Check the workspace mapping in the build

TFS 2012 automatically build projects that depend on current one

…衆ロ難τιáo~ 提交于 2019-12-06 09:44:31
Ok so I have to admit, I'm very new to all of this build automation stuff. But basically what I'm wondering is if there is a way to wire up my build definitions in such a way that if I have a case like so ProjectA produces ComponentA.dll ProjectB references ComponentA.dll and produces ComponentB.dll ProjectC references ComponentB.dll then when I make changes to ProjectA and check them in, the build process would automatically also build ProjectB, and finally ProjectC, and report any errors. So is there a way to accomplish this, or should this type of thing be handled somehow completely

How to Recursively Delete wildcard files in TFS Build?

牧云@^-^@ 提交于 2019-12-06 08:56:00
I want to recursively delete files that match a certain pattern as part of my post-build cleanup routines in TFS Build. I've tried this... <Delete Files="T:\DeploymentDir\**\A*" /> No errors in the build, but it doesn't work. Modify your TFSBuild.proj file and add the following lines at the very end (just before closing ): <Target Name="AfterDropBuild"> <ItemGroup> <FilesToDelete Include="$(DropLocation)\$(BuildNumber)\**\temp*.*" /> </ItemGroup> <Delete Files="@(FilesToDelete)" TreatErrorsAsWarnings="true"/> </Target> I don't think the Delete task will automatically expand the wildcard. You

Connect to external services inside Visual Studio Online build/test task

。_饼干妹妹 提交于 2019-12-06 08:41:02
问题 We are running our build and test process on TFS Online. This works fine, until we try to connect to an external service. In our case a SQL Database. The discussion about what we should mock and not is not really helpful in this case, as currently we need to do this. We also tried just a simple ping, but not even that is getting out: Test-Connection "172.217.18.100" #resolves to www.google.com Testing connection to computer '172.217.18.100' failed: Error due to lack of resources So we have