msbuild

TFS build - deployment/package target does not run

本小妞迷上赌 提交于 2020-01-13 18:05:39
问题 We have a TFS build definition set up where we pass the following extra MSBuild arguments in: /p:DeployOnBuild=true;DeployTarget=PipelinePreDeployCopyAllFilesToOneFolder;_PackageTempDir="\\server\build";AutoParameterizationWebConfigConnectionStrings=false This has been detailed elsewhere as a way to have the published files copied to a specific location instead of generating a deploy package. This unfortunately does not work on our build server, however if I run the exact same msbuild command

MsDeploySkipRules in wpp.targets not working with PublishProfiles

六眼飞鱼酱① 提交于 2020-01-13 05:15:07
问题 I am publishing my MVC project with the PublishProfile through visual studio, (through UI, right click project, publish) and ticking the option to clear the destination folder. But I do not want a specific folder "Downloads" to be cleared I have spent countless hours trying to make this work, I think I have the exact same code as the person explained here but it still deletes the Downloads folder Also as example in the below I have the ExcludeFromPackageFiles of "favicon" which works if I

MSBuild and <AutoUnifyAssemblyReferences />

半世苍凉 提交于 2020-01-13 02:43:14
问题 The "Microsoft.Bcl.Build.targets" contains this block: <!-- Workaround MSBuild issue that prevents System.Runtime 2.5 and System.Threading.Tasks 2.5 from satisfying indirect dependencies on System.Runtime 1.5 and System.Threading.Tasks 1.5 respectively. --> <AutoUnifyAssemblyReferences>false</AutoUnifyAssemblyReferences> What actually "AutoUnifyAssemblyReferences" do? 回答1: It maps directly to the AutoUnify parameter of the ResolveAssemblyReferencs-Task. Excerpt from the documentation: This

MSBuild and <AutoUnifyAssemblyReferences />

為{幸葍}努か 提交于 2020-01-13 02:43:01
问题 The "Microsoft.Bcl.Build.targets" contains this block: <!-- Workaround MSBuild issue that prevents System.Runtime 2.5 and System.Threading.Tasks 2.5 from satisfying indirect dependencies on System.Runtime 1.5 and System.Threading.Tasks 1.5 respectively. --> <AutoUnifyAssemblyReferences>false</AutoUnifyAssemblyReferences> What actually "AutoUnifyAssemblyReferences" do? 回答1: It maps directly to the AutoUnify parameter of the ResolveAssemblyReferencs-Task. Excerpt from the documentation: This

Run Roslyn Code Analyzers on Build Server

邮差的信 提交于 2020-01-12 18:34:33
问题 I'm trying to create custom static analysis rules against my code base such that compiler errors will be generated if a developer fails to follow my companies coding convention. It seems with Visual Studio 2015, Roslyn Code Analyzers are the way to accomplish this. The MSDN articles I've read indicate Code Analyzers are packaged up as NuGet or VSIX packages. That's great for adding red squiggles in Visual Studio, but I want to make sure the compiler errors are also generated on my Jenkins

How do I pass this common property to MSBuild using TeamCity?

ⅰ亾dé卋堺 提交于 2020-01-12 13:45:30
问题 I am using the TeamCity Visual Studio runner. I want to add a setting that is not accessible from Visual Studio. /Property:FileAlignment=4096 I typed that directly into the build step "Command line parameters." The build log shows the error: MSBuild command line parameters contains "/property:" or "/p:" parameters. Please use Build Parameters instead. I don't understand how to provide this to MSBuild from TeamCity and get rid of this warning! 1. Which kind of parameter should I use? There are

How to get an XML report out of MSBuild Code Analysis

依然范特西╮ 提交于 2020-01-12 08:02:13
问题 Running MSBuild with /p:RunCodeAnalysis=true on a C# project does generate the code analysis warnings on the build output, but what's the switch that lets me export these warnings (only the code analysis warnings not the entire build output) to an XML file? 回答1: The XML report is generated by default. The file name is MyAssembly.dll.CodeAnalysisLog.xml or MyApplication.exe.CodeAnalysisLog.xml , you should be able to find it in the output folder for you project. To change name of the XML

“Access is denied” on build server when deploying Web API project with XML documentation

梦想的初衷 提交于 2020-01-12 06:51:09
问题 In order to generate XML documentation using Web API Help Pages for my Web API project, I had to check the "XML documentation file" option under the "Builds" section of my project's properties. This correctly generates the documentation when I build locally. However, when I check in, I get the following error on the build server: CSC: Error generating XML documentation file 'c:\Builds\3...\Sources\CurrentVersion...\ProjectName\App_Data\XmlDocument.xml' ('Access is denied. ') I'm not sure why

Dynamically setting the IISUrl of a Web Application Project

旧巷老猫 提交于 2020-01-12 04:32:08
问题 I have a web application project that I'd like to be able to branch and develop on a totally separate IIS site and not have to keep editing the vbproj IISUrl setting each time I do it. I have tried adding an import of some standard properties so I can maintain them outside of the WAP file but when I reference them in the element it doesn't like them. I suspect it's because the IISUrl element is part of which is a place to put non msbuild info. As you can see in the code below, I'm trying to

MSBuild AfterBuild Step

送分小仙女□ 提交于 2020-01-11 12:49:08
问题 I have added the following code to a VisualC++ 2010 .vcxproj file just inside the first <project> tag: <PropertyGroup> <PilotStationDirectory>\..\..\PilotStation\PilotStationApp\$(Configuration)</PilotStationDirectory> </PropertyGroup> <ItemGroup> <MySourceFiles Include="$(TargetName).dll;$(TargetName).lib;$(TargetName).pdb" /> </ItemGroup> <Target Name="AfterBuild"> <MakeDir Directories="$(PilotStationDirectory)" /> <Copy SourceFiles="@(MySourceFiles)" DestinationFolder="$