msbuild

TFS build, one build for many branches

旧街凉风 提交于 2019-12-21 04:19:08
问题 We use TFS source control and have two build controllers (one VS2010 the other VS2012). We use the default build workflow template bar a few custom changes. As we have many branches, how would we go about changing the workspace based on the desired branch? I was thinking of adding a parameter for the branch ( $\oursourcecontrol\branches\main ) and then just passing it as a variable in to the get workspace part of the workflow. Or is there a better way of doing it? 回答1: You currently can't and

How to create MSdeploy Package using MSBuild for all files in this project folder

泪湿孤枕 提交于 2019-12-21 04:12:36
问题 I'm trying to create a web deploy package using msbuild through command line. I have been searching all over and found the following command msbuild myproject.csproj /t:package Though it works for me but it gives me only what visual studio gives us back when we create web deploy package through Packge/Publish Web tab with "only files needed to run this application" option selected from the drop down menu. But I want my web deploy package to look exactly the same as what I get when I select

How do we authenticate against a secured NuGet server with Cake build?

给你一囗甜甜゛ 提交于 2019-12-21 03:58:22
问题 We are working on automating our builds using Cake Build and we use NuGet packages from nuget.org but we also have our own NuGet Feed server which has a username/password authentication to access. How do we utilize Cake Build with a custom NuGet feed server with authentication? 回答1: Cake utilizes the NuGet.exe for installing tools, addins and the NuGet aliases. Unless you have a source specified in the #tool / #addin directives or provided to the NuGet aliases, then NuGet.exe will look for

MsBuild not generating PDB files in Release configuration

℡╲_俬逩灬. 提交于 2019-12-21 03:50:08
问题 <MSBuild Projects="$(ProjectFile)" Targets="_WPPCopyWebApplication;" Properties="OutDir=..\publish;Configuration=Release;Platform=AnyCPU" /> I am using above script to publish Asp.Net project. In the project settings, I have absolutely made sure debug symbols are generated in release mode. Still MsBuild is not generating the pdb files in the output. <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>Full</DebugType> <DefineDebug>false</DefineDebug>

Build one web project from a Solution with multiple web projects in Visual Studio Online Build Definition

你。 提交于 2019-12-21 03:46:48
问题 I'm facing a problem where I need to build only one web project from a solution with two web projects in Visual Studio Online. I have not found how to build only one project using a "Visual Studio Build" step. It would be great if exist such a way to do this with "Visual Studio Build" step. I also tried to use an "MSBuild" step. Unfortunately I got a problem when restoring the packages with Nuget. I got the error: ##[error]No file format header found, ##[error]Unexpected exit code 1 returned

How do I update an XML attribute from an MSBuild script?

梦想的初衷 提交于 2019-12-21 03:46:07
问题 I am using MSBuild and MSBuild Community Tasks (using XMLUpdate and XMLMassUpdate) to update various sections of my Web.config one thing has me stumped though. If I have: <configuration> <nlog throwExceptions="true" xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <targets> <target name="file" xsi:type="File" fileName="${logDirectory}\SomeLog.log" layout="${message}"/> </targets> </nlog> </configuration> and I try to replace the

How do I pass a property value containing a semicolon on the MSBuild command line when running it from PowerShell?

泪湿孤枕 提交于 2019-12-21 03:45:12
问题 I'm attempting to pass a property to MSBuild. The property is a semicolon-delimited list of values. Unlike this question, I'm running MSBuild from PowerShell. I get: PS> msbuild .\Foo.sln /p:PackageSources="\\server\NuGet;E:\NuGet" MSBUILD : error MSB1006: Property is not valid. Switch: E:\NuGet If I run the same command from Command Prompt, it works fine. How do I get it to work in PowerShell? 回答1: Wrap the parameter in single quotes: ... '/p:PackageSources="\\Server\NuGet;E:\NuGet"' On

Perform XSLT Transform as Build-Step

自作多情 提交于 2019-12-21 03:36:33
问题 During a Visual Studio build, I need to have an XML file generated from another XML file. It is obvious to me an XSLT template and transform is exactly what I need. The way I prefer to accomplish this is to use the "Custom Tool" property found on project files. Is there already a built-in tool I can use for this purpose? My next option might be to use a pre-build step of the csproj. Again, is there a (Visual Studio or MSBUILD) pre-existing or pre-installed tool that I can invoke from a pre

How to modify the csdef defined in a cspkg

僤鯓⒐⒋嵵緔 提交于 2019-12-21 02:45:05
问题 To deploy to different azure environments I modify the csdef as part of the compilation step to change the host headers. Doing so requires building the cspkg once for each environment instead of being able to reuse the cspkg and specify different configs for deployment. I would like to instead modify the csdef file of a cspkg after it has been created, without recompiling. Is that possible, and if so how? 回答1: I've done something similar to what you're after to differentiate between test and

msbuild/clickonce publish files generated during the build

核能气质少年 提交于 2019-12-21 02:43:28
问题 As a part of my build process I generate some files that should be included when creating a clickonce deployment. Here is a blog post of someone telling you how to include items that's not part of the project. However, as someone mentions in the comments of that blogpost, it won't update the deploymentmanifest when you do it in the "BeforePublish" task and the files won't get downloaded - it works fine if you do it in the "BeforeBuild" task though. This gives me a chicken and egg problem as I