tfsbuild

MSBuild add file to primary output

雨燕双飞 提交于 2020-01-03 18:51:50
问题 How can i add some custom file created by MSBuild to project output? i.e. I have blank .csproj, I add Exec task to Target that generates some file.txt and now i want to include this file into "primary output" or "content files". Thanks, Marek 回答1: Generally, you just need to include the output files you have and then copy them to the output directory. <CreateItem Include="$(SourcePath)\file.txt"> <Output ItemName="FilesToCopy" TaskParameter="Include" /> </CreateItem> <Copy SourceFiles="@

cannot modify .csproj files using build auto with tfs 13

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-03 16:51:42
问题 I created a workflow activity named EditCsproj which is a C# class that I added to my build template. I put it right after the Initialize Workspace step. This workflow has to get all .csproj files in the directory path that I provide as a parameter and it has to modify them. But for each files, I have the following error : Access to the path 'file.csproj' is denied. I run Visual Studio with Administrator rights and I already changed the msbuild multi-proc property to false. Does anybody have

tfs build server - string interpolation $ Character is not valid

陌路散爱 提交于 2020-01-03 07:37:09
问题 i am using string interpolation using $ in my code. It compiles fine but when i check in my code, the build server throws an error BC30037: Character is not valid . Following is an example on how i have used string interpolation: dim r = New RadNode($"{acq.FormNo} - ${CInt(acq.TotalAmount)}", icon:=RadTreeIcons.RedTriangle) The build server has Visual Studio 2015 Entreprise edition installed. If i run this from command prompt: C:\Program Files (x86)\MSBuild\14.0\Bin>MSBuild /tv:14.0 "Proj.sln

How do I update a single nuget package in a project from the command line?

末鹿安然 提交于 2020-01-03 07:21:08
问题 I am trying to update a single package in a csproj with multiple dependencies. That is, the packages.config file looks like this: <packages> <package id="PackageA" version="1.2.1" targetFramework="net40" /> <package id="PackageB" version="2.3.4" targetFramework="net40" /> <package id="PackageC" version="1.0.0" targetFramework="net40" /> </packages> I'd like to update PackageA without updating the others. I see that Update-Package in the Visual Studio package manager has this capability, but

Failure to build on VS Online because of Nuget, works locally

这一生的挚爱 提交于 2020-01-03 06:21:50
问题 Running locally in VS2015. Everything builds fine. If I deploy to VS Online, the build fails as it cannot find HTML Agility Pack, which is in the solution as a Nuget package. I have checked that Restore NuGet Packages is ticked in VS Online. Any thoughts on anything I'm not doing. 回答1: OK, I seem to have found the problem. The packages had been checked into source control. Not sure if they should or not, but there we are. By removing them from the packages folder, it then seemed to restore

Specifying code analysis setting in TFS 2010 build

心已入冬 提交于 2020-01-03 04:09:27
问题 In the build definition of TFS 2010, when "Perform Code Analysis" set to "Always" how can I specify a custom code analysis rules file? The build flavour is "Release". I prefer not to set "AsConfigured" for "Perform Code Analysis" so that the settings are picked from proj file. Thanks. 回答1: You should be able to use the "MSBuild Arguments" entry in your build process parameters configuration to provide a /property command line entry that will be passed to MSBuild, thereby allowing override of

Create a workspace from Powershell run within VS Team Services build

余生长醉 提交于 2020-01-02 04:02:14
问题 I am writing a Powershell script as part of a Visual Studio Team Services build, this build uses a hosted build controller. The script is intended to check out a file, make changes then check it back in. In the script I am trying to invoke the tf command to create a new workspace but I'm having authentication issues. The command & $tf vc workspace /new $tempWorkspaceName /collection:https://mycollection.visualstudio.com/ produces the error: TF30063: You are not authorized to access https:/

Dependency on the framework assembly “System.Runtime, Version=4.0.10.0,” which could not be resolved in the currently targeted framework

对着背影说爱祢 提交于 2020-01-02 02:40:28
问题 TFS 2013 - Build: ASP.Net 4.5.1 website I get this error: warning MSB3268: The primary reference "C:\Builds\2\MyProj\Web1_Main\bin\MyProj1.dll" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.5.1". To resolve this problem, either remove the reference "C:\Builds\2\MyProj\Web1_Main

Using AsConfigured and still be able to get UnitTest results in TFS

回眸只為那壹抹淺笑 提交于 2020-01-01 08:47:08
问题 So I am running into an issue when I go to build my projects using tfs build controller using the Output location "AsConfigred" it will not detect my unit tests. Let me give a little info on my setup. TFS 2013 Update 2, Default Process Template Here is a few screenshots that can hopefully help fill in what I can't in typing. I am copying my build out to a file share on our network so that we can use other utilities use the output. I don't want to use "PerProject" or "SingleFolder" because

Building specific branches on Visual Studio Team Services

故事扮演 提交于 2020-01-01 04:16:14
问题 I have a repository in VS Team Services which is setup as : -root | | -Dev (.sln) | | -Releases | | - Test (.sln) | - Live (.sln) Each build is working fine, however its pulling the entire repo and I just want it to pull a specific branch (Dev, Test or Live) So I'm selecting the Solution.sln file in the dev branch... 回答1: On the Repository tab you can specify your workspace mappings, the default mapping grabs your whole repository excluding the $/project/drops folder. By changing the first