.NET Framework Bookmark and Share   
 index > MSBuild > Delayed import of MSBuild project files
 

Delayed import of MSBuild project files

Hello,

I have the following problem. I have a MSBuild script that gets source code from VSTS Source Control, builds the software, .... A part of this process is the creation of an installation package. This step is branched out into another MSBuild project file which I import in the main MSBuild script. I branched out that, because it will be used in other MSBuild projects too. The problem is now, that this imported script is part of the source I get from Source Control, because it must be adoted to the current project structure. That means, when I start the hosting MSBuild skript, the imported script is not available.

What I want to ask therefore is: Is there a way to import an MSBuild project file delayed when I need it, maybe in the target where I want to call its targets.

Any tips are welcome

Thanks in Advance

Regards
Rolf
rolf cerff
I found myself a solution. I simply call the MSBuild project with the built in MSBuild task MSBuild in the proper target (after I got the current project file) and provide the necessary properties. That works fine for me.

Regards
Rolf
  • Marked As Answer byrolf cerff Monday, September 21, 2009 1:36 PM
  •  
rolf cerff
I found myself a solution. I simply call the MSBuild project with the built in MSBuild task MSBuild in the proper target (after I got the current project file) and provide the necessary properties. That works fine for me.

Regards
Rolf
  • Marked As Answer byrolf cerff Monday, September 21, 2009 1:36 PM
  •  
rolf cerff

You can use google to search for other answers

Custom Search

More Threads

• msbuild with sql connection config and reference dlls
• vshost.exe
• cronjob build with cygwin
• How to "build and start debugging" with one click?
• Adding sca.wixlib to arguments in the LinkMSI task in Microsoft.SDC.Tasks
• Can I use MSbuild to build these projects?
• Msbuild treat \r as \n ?
• How to add a file link to the build report?
• bad order of projects when building a solution with MSBuild 2008
• String manipulation (how do I and/or improvement suggestion)