Visual Studio MSBuild,47
Recent update: 2008-3-21

StackOverflowException using logger on a command line

1746 byte By Plitog at 2008-3-7
Using msbuild.exe, version 2.0.50215.44, I'm attempting to build a .sln from the command prompt. If I let the generated output go to the console, the project builds fine. I then try to attach a logger, at which point msbuild fails. The info on the command line states "Process is terminated due ...

SolutionDir macro in post build event

1417 byte By Gabo at 2008-3-6
Hi, I have a project with a post build event that looks like: copy $(SolutionDir)$(ProjectName)\$(OutDir)*.dll $(SolutionDir)DestFolderMy MSBuild file lookes like:<Project DefaultTargets="Build" xmlns= http://schemas.microsoft.com/developer/msbuild/2003> <PropertyGroup> ...

XML Build logger?

385 byte By KevinDente at 2008-3-5
About a year ago there was a post on the MSBuild Explorers MSDN blog [1] about some extras that were coming for MSBuild. One of the items mentioned was an XML Logger. I haven't seen any further mention of such a thing, but it would be quite useful. Any word on whether it will ever be released? ...

build error with devenv

391 byte By Bimali at 2008-3-3
Hi all,I created a setup project and tried to compile it as below using devenv. devenv c:projects\src\Setup.sln /build release but this gives the error "Unable to open project c:projects\src\Setup.vdproj "This is when i use 2005. But this process was successfull in 2003.I want to know whether ...

Question: How does the task to get property from MSBuild file

285 byte By Hercules at 2008-3-1
Hi Experts, I had created a task, and I have a question. In my task, how does it get information from MSBuild file. I want to know if MSBuild has the way to make the task can freely get information without by task parameter or by parsing the xml file. Thanks, Hercules Zeng

/p command line parameter equivalent in SGen task

302 byte By Gerhardo at 2008-2-28
Hi,Is there a way to specify in the SGen task that it should call sgen.exe with the /p parameter? I did not see anything in the help file. There is an AddCommandLineCommands function in the SGen task, but how do I envoke that from the build profile?It makes a huge difference timewise.Thanks. ...

NAnt project to VS2003 solution - How do I do it?

558 byte By IanThomas at 2008-2-27
Everywhere I look, I see the opposite. I know NAnt has many features beyond what I want right now (whiuch is to get VS intellisese and the other nice things I'm used to). I want to take some sourcecode that is written in C# for .NET 1.1 and was managed within a NAnt build environment, and ...

Error: Device CAB Deployment of project "<projectname>" halted due to build fail

606 byte By ChesterWest at 2008-2-26
Hello everyone -I was wondering if somebody could point me in the right direction. When I build my project (a PDA application) I get:(1) The project bulids successfully (0 errors as reported in the output Window)Followed by:(2) A Yes/No message box indicating a build failureIF I say YES to ...

Signing a delay-signed assembly

1377 byte By ErvWalter at 2008-2-25
In our current build process, assemblies are delay-signed during the initial build. All developers have the public keyfile (via source control) in order to make this possible. This results in partially signed assemblies whenever a compile is done on a developer's workstation (which is ok ...

VS 2005 Integration with MSBuild

2720 byte By ErvWalter at 2008-2-24
Let me ask the question and then provide some background... How much can we customize an initially VS 2005 generated .csproj msbuild project file without "breaking" the VS 2005 <-> MSBuild integration? Background... Forgive me if this this overly general question has been answered ...

its no longer possible to use a 'different' build configuration

868 byte By thomaswoelfer at 2008-2-23
i have one build configuration where all but one project has been turned off. all projects, however, are set to 'debug mode'. when i activate that configuration and hit f5, i receive the following error message: \WINDOWS\Microsoft.NET\Framework\v2.0.50215\Microsoft.Common.targets(1500,9): ...

Parsing a Project file with XML

1286 byte By Gerhardo at 2008-2-22
Hi,I'm trying to locate the assemblyinfo.vb in a project by loading it up as an XML document. The XPath query to get the info back returns nothing, however, unless I remove the xmlns declaration from the project file.I added a namespace manager, but that doesn't do it either. I can read the ...

ApplicationVersion property

274 byte By Gerhardo at 2008-2-22
What is the intent of the ApplicationVersion property. It is mainly intended as a place holder for version information that can be consumed by a task which would then set the version of the assembly? Simply setting the property does not seem to update the version of a DLL.

Whidbey with .Net framework 1.1 .. possible?

497 byte By MahmoodSalamah at 2008-2-21
Hi,This might be a bad question, but is it possible to use the MSBuild tool with ASP.Net? I wanna take advantage of Whidbey's enhanced IntellSense and code completion features that supersede what was offered with older VS.Net version?One more question, I tried the tool with a windows ...

Exec task with ContinueOnError=true

829 byte By KevinDente at 2008-2-20
I'm using an MSBuild build script as part of a continuous integration scenario. Part of the script is a target that runs unit tests with NUnit, using a batched item group that specifies test assemblies. The target contains an Exec task that runs the test runner application. Since I want to run ...

After linking Class Library: Microsoft.Common.targets

589 byte By BrammekeDotNet at 2008-2-20
Hello,I created a solution containing two projects. When I create a reference from the GUI to the Business Layer, the compilation fails:Error 60 Specified condition "'D:\Documents\Projects\Brammekes Virtual Scrambler\BL\bin\Debug\Native.BL.manifest'" evaluates to ...

'Specific Version' property of project reference not saved

495 byte By PChandra at 2008-2-20
One of the projects in my solution, ProjectA, has a reference to another project in my solution, ProjectB. ProjectB's output is strongly named, but I would like to relax the requirement that ProjectA bind to a specific version of ProjectB, so I set the Specific Version property of this project ...

My own task won't work.

1535 byte By ClintStotesbery at 2008-2-19
I've made a task but when I try and use it I get the following errors: warning MSB4062: The "MWH.Common.MSBuild.Tasks.SourceSafe.Get" task could not be loaded from the assembly MWH.Common.MSBuild.Tasks, Version 1.0.0.0, Culture=neutral, PublicKeyToken=02d410f519fd6098. The given assembly name ...

'not valid project file' error

82 byte By FaisalMohamood at 2008-2-18
Any luck running this directly through VCBuild? Faisal Mohamood MSBuild Team

"Could not read state file" warning

345 byte By PeterToye at 2008-2-17
Just converted from beta1 to beta2. Now getting errors:Could not read state file "obj\Debug\ResolveAssemblyReference.cache". Exception has been thrown by the target of an invocation. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\Microsoft.Common.targetsDon't understand this. Looks like a bug ...

MSBuild Publish and non-project files

667 byte By DarrelC at 2008-2-16
Hi,I had a question using MSBUILD to publish a ClickOnce deployment. I have a Windows App project that loads files dynamically (image files, assemblies, etc.) and I wanted to know how I could add these files to be published with my app, but not have to include them in the project. If I had to ...

XSD Schema Extension

388 byte By Gerhardo at 2008-2-15
What is the trick to get intellisense to work in Visual Studio's XML editor for custom build tasks? I added my custom task as shown in the example to the Microsoft.Build.Xsd, but it doesn't show up when I edit the document. I restarted Visual Studio, but still no go. If I uncomment the ...

Build mixed c++ and C# project from command line.

975 byte By avic at 2008-2-15
Hi,I have a mixed c++ and C# project When i build it from VS 2003 it build ok.But if t try to build it from commad line with a command :"C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.exe" /rebuild debug k:/Pc/BillpopBuild/BillpopBuild.sln /out ./aa.txt All the c++ ...

VB 2005 beta2, error loading beta 1 app..

669 byte By rhyd at 2008-2-15
Thanks for the response, the casing I had was Propertygroup, your casing has solved that problem. But now I have 59 warnings all along the lines of:Warning 1 The element 'PropertyGroup' in namespace ' http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element ...

Task sequence on an item group

1343 byte By KevinDente at 2008-2-15
OK, I feel like I'm missing something obvious here. Say I have a ItemGroup, with a bunch of items with metadata. I want to run a sequence of tasks for each item, where each task accesses (potentially different) parts of the metadata. How do I express that in MSBuild. I've seen plenty of ...

Availability of build properties to task authors

599 byte By Gerhardo at 2008-2-15
Is there a way to reference msbuild properties in a custom task other than passing them in explicitly to the task. For example, the build project has a <PropertyGroup><Foo>Test</Foo></PropertyGroup>.There are several custom defined tasks, all of which need to know the ...

No Debug or Release drop down

742 byte By Palace at 2008-2-14
GreetingsI know this has been posted a few times on the forum, but none of the solutions seem to work for me.I have just installed VS2005 TS Beta2 and from the brief play I have had with it, I think it looks great. The problem I have is that the solutions configurations drop down that is ...

Purpose of debug and release configurations

1923 byte By papadi at 2008-2-14
Hi there!I have posted the same question before without finding an anwser. After spending some time with VS I may now be more exprerienced to phrase the question better! The following applies to VS2005 beta 2. Follow the steps: Open VS and create a new windows app (I use VB but I guess the ...

Editing project references in visual studio 2005 project files

1115 byte By Milow at 2008-2-13
Currently, if you add a reference to a project that is outside the folder structure of the current solution, but on the same drive, you will get a relative path in the HintPath of the .csproj file. The only problem we have with this, is that the reference will be to a DLLat an exact location, ...

Referencing Properties that contain free form XML

1555 byte By Gerhardo at 2008-2-13
If you have a property group with a property that contains free form XML and you want to reference the value, of say, OutputPath, what is the syntax for doing so?$(ConfigOptions) gives you the entire XML string, as you would expect. I'd like to get to the CodePath within $(ConfigOptions). I ...

Error when building solutions

5028 byte By Gerhardo at 2008-2-12
I created an MSBuild project that builds a solution. It seems to build fine, but at the end, MSBuild encounters the following error:An unhandled exception of type 'Microsoft.Build.Shared.InternalErrorException' occurred in MSBuild.exe Additional information: Internal MSBuild Error: The number ...

MSBuild.Task output for solution files

7320 byte By Gerhardo at 2008-2-11
Hi,I have two questions. 1) We are using MSBuild to organize a series of solutions. MSBuild does not seem to be able to capture the TargetOutputs parameter of the MSBuild task if you build a solution. As a matter of fact, it crashes. I would like to get a list of DLLs that were built as part ...

MSBuild SafeImports reg entry question

959 byte By KeithHill at 2008-2-10
I found the following regkey:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\MSBuild\SafeImportswhich allows me to add my foo.targets file so VS won't whine about not trusting the targets file. Can you use just the filename in this entry? Right now everything is specified by a full ...

Just Completed a Conversion From an Imake-based Build System Over to MSBuild

2031 byte By KeithHill at 2008-2-10
Some stats up front, the old system was comprised of 37 Imakefiles with 2333 lines altogether. The msbuild system has roughly the same number of MSBuild project files (.csproj and a single .targets) with a total of 2022 lines. The cool thing is that even though none of these are C# projects I ...

VB6 and VS2003 building

171 byte By THumphr at 2008-2-8
Seems to me that I should be able to create my own custom tasks for building VB6 and VS2003 solutions. Is there anything that will prevent this from working? -THumphries

When to Use Transforms vs Just Item Metadata

976 byte By KeithHill at 2008-2-8
I'm having a bit of a problem when building my targets understanding when to use a transform vs just using item meta data. For example, given this target: <Target Name="Backup" Inputs="@(OutputFiles)" Outputs="@(OutputFiles->'%(filename).bak')"> <Exec Command="copy ...

Building web site only from solution

517 byte By KevinDente at 2008-2-7
The MSBuild command line reference describes how you can build one project out of a solution using the /t: argument. That works fine for me for class libraries (specifying something like /t:Library1), but not for a web site that's part of the solution. Is there a trick to getting it to work? ...

Building from a Solution file

567 byte By Matt_Garven at 2008-2-7
I'm having trouble using MSBuild to compile solution files.For example, I have a solution with 3 projects, but I set one of the projects not to compile in my Debug configuration. I run the following command:msbuild "C:\Temp\Solution\Solution.sln" /p:Configuration=DebugHowever it builds all 3 ...

"Configuration" property not working when building a solution?

4938 byte By JohanNyvaller at 2008-2-7
Hi everybody!I'm having some problems building a simple C++ console application using MSBuild (VS2005 Beta 2)From what I've seen I should be able to do this:MSBuild HelloWorld.sln /t:Rebuild /p:Configuration=DebugTo build my project for Debug only.However: The above command results in both ...

Copying a Solution Project's source files to another folder

4328 byte By aaguiar at 2008-2-7
I have a solution with several projects.I want to copy the source files and project files to specific place.I built the following msbuild file: <Project xmlns=" http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$(TargetProject)" /> <Target ...

SmtpMail Task Impl

5309 byte By KeithHill at 2008-2-6
In case someone needs an SmtpMail task. It was pretty easy to implement:using System;using System.Collections.Generic;using System.Net.Mail;using Microsoft.Build.Framework;using Microsoft.Build.Utilities; namespace Acme.Tools.MSBuildTasks{ public class SmtpMail : Task { private string ...

NullReferenceException in CSC task

1008 byte By KeithHill at 2008-2-6
Any ideas why I would get this?C:\Tools.csproj(58,3): error MSB4018: The "Csc" task failed unexpectedly.C:\Tools.csproj(58,3): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.C:\Tools.csproj(58,3): error MSB4018: at ...

Beta2 microsoft.common.targets errors

2580 byte By gulatis at 2008-2-5
There are 57 warnings when I created new project after failing to convert from beta1, some of the warnings are listed below. Anybody knows why are these warnings? <ResolveAssemblyReferencesDependsOn>Warning 1 The element 'PropertyGroup' in namespace ...

Error Reading Project File

1649 byte By ThomasStachiw at 2008-2-5
Hello All, I have recently migrated our Build Environment to a new machine and installed VS.NET 2005 Beta 2. We use a 3rd party tool to automate our builds. The tool uses MSBUILD.exe to perform the actual build of the solutions. We have developed a solution using 2005 Beta 2, and are attempting ...

Need dependency analysis output mode /v:depends

2054 byte By KeithHill at 2008-2-4
More than once I have found that I don't have the right set of "Outputs" for a Target which causes the Target to execute when it doesn't need to. As far as I can tell there isn't a good way to diagnose/debug this issue, at least not using the /verbosity output. Here is what I would like to ...

Can you defer property evalation?

1238 byte By KeithHill at 2008-2-4
I have a catch-22. I have a property called "OutputPath" defined in my targets file. I also have an empty property called VcOtherFlags defined in a target in my targets path that allows folks to add in addtional compiler flags. Now here is the problem. If I do this:<PropertyGroup> ...

MSBuild equivalent of Nant Solution task ...

516 byte By cloudycity at 2008-2-4
With Nant I can do the following:<solution configuration="debug" outputdir="${build.dir}"> <projects> <includesList name="${Includes.List.Name}" /> </projects></solution>Where includes.list.name is a text file list of .csproj files in my application.The nant ...

Can you defer property evaluation?

1238 byte By KeithHill at 2008-2-4
I have a catch-22. I have a property called "OutputPath" defined in my targets file. I also have an empty property called VcOtherFlags defined in a target in my targets path that allows folks to add in addtional compiler flags. Now here is the problem. If I do this:<PropertyGroup> ...

MSBuild Task, Compiling web site with project references

1309 byte By Krishnaswin at 2008-2-3
I was testing to use MSBuild from command line for an automated build process, MSBuild Task seem to have an issue compiling website with project references within the same solution. The library, console, windows services and application are all compiling with out any errors but when it comes to ...

Package 'Visual Studio Source Control Integration Package' failed to load

427 byte By Gunilla at 2008-2-3
When I build our source code using DevEnv I get an error message saying "Package 'Visual Studio Source Control Integration Package' failed to load" in the log file. I am just test-building a copy of our source code with VS2005 so no source control should be involved. How can I get rid of this ...

Visual Studio

Site Classified