msbuild-task

MSB4044: The “KillProcess” task was not given a value for the required parameter “ImagePath”

最后都变了- 提交于 2021-02-11 14:18:40
问题 Long story short, I was able to build a bitbucket .NET/MVC/Angular project successfully on windows 2019 azure hosted agent, but I am unable to make it build successfully on ubuntu agent. The reason I want to build it on ubuntu is because I noticed the build time is way faster than that of the windows agent, which makes sense considering the platforms. I am facing this error: Copying file from "/home/vsts/work/1/s/Bobby.ProjectA/obj/Debug/Bobby.ProjectA.pdb" to "/home/vsts/work/1/s/Bobby

make an MSBuild Copy Task only copy if the source is newer regardless of size

醉酒当歌 提交于 2020-04-08 04:57:55
问题 I'm currently using an msbuild file to copy some files to the public documents folder when my EXE is compiled. My current script includes this: <Target Name="DeployToPublicDocuments" Inputs="@(DeploymentItems)" Outputs="$(PublicDocumentsFolder)%(Path)\%(DeploymentItems.RecursiveDir)%(DeploymentItems.Filename)%(DeploymentItems.Extension)"> <Copy SourceFiles="%(DeploymentItems.FullPath)" DestinationFiles="$(PublicDocumentsFolder)%(Path)\%(DeploymentItems.RecursiveDir)%(DeploymentItems.Filename)

make an MSBuild Copy Task only copy if the source is newer regardless of size

有些话、适合烂在心里 提交于 2020-04-08 04:56:24
问题 I'm currently using an msbuild file to copy some files to the public documents folder when my EXE is compiled. My current script includes this: <Target Name="DeployToPublicDocuments" Inputs="@(DeploymentItems)" Outputs="$(PublicDocumentsFolder)%(Path)\%(DeploymentItems.RecursiveDir)%(DeploymentItems.Filename)%(DeploymentItems.Extension)"> <Copy SourceFiles="%(DeploymentItems.FullPath)" DestinationFiles="$(PublicDocumentsFolder)%(Path)\%(DeploymentItems.RecursiveDir)%(DeploymentItems.Filename)

Does the MSBuild Exec task search STDOUT for the string “error”?

拜拜、爱过 提交于 2020-02-01 04:26:45
问题 I have a small NUnit test suite with a single ignored test. I'm just now writing a simple MSBuild script to restore and publish and the like. I tried to get a dotnet test task working <Target Name="test" DependsOnTargets="restore"> <Exec Command="dotnet test" WorkingDirectory="test\Example.Tests" /> </Target> But, it exits with code -1 every time! PS> dotnet msbuild /t:test build.xml Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core Copyright (C) Microsoft Corporation. All

Nuget Restore in MS Build Step

随声附和 提交于 2020-01-17 00:46:32
问题 In my asp.net web application, i have solution with 5 projects and nuget.org. In TFS Build Definition, 1) While building the whole solution in Visual Studio Build Task Nuget packages getting restored. 2) While trying to generate executable files for individual projects in MS Build Task If I select Restore Nuget packages, It's not finding nuget packages and step getting failed with message - "Process 'NuGet.exe' exited with code '1'." I have tried many references online and none worked. Any

Wix - Use WixVariables on .wixproj

丶灬走出姿态 提交于 2020-01-15 01:52:52
问题 i'm on Visual Studio 2012 and i use wix I wanted to use a WixVariables or a DefineConstants on Target After build (wixproj) when i unload the project i used on <DefineConstants>VersionNodeServer=0.0.1;</DefineConstants> Or <WixVariables>VersionNodeServer=0.0.1;</WixVariables> but when i used this variable 'VersionNodeServer' like that <Target Name="AfterBuild"> <WebDownload FileName="test.msm" FileUri="$(VersionNodeServer)"/> the build failed because FileUri is empty. i saw my variable on the

MSBuild - trying to run xUnit (.net) tests

断了今生、忘了曾经 提交于 2020-01-14 09:08:09
问题 I'm trying to set up a C# project that'll run xUnit tests when I build, so I can use them in continuous integration. I have a regular project, a class library test project using xUnit, and my test runner project. From everything I've read, it appears that I should be able to get this working by doing this in the test runner project: <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> [auto

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="$

Using MSBuild to Build Multiple Configurations

时光毁灭记忆、已成空白 提交于 2020-01-09 06:28:52
问题 I'm trying to edit my project file to enable me to have a project that builds multiple build configs at once. I've done this using a batching approach and using the MSBuild task (see below). If I run the script, I get an this error: Error 103 The OutputPath property is not set for project "ThisMSBuildProjectFile.csproj". Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='AnyCPU'. I get this if I

Pass custom msbuild target from Solution to Project

你离开我真会死。 提交于 2020-01-02 02:41:12
问题 I have a Solution with a large number of associated .csproj files. Each .csproj file has a <Target Name="PublishQA">... . The build fails when I try to compile the whole solution: > msbuild mysolution.sln /t:PublishQA` "c:\myproj.sln" (publishqa target) (1) -> c:\myproj.sln.metaproj : error MSB4057: The target "PublishQA" does not exist in the project. [c:\myproj.sln] When I build the .csproj project directly, it builds just fine. How do I tell msbuild to pass the target to the project files?