Throw an Error in an MSBuild Task
How do you throw an error from within an MSBuild task and force the build to fail. Something like: <Task> <ThrowError Condition="$(SomeCondition)" Message="There was a problem with the build" /> </Task> ...
How do you throw an error from within an MSBuild task and force the build to fail. Something like: <Task> <ThrowError Condition="$(SomeCondition)" Message="There was a problem with the build" /> </Task> ...
I have an asp.net mvc application that I am publishing with Publish feature of Visual Studio and I have a custom MSBuild task that needs the directory that I am publishing to so it knows where to copy some custom build files to... I've tried $(OutDir), $(PublishDirectory) and a bunch of others... how do I get this path? ...
I have a property group, like so: <PropertyGroup> <Platform>Win32;x64</Platform> </PropertyGroup> And I want to batch in an Exec task, like so: <Exec Command='devenv MySolution.sln /Build "Release|%(Platform)"' /> But of course, as written I get an error: error MSB4095: The item metadata %(Platform) is being referenced without...
I have a simple XAML page that load fine when it is loaded as part of any application within Visual Studio. However, when I deploy this application using ClickOnce, I get the following exception: Type : System.Windows.Markup.XamlParseException, PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 ...
Hi, Is there a way to bind the hudson successful build's number in the C# WPF application? Meaning, on running the exe after building I want to show the build number say 10 in my application somewhere. In project configuration file, I have used ${BUILD_NUMBER}, that a hudson understands and creates a build with the revision number. If I...
Hi, I want to change the build system path for building my VC++ project in VS2005. When I try to build the project, I'm getting an error that a specified header file cannot be opened. I have that header file in "Microsoft SDKs\Windows\v7.0\Include". But the path present in 'Build system path' is "Microsoft SDKs\Windows\v7.0\Include...
I have a new default ASP.net website and use MSBuild Community Task WebDirectoryDelete to delete and WebDirectoryCreate to create the IIS virtual directory. I can't get it done. It raise error : Unknow error 0x80005000. I retry by running the msbuild under "Run as Administrator" but the errors still appear. I'm using Windows 7 and dot...
I have a custom MSBuild task that takes in a set of JavaScript files, minifies them, and outputs them, with the extension .min.js. When I do a normal build through Visual Studio, it works perfectly and the .min.js files are output to the same directory as the original files. When I try to deploy using the Publish feature in Visual Studio...
When building the solution, the code behind is not picking up changes made to the applicaitons dlls. Intellisense works, and the page builds when using the "Build Page" command, however when trying to build the entire solution the build fails. Does anyone know why this might be? ...
've done a bit of searching around and have been unable to find a solution that works. I'm trying to automate deployment of a webapp to IIS. My environment is as follows: Server: Windows 2k3 with IIS 6 & .net 3.5 SP1 Dev box: Windows XP pro .net 3.5 SP1 The user that I'm running my msbuild script from is an admin on the dev box (th...
I'm trying to build an MSBuild script that maps a network drive to a drive letter in the script, but unfortunately the path to the target folder includes an embedded space. The embedded space causes the mapping to fail, and I don't know if it is possible to escape quotes around the path. I've tried double quote marks, but MSBuild doesn...
I have a Visual Studio 2008 solution with number of DLLs and web application uses them as a main project. It's a commercial banking and accounting software (thin client) and I don't want a client getting access to the source in circumvention of mine. I want to obfuscate all resulting assemblies before publishing them onto a web server v...
Are there any community MSBuild tasks for Perforce (e.g. even just basic syncing)? Neither the MSBuild Community tasks or MSBuildExtenstion pack seem to have any. ...
hi, I'm writing an msbuild .targets file, and in it I want to use the zip task to zip up some files that I know the locations of relative to the .targets file. This works ok when I execute the .target file directly. But, when I include the .targets file in an .proj file that's in another directory, the relative paths are resolved relat...
I have a solution that is being referenced by a MSBuild project. In the solution, I am referencing several projects that are targeting .NET 4.0. How can I tell MSBuild to ignore the project's configuration and just target .NET 3.5? ...
Hi, I'm writing an msbuild file and have something like this: <ValidateDependsOn>$(ValidateDependsOn);ValidateA</ValidateDependsOn> <ValidateDependsOn>$(ValidateDependsOn);ValidateB</ValidateDependsOn> <Target Name="BuildA"> <!-- stuff --> </Target> <Target Name="BuildB"> <!-- stuff --> </Target> <Target Name="ValidateA"> ...
I have bunch of COM dependencies and my build script emits tons of following warnings: c:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning : The type library importer could not convert the signature for the member 'DISPPARAMS.rgvarg'. c:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets :...
We have just setup our hudson server to build .NET projects which seems to be working fine, however for projects that require a password when signing the assemblies I can not figure out how to tell hudson what the password is? For us the password is asked the first time a developer checks out the source code and they open with visual st...
We have common library projects shared amongst many projects that are required to be checked out into a "Libraries" folder which a developer needs to checkout prior to opening the main project in visual studio. How I tell hudson that there is this dependency? I figured one thing I could do is setup a custom workspace and specify the lo...
Hi, I'm trying to write an MsBuild script to zip some files up. I need to select all of the read-only files recursively from a folder into an ItemGroup to add to the zip. I'm using the community tasks Zip task, but am struggling with selecting files based on their attributes. Is there anything around to do this out of the box, or do I...