msbuild

MsBuild Condition Evaluate Property Contains

吃可爱长大的小学妹 提交于 2020-01-22 17:14:04
问题 Attempting to create an itemgroup for use in a target where the file types are - Filename.CSS.ASPX <Target Name="Test" AfterTargets="Build"> <Message Text="Project $(ProjectName) Test PostBuild" Importance="high" /> <Message Text="%(Content.FullPath)" Condition="%(Extension) == '.aspx' AND %(Filename.Contains(css))" Importance="high" /> </Target> On Compile; Error 1 Expected "%(Filename.Contains(css))" to evaluate to a boolean instead of "%(Filename.Contains(css))", in condition "%(Extension)

Suppressing AfterBuild targets when a csproj has not been built

自作多情 提交于 2020-01-22 12:16:15
问题 I have a post-build target in MSBuild to copy some build outputs. This is linked in as a dependency to the AfterBuild target (exposed by Microsoft.CSharp.targets ): <Target Name="AfterBuild" DependsOnTargets="InstallUtil;CopyPostBuildFiles" /> Is there any way to avoid the files being copied if the build didn't actually re-build? For example, when the MSBuild dependency analysis asserts that the project doesn't need to be built because none of its source files have been updated, it doesn't

Merge multiple web projects into a single output zip package

℡╲_俬逩灬. 提交于 2020-01-21 05:40:06
问题 I'm using Visual Studio Online and working through building a continuous integration setup. The scenario I have requires that multiple web projects are built out to a single Azure App Service deployment. The catch is that "out of the box" when you create a new build, the Visual Studio Build task appears to create a separate zip file for each project in the solution, and then the Azure App Service Deploy task throws an error saying there is more than one file matching the pattern, which is *

Using MSBuild to sign ClickOnce or assembly results in error MSB3321

北慕城南 提交于 2020-01-21 04:55:08
问题 I've set up my simple project in Visual Studio 2008 to use a ClickOnce installer. I've specified that the ClickOnce manifests should be signed by our comapny's PFX file. When I set this up in Visual Studio it asked for the password for the PFX file, which I gladly supplied. Everything works fine when I build and publish from within Visual Studio. It also works fine building from MSBuild on my machine. However, when I try to build it using MSBuild on our build machine, I get the following

SonarQube MSBuild Scanner doesn't exclude files from analysis

两盒软妹~` 提交于 2020-01-21 01:42:06
问题 We are currently using SonarQube Scanner for VSTS/TFS 4.1.1 (which is using SonarQube Scanner 4.1.1). What we want to do: For some projects (modules) in our solution we want to exclude files from the analysis and from the code coverage statistics. This should be done in a maintainable way by using file patterns and not modifying the TFS Build task. Project structure: |- Source |- ProjectA |- Scripts (should be excluded) |- OwnCode |- ProjectB |- Views (only code coverage should be excluded) |

Start vNext build from Powershell and get artifacts

可紊 提交于 2020-01-20 22:13:06
问题 In order to automate our deployments, I would like to rebuild an application, based on a given ChangeSetId. Once this build has completed, I want to get the artifacts of the build (the .exe), so we can deploy them. For the sake of the question I am focussing on the 'Get artifacts from build' part. For DevOps purposes, I'd like to use PowerShell, since it should be able to access the TFS API libraries and because MS recommends using it. Environment I've set up Builds in our On Premise TFS 2015

CreateItem vs ItemGroup

只谈情不闲聊 提交于 2020-01-20 16:53:28
问题 What is the difference between creating an item inside a target like this: <Target Name="DoStuff"> <CreateItem Include="@(IntermediateAssembly)" > <Output TaskParameter="Include" ItemName="FileWrites"/> </CreateItem> </Target> and like this: <Target Name="DoStuff"> <ItemGroup> <FileWrites Include="@(IntermediateAssembly)" /> </ItemGroup> </Target> When would you use one or the other and why? 回答1: In versions of MSBuild prior to 3.5 you could not define properties or items inside of targets

CreateItem vs ItemGroup

空扰寡人 提交于 2020-01-20 16:52:27
问题 What is the difference between creating an item inside a target like this: <Target Name="DoStuff"> <CreateItem Include="@(IntermediateAssembly)" > <Output TaskParameter="Include" ItemName="FileWrites"/> </CreateItem> </Target> and like this: <Target Name="DoStuff"> <ItemGroup> <FileWrites Include="@(IntermediateAssembly)" /> </ItemGroup> </Target> When would you use one or the other and why? 回答1: In versions of MSBuild prior to 3.5 you could not define properties or items inside of targets

Visual Studio 2012 RTM has MSBuild.exe in memory after close

断了今生、忘了曾经 提交于 2020-01-20 02:14:09
问题 I noticed when Visual Studio 2012 RTM was closed, that many instances of MsBuild.exe are still in memory. Why ? 回答1: The MSBuild processes are kept running for a period of time (fifteen minutes, I believe) after Visual Studio is closed. This is an attempt to improve performance, the idea being that idle MSBuild processes could be reused if another build is kicked off soon and the overhead of spawning a new process can be eliminated. You can disable this by setting an environment variable

Visual Studio 2012 RTM has MSBuild.exe in memory after close

ぃ、小莉子 提交于 2020-01-20 02:13:58
问题 I noticed when Visual Studio 2012 RTM was closed, that many instances of MsBuild.exe are still in memory. Why ? 回答1: The MSBuild processes are kept running for a period of time (fifteen minutes, I believe) after Visual Studio is closed. This is an attempt to improve performance, the idea being that idle MSBuild processes could be reused if another build is kicked off soon and the overhead of spawning a new process can be eliminated. You can disable this by setting an environment variable