msbuild

web.config File Section Replacements

I have a web deployment project that does a web.config section replacement using an external file. (this is to change the connection strings section). The web.config section replacement works fine when built manually, but when built as part of a TFS build the section is not replaced. I cannot find any errors or warnings in the build log....

Create MSBuild task that recursively copies a folder to several projects in my solution

I'm new to MSBuild and I tried reading up on several sources on the net but I'm missing somet things.. Here's what I want: A build task that on execution recursively copies a directory structure from a (hardcoded/configured) path on my machine to a set of projects in the solution Then compiles (release/debug, I guess I can make two ...

TEAMBUILD: error MSB4057: The target "GetXapOutputFile" does not exist in the project

I'm getting this error trying to run my Build thru TeamBuild in TeamExplorer on Visual Studio 2008. On the Build Machine I installed VS SP1, Team Explorer, Silverlight 3 tools, and RIA Services. I can compile no problem with Visual Studio on my machine and directly on the Build Machine. But I still cant compile on thru TeamBuild becaus...

Msbuild copy to several locations based on list of destination parameter?

I got a directory I want to copy to a number of locations. Say I have home.aspx I want to copy it to abc/home.aspx def/home.aspx ghi/home.aspx so two questions for me: How do I define the list abc, def, ghi? How do I execute my Copy task with each element of this list? ...

What are the cool and interesting things that you do during build-automation?

I am just curious to see what others are doing during build-automation other than usual compile, build, run-tests, etc tasks that might be helpful and inspirational for others to consider and look into such as: Generating code documentation Using code-metrics to measure build quality and fail the build if established metrics are violat...

How do you to get more than one <Configuration>\_PublishedWebsites from TFSBuild

The Configuration sections specify to do 2 Configuration Builds, but I only get the Release_PublishedWebsites generated by the TFSBuild. Here are the configurations: (I started with two but actually will have 5) ... Release Any CPU <ConfigurationToBuild Include="Release|Any CPU"> <FlavorToBuild>Release</Flav...

How do I find the current file in MSBuild

I know that the latest book out on MSBuild says this is not possible, but I am sure I have seen a property that points to the current file. Does anyone know a way to find the current file? (ie When the main MSBuild file imports a secondary file. What is the path to the secondary file from inside that file.) I am trying to register my ...

Need primer for a Msbuild newbie

We maintain a medium sized windows application developed in vb/c# .net in work. Still now the build and deploy process for this app is manual. I am determined to make this process automated using MSBuild on which i have no knowledge still now. Our app has a simple build structure, set of projects already grouped into four solutions(.sln...

CreateItem vs ItemGroup

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="@(Interm...

How to integrate MSpec with MS Build?

Hi, Few days ago I watched a BDD screencast by Rob Conery. In the video he showed how to use MSpec, so I downloaded it and played with the bits. What I want now is to integrate MSpec with MS Build, but I don't know how... I use TFS team build as my CI server - Can you help me to integrate MSpec with MSBuild? Thanks! ...

Solution level build events in VS 2008

I know you can have pre and post build events at a project level, but I want to stop and start a service at the beginning and end of a build of the solution -- i.e. when I do a 'Build Solution' the service is stopped and the last action of the build is to re-start the service. There are no build events on the solution property page, so ...

JCSompress - dealing with special characters in JS files?

I'm in the initial stages of investigating JSCompress for MSBUILD : http://msbuildtasks.tigris.org/ For my initial testing I have a few JS files over which I am running this task, some of the files include already minified JS files (JQuery Library etc..) and some files contain Special characters. When the task runs everytime it encount...

Using MSBuild for C++ with VS2005

Is it possible to use the latest MSBuild (.NET4/VS2010) with the VS2005 toolchain? I have a C++ project which compiles against VS2005. I'm not ready to upgrade to VS2010 while the compiler is still in beta. But I'd like to use the new version of MSBuild because it builds C++ natively and provides extension points and flexibility which t...

Building PECL extension on windows

I want to build an old version of APC on windows. They say (check the link) A DLL for this PECL extension is currently unavailable. See also the building on Windows section. but the guides referred are not available. Can you please suggest me a How-to? ...

Required tag in Custom MSbuild Tasks

How do you know if a value was passed in on a property that does not have the [Required] flag. What will be the value of an string that is not required and was not passed in? If it is an empty string then how do you know the difference from a empty string sent by the caller? ...

Unexpected System.Reflection.TargetInvocationException error executing SQL command

MSBUILD - When executing DDL file I get this error: Unexpected System.Reflection.TargetInvocationException error executing SQL command Before this execution two other ones are executed with no problems. ...

Having problems changing the <dataConfiguration> section of web.config in WDP

Hello, I have a web.config file that contains a section like this: <configuration> <configSections> <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> ...

How would you create this solution in visual studio?

I have project X, fully operational that compiles into X.exe I have project Y, it has a reference to project X, and compiles to: Y.exe; Y.dll I build project X's solution and the release folder has: X.exe I build project Y's solution and the release folder has: X.exe, Y.exe, Y.dll How do I remove the extra X.exe in project Y? ...

MSBuild extract properties from one project to another

Say I have two project files "Parent.proj" and "Child.proj". If I declare a property in Parent.proj called MyProp I can pass this to Child.proj with the following code: <MSBuild Projects="Child.proj" Targets="dostuff" Properties="MyProp=MyValue" /> This is fine, but I want to know if there is a way of referencing MyProp within Child....

MSBuild error when building projects for the first time

When i try to run my MSBuild script for a project before opening it in IDE, I get this error: "The project file must be opened in the Visual Studio IDE and converted to the latest version before it can be built by MSBuild" What's the reason i'm getting this error? ...