msbuild

error RG0000: Could not load file or assembly 'xxx' or one of its dependencies. Access is denied.

This is for a windows forms project under VS2010. Here is the message I get from MSBuild: error RG0000: Could not load file or assembly '3rdPartyAssemblyUsedByProject, Version=1.1.263.0, Culture=neutral, PublicKeyToken=687bce93d7ce902c' or one of its dependencies. Access is denied. Line 174 , position 5. [C:\xxx\src\Ba...

Is there any way for an MSBuild project to determine whether the 32-bit or 64-bit version of MSBuild is running?

After having found the answer to my question about the 64-bit version of MSBuild attempting to load 32-bit extensions, it has now become necessary for me to determine whether the 64-bit or 32-bit version of MSBuild is running so I can load the correct version of the DLL. I can check the $(MSBuildBinPath) variable against a list of known...

Running MSTest Unit tests As part of TeamBuild

I've been looking for a definitive web resource to help with this, but no luck so far. So :how do I run unit tests as part of a TFS build? I have a number of questions for this, so to make it easier I've numbered them in this post. Sorry for this post's length. Visual Studio Team System 2008 is installed on my build machine. I have a ...

Issue with MSBuild after installing KB983583

Hi, It seems that KB983583 affects MSBuild. All my builds are hanging after installing this update on Windows Server 2003 SP2. Here is a part of thread dump from TeamCity: Thread id=3708 priority=8 state=Wait reason=ExecutionDelay at System.Globalization.CultureInfo.GetNativeSortKey(System.Int32 lcid, System.Int32 flags, System....

Why does MSBuild require explicitly setting the target platform?

For a simple project of mine, a release build in Visual Studio produces an assembly of size 18,944 bytes. But if I build the same solution from the command line with MSBuild, I get an assembly of size 28,672 bytes. That's a difference of 9,728 bytes. I am invoking MSBuild with: msbuild /p:Configuration=Release /t:Rebuild MySolution.sln...

Rake and MSBuild error - error MSB3021: Unable to copy file

We're using Rake with Albacore for our build & deploy process in TeamCity but my latest solution is causing me problems when I compile. When I run msbuild I get the following error: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets(60,3): error MSB3021: Unable to copy file "bin...

Does possibility to specify enabled protocols for web-application in IIS exist in MSBuild?

I create webdirectory in IIS, using MSBuild task: <WebDirectoryCreate VirtualDirectoryName="$(VirtualDirectoryName)" VirtualDirectoryPhysicalPath="$(VirtualDirectoryPath)" AccessExecute="true"/> Now I look for possibility to specify enabled protocols (http, https, net.tcp) for this webdirectory using MSBuild. Any suggestion? ...

Publish web application from MSBuild Script using VS2010 targets resets working directory

I am trying to automatically publish and deploy my .Net 4 web application automatically from a build script to be run by our continuous integration server. I am using the new _WPPCopyWebApplication target from VS2010 to perform the publish, however it appears to reset the current working directory of the msbuild project to c:\ this caus...

Can MS Deploy do a package and transform, but not deploy?

Using msbuild in .NET 4.0, I can build web project with the "Package" target, and it does a nice job of putting the package in a zip file. But, when I look at the web.config in there, it's not transformed, it has "$(ReplacableToken_Web_SiteConnection-Web.config Connection String_0)" I can run the "TransformWebConfig" target and it will ...

How to bootstrap .NET 3.5 SP1 with msbuild? following found instructions doesn't work...

I'm trying to use msbuild GenerateBootstrapper task to distribute a .net application with the framework, without the need of internet connection to install it. I've found many posts that all lead to the same instructions in here: Enable Samesite for the .NET Framework 3.5 SP1 bootstrapper After following the instructions, I still can...

MSBUILD does not generate MSI files through CruiseControl.NET

Hi. First off I just want to say I am not a developer or engineer. I'm just the poor configuration manager trying to get CruiseControl to build a VS2010 / .NET4.0 C# solution and produce the MSIs as outputs. The engineers I support know how to create these MSIs from their VS2010 clients (of course) but not si much about using what is ess...

Scope and order of evaluation of Items in MsBuild

I wonder why in the following code, MsBuild refuses to set the Suffix Metadata. It does work with a CreateItem task instead of the ItemGroup Declaration (because CreateItem is computed at build time) but I can't do this here because this code is in a "property file" : the project has no target, it's just a bunch of properties/items I inc...

Suggestions for software to ease setting up a build server

I'm currently setting up a new build server and I'm interested in any suggestions the community may have about software such as Hudson or CruiseControl.NET that may simplify and add additional value to the build process. Previously I had a build server set up using custom batch files which would run msbuild and other such tools and thes...

Is there an MSBuild task that will write lines to the *start* of a file?

I'm using a WriteLinesToFile to update a change log file (txt). It appends the text to the end of the file. Ideally, I'd like to be able to write the changes to the start of this file. Is there a simple task (e.g. in the Community or Extension packs) that does this? ...

msbuild and updating files in tfs

I need some help to create a msbuild script. We are using TeamCity 5.1.2, VS2010 (.net 4.0) and TFS in our environment. We have a "SharedLib" folder in tfs where we put those dll's that are used by multiple projects. What we do is that we have a database project that handles db access and when we build that, a post build event copies ...

TFS 2010 creating .Net 4.0 XmlSerializers DLL for .Net 3.5 Application

We have a ASP.Net web application running in Visual Studio 2010 that is targeting .Net 3.5. It's being built by TFS 2010. This web application has a couple web references, so the build creates a related XmlSerializers DLL. This DLL, however, is a .Net 4.0 assembly. When I run this web application from the build, I get the error: C...

How to ensure that a Target in an msbuild file only gets called once?

We've got a MsBuild.proj file which contains the following section (simplified): <Target Name="WEB" DependsOnTargets="CleanResults;UpdateAssemblyInfo;Services;Business"> <!-- Other build and release stuff --> <MSBuild Projects="$(CreateInstallValuesScriptProjectFile)" Properties="DatabaseStructureLocation=$(Databa...

How to determine if a build is from the editor or command line?

I am building a C++ solution with Visual Studio 2005. Sometimes I open the solution in Visual Studio and build it from within the development environment. Other times I build it from the command line using msbuild.exe. I'm wondering if there is a way that I can determine which of these two types of builds I'm using at compile time (f...

TFS build for non-dot net application

I need to have daily build for non - .net applciation. I am using TFS source control . I want to learn how can I do that. I dont have any idea on build generation and MS build ? What I need to learn before I can schedule daily builds.. ...

TFS Builds target different referenced DLLs

So I'm trying to setup builds for our different staging environments using TFS 2010 and msbuild. One of our staging environments uses a different version of a dll, lets call it "ThirdParty.dll". So I want a build to target that environment, but this build will have the projects build against this older version of the "ThirdParty.dll". T...