Questions tagged [msbuild-task]

MSBuild tasks give the MSBuild platform the ability to execute any number of actions during the build process. A task is a unit of executable code used by MSBuild to perform atomic build operations.

MSBuild tasks give the MSBuild platform the ability to execute any number of actions during the build process. A task is a unit of executable code used by MSBuild to perform atomic build operations.

741 questions
7
votes
1 answer

Does the MSBuild Exec task search STDOUT for the string "error"?

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
Anthony Mastrean
  • 21,850
  • 21
  • 110
  • 188
7
votes
1 answer

Confirm that the declaration is correct

We have downloaded a project from TFS and after restoring Nuget packages we are getting below error: Error 5 The "ValidatePackageReferences" task could not be loaded from the assembly…
user2243747
  • 2,767
  • 6
  • 41
  • 61
7
votes
1 answer

msbuild xmlupdate delete node in web.config

How do I use MSBuild Community Tasks to delete a node in web.config. I can update a node using XmlUpdate task but I cannot delete a node. Any ideas.
Subhasis
  • 714
  • 3
  • 14
  • 28
7
votes
1 answer

Running MSTest UnitTests using a MSBuild Script

Could you please guide me how to run MSTest unit tests using an MSBuild script.
7
votes
2 answers

MsBuild: Get current directory of targets

I have a msbuild target and it has a Import tag like this: In contents of Company.LifeCycle.targets file, how can I get programatically the current directory (in this…
Kiquenet
  • 14,494
  • 35
  • 148
  • 243
7
votes
3 answers

MSBuild: How do I create and use a Task to convert Content items at build time?

I have a Silverlight 3 project with something like this: Basically I've added a PNG file to my project and set its build action to "Content". This works nicely. Now what…
Andrew Russell
  • 26,924
  • 7
  • 58
  • 104
7
votes
2 answers

Upgrading TFS 2015 Build Agent

I would like to upload on my TFS 2015 some of the build tasks that are available here https://github.com/Microsoft/vso-agent-tasks. I do have a problem with certain task as they do require a minimum agent version of 1.89.0. My build agents are…
Mario Majcica
  • 780
  • 1
  • 6
  • 20
7
votes
1 answer

Choose position of ItemGroup files generated in a Target via a Task

I've got the following set up (uninteresting XML removed for brevity): MyProject.fsproj ... MyTask.props
Alex Hardwicke
  • 529
  • 6
  • 16
7
votes
1 answer

Hook into the Roslyn build process

Is it possible to hook into the Roslyn build process during a Visual Studio/TFS build, and if yes, is it possible to get a hold of the Microsoft.CodeAnalysis.Solution/Microsoft.CodeAnalysis.Project instance being used by Roslyn during compilation?
dotarj
  • 418
  • 2
  • 8
7
votes
0 answers

MSBuild and PSExec integration issue, no prompt output

We ran into a problem with integrating MSBuild with PsExec. In our scenario, we run PsExec within a msbuild build file. The PsExec command runs another MSBuild file on a remote server to perform a task which we'd like to see its output on ourside.…
Houman
  • 1,381
  • 1
  • 8
  • 10
7
votes
1 answer

How to create MSBuild inline task from multiple source files

I am having several CS files (one DLL project), all in one directory and one of the classes there extends ITask. Now, it is easy and documented how to create inline task from one source file, but is it possible to do this from multiple source files?…
7
votes
4 answers

Determining outputs of a ProjectReference in MSBuild without triggering redundant rebuilds

As part of a solution containing many projects, I have a project that references (via a three other projects in the solution, plus some others). In the AfterBuild, I need to copy the outputs of 3 specific dependent projects to…
Ruben Bartelink
  • 59,778
  • 26
  • 187
  • 249
7
votes
2 answers

Programatically find TFS changes since last good build

I have several branches in TFS (dev, test, stage) and when I merge changes into the test branch I want the automated build and deploy script to find all the updated SQL files and deploy them to the test database. I thought I could do this by finding…
mjallday
  • 9,796
  • 9
  • 51
  • 71
7
votes
2 answers

MSBuild targets and Visual Studio 2012 issues

I'm having a hard time getting my third party non-reference assemblies deployed via Webdeploy withing the Visual Studio 2012 UI. I have a folder called 'libraries', which contains some assemblies. Via the following in my *.csproj file I can set the…
kipusoep
  • 2,174
  • 6
  • 24
  • 34
7
votes
1 answer

Add MSBuild batched task output as item metadata

I have a list of projects in my MSBuild file: And now, I would like to set, on each project, its TargetPath in a metadata property for each project. I already know how to extract the…
Jean Hominal
  • 16,518
  • 5
  • 56
  • 90