msbuild

msbuild string upper case comparison

Hi, i have the following code in my build-file: <Error Text="Some Text" condition="'$(StringName)' != 'Test'/> It causes an error if the condition is not match. When $(StringName) is 'test' the condition is not met so the error is executed. How can I change the condition, that 'test' als meets the condition? Is there any upper-case ...

Medium/Large solution - Visual Studio Build process - Advice needed

I'm currently in the process of developing a large application. At the moment, i have one solution (this may change in the fullness of time) with many projects. I've set up the directory structure as: \ lib\ (contains shared 3rd party components) build\ build\bin (output directory) build\wwwroot (output directory for web app) config\ ...

Why does VS2008 build differ from msbuild for same solution?

I have inherited a solution consisting of several projects, a mix of VB.NET and C#. It builds fine using the IDE "Build Solution" button. It does not build from the command line using "msbuild foo.sln"; the error message indicates that project A (which references project B) can't find project B. Indeed, upon examining the contents of ...

Precompiling ASP.NET Web application with MSBuild

I have a c# web application project in Visual Studio 2008 that I want to precompile for deployment. After looking at various options, it seems all of them have some issues - perhaps someone could give their thoughts on this: The project is under source control and also contains a lot of files that are excluded from project. Web Deploym...

Error MSB4062: The "GenerateAndPersistAppInfoTask" task could not be loaded...

We have added a number of Office AddIn projects to our TFS-built solution and now it's breaking. We are using Visual Studio and TFS 2008 (SP1). 4 projects have been added, one for each of the following targets... Word 2003 Word 2007 Excel 2003 Excel 2007 The Build Log reports the following ... C:\Program Files\MSBuild\Microsoft.Visu...

To where should I point the VCS root of TeamCity?

I am setting up TeamCity and I am wondering what should be used as the VCS Root. My svn repository is located at http://obfuscatedserver/svn/main/MyProject1/ Should I set the VCS Root at http://obfuscatedserver/svn/main/MyProject1/ or use the trunk folder at http://obfuscatedserver/svn/main/MyProject1/trunk/ ? Right now I am not using...

Msbuild properties

I have been recently sifting through MSBuild documentation trying to find other valid properties that can be passed to the task, and so far have been drawing up a blank on a centralized listing. I believe that VCBuildAdditionalOptions & BuildCmd are both valid parameters, however does anybody know where there are any further valid prope...

ASP.NET: Execute MSBuild tasks after publishing

I have an ASP.NET project. There is a 'Publish...' option in the context menu of the project (Visual Studio 2008). Can I add some custom MSBuild tasks that will be performed each time after publishing? If not, what is the best way to write MSBuild script that will publish the project (the same way as 'Publish...' option) and then execu...

Use a single Visual Studio solution to build both x86 and x64 at the same time?

I've got an x86 Visual Studio solution with many project files in it. Some of the DLLs are designed to work as plug-ins to other applications on a user's system. We're expanding some of the DLLs to be able to support 64-bit applications. What I'd like to do is setup the solution/projects so that just hitting "Build" will build both th...

Why is the SqlCmd MSBuild Task throwing an error when run with TFS team build?

I asked this over at the MSBuild Extension Pack site, but I figured I would try to get some more eyes on it, in case someone else has had a similar experience: I have a pretty straightforward task that should execute a series of sql script files in a folder. (The task is in a file called OperationalDB.msbuild). The task looks like this...

CruiseControl.NET service failing to build due to MSBuild ResolveKeySource error, despite certificate being imported

We just had an XBAP/WBA project added to our build server. It uses a PFX file for signing. I imported the PFX file to the CruiseControl.NET service certificate store, and can see it in the certificate store for the service. Yet we are still seeing an exception thrown by ResoveKeySource: c:\WINDOWS\Microsoft.NET\Framework\v3.5\Micros...

MSBuild: Evaluating reserved properties with ReadLinesFromFile

Hi all! I'm using MSBuild to customize the build process of Visual Studio, WiX, SandCastle, ... projects. To keep it as generic as possible I'd like to use text files defining some 'project specific' settings, like where the files should be loaded from, which custom executables to run and so on. A text file could look like this: $(MSBu...

Compiling MXML files into multiple SWF files using mxmlc compiler

Hi, I have a few mxml files that I want compiled into their respective SWF files using a configuration file. At the moment I can get 1 mxml file compiled into it's respective SWF file by using the file-spec attribute in the configuration file but how would I go about compiling multiple mxml files at once? Do I have a separate configurat...

Can we Change the Value of ComponentsLocation from "Relative" to "HomeSite"???

hii, well i develop a setup.exe(bootstrapper) using GenerateBootstrapper.Bootstrapper to load my msi file after check and installing prerequisites.It perfectly running if i make ComponentsLocation *) either "HomeSite" to download prerequisites from the microsoft and install. *) or "Relative" to take the prerequisites at the same locat...

Registering x64 Assemblies for COM Interop

Scenario: I have a project containgin two C# projects, which for historical reasons must communicate with each other using COM (via COM Interop). The COM Server is an in-process automation object (call this the "Server") and the COM Client is a simple C# Console application that loads the server like this: var objTypee = Type....

Is it possible to install Prerequisites using CustomAction in WIX??

Hii, well i want to install Prerequisites using CustomAction in .wxs file. I have already done the same with GenerateBootstrapper Task. But i want to download and install my prerequisites(like .Net Framework 3.5 and SQL Server etc.) from HomeSite using CustomAction. Is it possible to do this in WIX?? ...

How to specify CodeAnalysisRules in MSBuild via commandline

I want to be able to specify the Code AnalysisRules in commandline MSBuild (for Code Analysis / FXCOP). The project file would have something like this in it: <CodeAnalysisRules>-Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302</CodeAnalysisRules> So I would assume that I use something like this: MSBuild.exe /property:Ru...

msbuild scripts having problem with silverlight app

Ok. here's my scenario. On the build server I run the clean and build which seems to work fine. The same thing on the local doesn't work. The breaking point somewhere in the build process is the place where Project.Web gets the calls to GetXapOutputFile() to the Silverlight project (the one with xap file) and when it tries to build the ...

MSBuild: Building asp.net 4.0 web sites: .metaproj -files

Hi! I have a solution-file with ASP.NET Web Sites. When I build the solution with .NET 4.0 Beta 2 using "c:\WINDOWS\Microsoft.NET\Framework\v4.0.21006\MSBuild.exe" d:\MyPath\MySolution.sln Everything works fine, no errors. Then I try to build the same solution with CruiseControl .NET task (msbuild-script ran by a service), the sa...

Add custom properties for references in Visual Studio 2005

I make use of this technique by Scott Hanselman for merging multiple assemblies as part of building my solution. It works well but it's a bit of a hassle having to hand-edit my .csproj/.vbproj files. Is it possible to add custom properties to the VS property grid for references? I'd like to be able to add a boolean property to indica...