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
24
votes
1 answer

How to resolve "Install-Package : The current environment doesn't have a solution open."

I have a solution having 1 project. Open Package Manager Console, run Install-Package MSBuildTasks But it gave me an error below: Install-Package : The current environment doesn't have a solution open. At line:1 char:16 + Install-Package <<<< …
user88
  • 1,174
  • 3
  • 27
  • 51
23
votes
2 answers

MSBuild UsingTask Resolve References

I feel like I've fixed this before, but I can't remember how. I have a tasks file that looks like this (CustomTasks.tasks): it references an assembly (namely Ionic.Zip.dll).…
Jeff
  • 35,755
  • 15
  • 108
  • 220
19
votes
4 answers

MSBuild task configuration property

I have three Visual Studio solutions. The first is configured to build as Release, and the other two are set to build as Debug. When running a simple MSBuild script explicitly stating the configuration to build (Debug), the first project is still…
crowleym
  • 2,532
  • 3
  • 22
  • 28
19
votes
1 answer

Offline Build tools for visual studio 2019

I am trying to download Build Tools for Visual Studio 2019 from https://visualstudio.microsoft.com/downloads/ But when I click on download button, system downloads an exe which tries to connect to internet to download rest of the package. How can I…
SharpCoder
  • 18,279
  • 43
  • 153
  • 249
18
votes
2 answers

Custom MSBuild Task locks assembly

At first glance, my problem seemed to be a common one: I have a custom MS Build task in some of my projects. Once I compile the projects, I cannot compile the build task any more - the build task assembly is locked by Visual Studio. I found a lot of…
user544722
  • 181
  • 3
18
votes
3 answers

MSBuild 2010 - how to publish web app to a specific location (nant)?

I'm trying to get MSBuild 2010 to publish a web app to a specific location. I can get it to publish the deployment package to a particular path, but the deployment package then adds its own path that changes. For example: if I tell it to publish to…
Mr. Flibble
  • 26,564
  • 23
  • 69
  • 100
17
votes
3 answers

MSBuild MSBuildCommunityTasks Task Time

I have a MSBuild project and I want the current date to be added to a zip file that I am creating. I am using the MSBuildCommunityTasks.
Eric Brown - Cal
  • 14,135
  • 12
  • 58
  • 97
17
votes
4 answers

MSBuild ReadLinesFromFile all text on one line

When I do a ReadLinesFromFile on a file in MSBUILD and go to output that file again, I get all the text on one line. All the Carriage returns and LineFeeds are stripped out.
evilhomer
  • 8,946
  • 4
  • 24
  • 21
16
votes
2 answers

How can I use MSBuild Copy Task to Copy To Multiple Destination Folders?

I'm trying to copy a folder recursively to multiple destination folders using MSBuild's Copy task. I've seen the following question which gave me a good start, but I must be missing something: Msbuild copy to several locations based on list of…
WayneC
  • 2,530
  • 3
  • 31
  • 44
16
votes
3 answers

How to invoke the same msbuild target twice with different parameters from within msbuild project file itself

I have the following piece of msbuild code: C:\DirA\ C:\DirB\
mark
  • 59,016
  • 79
  • 296
  • 580
15
votes
12 answers

Passing multiple values to Wix DefineConstants property with MSBuild

I'm currently integrating my Wix projects in MSBuild. It is necessary for me to pass multiple values to the Wix project. One value will work (ProductVersion in the sample below).
Sardaukar
  • 29,034
  • 5
  • 26
  • 32
15
votes
6 answers

How to check if a MSBuild-Task fails if using ContinueOnError=true

I am running the MSBuild task with ContinueOnError=true:
Elena
  • 1,928
  • 1
  • 15
  • 23
14
votes
2 answers

MSBuild and Webpack

I am developing an Angular2 application in VS2015 and have a webpack bundling and minification environment set up for the same. This is my webpack.conf.js switch (process.env.NODE_ENV) { case 'prod': case 'production': …
lohiarahul
  • 1,432
  • 3
  • 22
  • 35
13
votes
1 answer

How to pass TFS variable to a MSBuild task of the project

I have a solution which is built on TFS server. This solution includes several projects which have custom MSBuild tasks. Theses tasks actually create some zip archives. I need to extract somehow the $(Rev) macros from the TFS build and pass it to…
Andrey Selitsky
  • 2,584
  • 3
  • 28
  • 42
13
votes
1 answer

MSBuild project won't load if Import fails?

I created a build target in a project file (App.Tests.csproj) that imports a project: These tasks only exist on our build server, that location does not exist on our developers work station. The build…
detroitpro
  • 3,853
  • 4
  • 35
  • 64
1
2
3
49 50