msbuild

Compile Views in ASP.NET MVC

I want an msbuild task to compile the views so I can see if there are compile time errors at well... compile time. Any ideas? ...

Is it possible to know when ReSharper's test runner is building my project?

I'm trying to use the MSBuild NUnit community task to force tests to run on each build, but I now see that when I use ReSharper's test runner and it builds the project I'm running the tests twice. It works but is not really desirable. Does anyone know of a variable or condition I can check within MSBuild so that I can skip the communit...

Generating Code in an MSBuild task

I am creating an MSBuild task that will generate one or more files, I have a Task with an [output] property that is of type ITaskItem[]. My question is, do I need to implement that interface myself or is there a class I can use already? I want them to be Compile task items that get added to the list of files to compile. ...

How can I get the current CodeDomProvider in an MSBuild Task

I have a task and I want to generate some code using the CodeDom. How can I get either the current "language" or the CodeDomProvider for the current project calling my task? ...

How do I set the build number based on the Subversion revision number with CruiseControl.net

I'm working through the process of installing CruiseControl.net and converting an Msbuild script to work with it. I'd like our build number to reflect the Subversion revision number. It appears as though the LastChangeLabeller should work, but all I get is "unknown". My ultimate goal is to format the build number with both a build num...

Msbuild task to restore SQL Server database

What is a quick example / demo of an msbuild task to delete then restore a database and also maybe run any .sql files against the restored database? ...

What's the best method for setting up a new .NET project?

So I'm newly in charge of projects at my company (We're still only 2 guys, but we're growing) and I want to set up my projects the right way. All my projects are in an SVN repo already, I've got bug tracking software set up, but what I'm looking for is the best way to layout a new project with tests, SVN, and a build server. I want to s...

MSBuild return value from database

Hi, does anyone know how to return a value from a (sql) database into an MSBuild script? I want to get the value into a property so I can pass it to subsequent build tasks. I am fiddling round with something like the following at the moment, but this is returning -1 to indicate the query has executed successfully, whereas what I want is...

Using Studio's "Custom Tool" in MSBuild

I've got a "Custom Tool" for Visual Studio to munge some template files into code. For consistency and portability I'd like to be able to run this template processor from MSBuild when building outside of Visual Studio. Visual Studio creates the following snippets for the files: <!-- the template --> <None Include="Template.in"> <Gene...

Good resources to learn about MSBuild and Continuous integration with TFS

I am relatively new to MSBuild and am looking out for good resources to learn more about MSBuild and CI with TFS. Specifically I am looking out for the following specific tasks Take latest from TFS whenever a checkin happens Build the solution Run the code analysis Run Unit test cases On success deploy the project to the drop locatio...

How to query MSBUILD file for list of supported targets?

Hello. Is there any way to ask msbuild what build targets provided msbuild file support? If there is no way to do it in command prompt, may by it's possible programmaticly? Are there no way to do it besides parsing msbuild XML? ...

How to get the Windows SDK folder in MSBuild?

What would be the way to retrieve the Windows SDK folder in an MSBuild task? Using the generateBootstrapper task I'm creating a bootstrapper for my setup to be able to install the pre-requisites. This task needs the path to the folder where the pre-requisite packages are located, i.e. the Windows SDK folder "C:\Program Files\Microsoft...

MSBuild Task to read version of dll

I am looking for a MSBuild task that will tell me the version of a specific dll. Is there a task available for this? In my case the dll is a .Net assembly, so I'm actually looking for Assembly.FullName. ...

How do I set the Output directory for a C++ project built by msbuild?

I have a MSBuild .proj file that is compiling a mixture of C# and C++ projects. The C# projects compile output (.exe/.dlls) to the OutputPath I specify, but when I specify OutputPath for the C++ projects (which calls vcbuild.exe), the OutputPath is ignored and instead goes into the directory specified in the Property Pages for the .vcpr...

Assign Errors to projects in Logger for MSBuild2008 with /m:x (x > 1)

We build using MSBuild2005 with a self-written Logger class that keeps track of which projects are currently building and assigns the incoming errors/warnings to the projects. This was a kind of tricky because MSBuild also calls ProjectStarted/FinishedEventArgs when it "somehow" accesses referenced projects. But I got it working. Now we...

MSBUILD MSB4075

I converted my VS2005 to VS2008 and I get the following error: error MSB4075: The project file must be opened in the Visual Studio IDE and converted to the latest version before it can be built by MSBuild. Any help appreciated. Google failed me this time lol.. ...

How to copy a recursive directory structure in TFS Team Build?

Is it possible to copy a directory in a team build target? ...

Why is "Microsoft.VisualBasic.Compatibility.dll" missing from the .NET Framework v1.1.4322 folder?

I've started to use a Vista machine for development. In case it is significant: I'm using MSBee so that I can code in the Visual Studio 2005 IDE while still building against the 1.1 framework. On the Vista machine, when I tried to build a particular vb project, I got this error: error BC30464: Namespace or type 'Compatibility' in...

Passing a parameter to MSTests using MSBuild

I've got an issue that was wondering if could be solved in a particular way. I would like to be able to pass a parameter or set some kind of variable in an MSBuild script that will be run on a TeamBuild server. This parameter would be used as a condition in the setup of a TestFixture in MSTest to decided which concrete implementation o...

MSBuild ContinueOnError

Hi I have an MSBuild project as follows: <Target Name="StopApplications"> <BizTalk.BuildGenerator.Tasks.StopApplication MessageBoxConnection="$(BizTalkManagementDatabaseConnectionString)" ApplicationName="x.Direct.Brackmills"/> <BizTalk.BuildGenerator.Tasks.StopApplication MessageBoxConnection="$(Biz...