msbuild

Problems automatically precompiling website with MSbuild

All, I currently have my solution comprising of 2 Class librarys and a Web Site building within teamCity using Msbuild. Now I want to precompile the website and make it available as an artifact. However when i try to Precompile it using <Target Name="PrecompileWeb" DependsOnTargets="Build"> <AspNetCompiler PhysicalPath="$...

How do I add an MSBuild .proj file to my solution?

Does anyone know how to add a an MSBuild .proj file to my solution? I was just given existing code from a vendor with a solution that references an MSBuild .proj file as one of its projects. When I open the solution, the project shows as (unavailable). It appears that I need to install some sort of project template to get this project...

MSBuild ITaskItem array is out of date

I'm creating a custom ITask for MSBuild which uploads the output files of my build. I'm using a web deployment project to publish my app and hooking in to the AfterBuild target to do my custom work. If I add a file to my web application, the first time I do a build, my custom task is not recognizing the recently added file. In order fo...

How to programmatically cancel an embedded MsBuild build

I'm embedding MSBuild directly into a more complex build tool. The relevant code looks roughly like this: // assume 'using Microsoft.Build.BuildEngine;' Engine e = Engine(); BuildPropertyGroup props = new BuildPropertyGroup(); props.SetProperty( "Configuration", Config.BuildConfig ); e.BuildProjectFile( projectFile, new string[] { "Buil...

Equivalent msbuild command for Publish from VS2008

Hi, any idea which is the command for publish in msbuild corresponding to the one in VS2008? What I want is the resulting output to be the same, without that _PublishedWebSites subdirectory. Is this achievable from command line or I should use a build file? Thanks. ...

Can I override DropLocation target to avoid network latency?

In Team Build 2008, the Drop Location for a build is no longer specified in the .proj file, and instead is stored in the database and maintained in the GUI tool. The GUI tool only accepts a network path as a drop location (i.e. \\server\share) and will not accept a local path. Our build server also hosts the dropped files, so it seems ...

Team Build MSBuild Task Does Not Update Main Build Log File

I have an after build event in my main TFSBuild.proj file that uses the MSBuild task to call a deployment task after a successful build. It looks like this: <ItemGroup> <DeploymentTargets Include="..\Sources\Build\SkunkWorks.Build.Deployment.targets"> <Properties></Properties> </DeploymentTargets> </ItemGroup> <Target Na...

Should .NET AnyCPU projects bind to Framework or Framework64 DLLs

I have a csproj that has a reference to the Framework64 version of System.Data. When I try to build using MSBUILD/TFS on another machine it fails as the 64-bit DLL doesn't exist. Should I bind to the Framework version, or will this limit me when running on 64-bit machines? Does .NET redirect the binding to use 64-bit when possible? ...

What is the best way to do cross-platform development with Visual Studio?

We are developing a number of games on multiple paltforms (DS/Wii/Xbox 360/PS3/PC/PSP). Each has their own compiler/linker and debugger. We want to use Visual Studio as the IDE and to manage the build process but use the platform specific compilers (and settings) to generate the appropriate output. We could manage the build process outsi...

Registering assembly for COM interop from nant

Hi, I'm running msbuild from a nant script, the problem is that when it tries to register one of my assemblies for com interop, the script just stops, like it's stuck. If I run regasm.exe on the assembly it succeeds. Even if I run msbuild itself from the command-line, with the exact same parameters, it builds successfully. Any ideas o...

Path to MSBuild

Hi, How can I programatically get the path to MSBUild from a machine where my .exe is running? I can get the .NET version from the Environment but is there away of getting the correct folder for a .NET version? Paul ...

Hook into the msbuild workflow after stopping a build using VS 2008

We would like to run some tasks after a build has been stopped using VS2008. Does anyone know if any of the default targets are still executed after this action? Thanks in advance! ...

how to set MSBuild VC++ Directories

I have a solution of mixed VB.NET and C++ projects. When using Visual Studio 2005 you can set the "Tools->Option->Projects and Solutions->VC++ Directories" to help the compiler find your include files. When building the same solution with MSBuild I don't see how to pass these settings. The C++ won't compile without this path specified. W...

How to build only a handful of projects contained in a solution using MSBuild?

I am trying to setup a TFS Team Build and am new to MSBuild. I have a solution that contains a few projects (MyProject1, MyProject2, ..). I find that setting up the team build I could only select which solution should be built and when performing the build the build target for all the projects becomes the same and the output for all proj...

MSB4057 Error when using MSBuild with RAD Studio 2009

Summary: I'm able to compile a RAD Studio 2009 project using MSBuild on a Build Server using the RAD Studio Command Prompt, but not with a batch file. This same batch file, however, works successfully on my workstation. On the server the error returned is: MSB4057. I'm just learning how to use MSBuild with RAD Studio and am trying to...

MSBuild: How can I force ProjectReference to search elsewhere for an assembly?

We have a large number of Visual Studio Solutions that contain the same shared 15 projects, and most solutions only differ by a web application. I'm trying to consolidate everything into a single build that builds the shared projects only once, then have the web application projects reference the output shared assemblies. I'm finding t...

Updating Assembly information with MSBuild failing

All i am trying to automatically update the assembly information of a project using AssemblyInfo task, before build however the target appears to do nothing (no failure/error) just no update/creation Below is the build.proj file I am using (obviously some contents altered) Can anyone help? <?xml version="1.0" encoding="utf-8"?> <Pr...

What tools are available to determine which .NET assemblies have changed since the last build?

With a seriously big .NET site/solution (100's of assemblies), are there any tools available to recognise which assemblies have changed since the last build (using something more intelligent than file dates that will always change). I need to change our deployment process to a) increment the version of changed assemblies and b) generate...

Set version with AssemblyInfoTask from a file

Hi, I'm completely new to this MSBuild tool (and still somewhat lost) but nonetheless I have a question someone might be able to answer: I am trying to auto-generate version info into AssemblyVersion.cs files by the contents of a file. To set the verion info I found the AssemblyInfoTask which works quite well - but how do I tell that ...

Using NUnit-2.5 RequiresSTAAttribute with TeamCity 4

Using TeamCity, I'm trying to get a (TestAutomationFX) test that requires an STA thread to run . It works via a custom app.config that configures NUnit 2.4.x (8) (as referred to by Gishu, thanks, described at http://madcoderspeak.blogspot.com/2008/12/getting-nunit-to-go-all-sta.html) It works via: /// <summary> /// Via Peter Provost /...