msbuild-4.0

How to check if a MSBuild-Task fails if using ContinueOnError=true

我怕爱的太早我们不能终老 提交于 2019-12-20 18:24:43
问题 I am running the MSBuild task with ContinueOnError =true: <MSBuild Projects="@(ComponentToDeploy)" Targets="$(DeploymentTargets)" Properties="$(CommonProperties);%(AdditionalProperties)" ContinueOnError="true" Condition="%(Condition)"/> So my build always succeeds. Is there a way to find out if any error occurs? I could not find any Output of the MSBuild task containing this information. The only way I know is to parse the log file for errors but it looks like a workaround for me. (I am using

How do I restore a property sheet to its default value?

别等时光非礼了梦想. 提交于 2019-12-20 11:56:22
问题 Let's say I carry out the following steps immediately after first installing and opening Microsoft Visual Studio 2010: File -> New -> Project -> Win32 Console App -> Finish . Go to the Property Manager pane -> Expand Debug | Win32 -> Right click Microsoft.Cpp.Win32.user -> Select Properties . Wildly change settings in a clueless manner, and generally act like a fool. Click Apply , save the project, and close Visual Studio. How do I restore the Microsoft.Cpp.Win32.user property sheet to its

MSBuild Inline Task - Reference non-standard Microsoft assemblies

让人想犯罪 __ 提交于 2019-12-18 18:57:11
问题 I am using the new MSBuild Inline Task to leverage the TransformXml (XDT Transform) in the Microsoft.Web.Publishing.Tasks.dll assembly. Here's what my task (snipped) looks like: <Task> <Reference Include="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.Tasks.dll"/> <Reference Include="System.Xml" /> <Using Namespace="System"/> <Using Namespace="System.Linq"/> <Using Namespace="System.IO" /> <Using Namespace="System.Xml"/> <Using Namespace="Microsoft.Web

SGEN : error : Could not load file or assembly (Exception from HRESULT: 0x8013141A)

不羁岁月 提交于 2019-12-18 15:53:33
问题 VS 2010, win server 2003, .Net 3.5 solution, which were migurated from .Net 1.1 All projects in solution are Delay signed. The soluton can be build successfully for Debug, but always failed for Release with following error. SGEN : error : Could not load file or assembly 'AssemblingX , Version=1.0.5000.0, Culture=neutral, PublicKeyToken=xxxxxxxx' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) The AssemblingX is the project i want to build. All

MSBuild RecursiveDir is empty

倾然丶 夕夏残阳落幕 提交于 2019-12-13 06:58:37
问题 I'm trying to make a custom MSBuild script to build all solutions in our repository: <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <SourceHome Condition=" '$(SourceHome)'=='' ">..\</SourceHome> <ToolsHome Condition=" '$(ToolsHome)'=='' ">.\Tools\</ToolsHome> <Configuration Condition=" '$(Configuration)'=='' ">Release</Configuration> <DestFolder Condition=" '$(DestFolder)'=='' ">.\$(Configuration)\</DestFolder> </PropertyGroup> <ItemGroup> <AllSolutions

TFS 2010 Building Sharepoint 2010 Solution With Custom Outputs

偶尔善良 提交于 2019-12-13 04:18:56
问题 I have a very similar question to this SO post: TFS Build 2010 - Custom Binary Location and SharePoint WSP. There's no marked answer, but the only answer provided seemed to be the path to go. I'm building several solutions and need the solutions and projects to be placed into their own folders. This lead to the build output change to the MSBuild call in the template that I'm using. I've been using this for sometime without any issues. Recently a developer complained that the .wsp files were

MSBuild, include files based on a group of paths

為{幸葍}努か 提交于 2019-12-13 01:55:38
问题 I'm trying to create a build script which would allow me to specify a list of paths to "module projects" that is included in a specific web site. Hence, I have this layout: customer folder |_MainProject |_ModuleProject1 |_ModuleProject2 So, basically I want to be able to specify an ItemGroup that would contain ModuleProject1 and 2, and copy relevant files from it into the MainProject. <ItemGroup> <CustomModule Include="ModuleProject1\*.csproj" /> <CustomModule Include="ModuleProjec2\*.csproj"

Running a build against multiple projects with different build arguments

怎甘沉沦 提交于 2019-12-13 00:38:08
问题 I have a series of projects that need to be compiled and published, deployed to separate directories with separate MSBuild arguments. As it stands, I have separate builds for each. For example, project 1: MSBuild Arguments: /target:myTarget /property:PublishDir=\\1.1.1.1\PublishDir1 and project 2: MSBuild Arguments: /target:myTarget /property:PublishDir=\\1.1.1.2\PublishDir2 However I'd like to merge them into a single build. The problem I have is that although TFS will allow me to specify

Build a string in MSBuild as a concatenation of a base string n-times

て烟熏妆下的殇ゞ 提交于 2019-12-12 18:05:53
问题 I have a numer, "n" in a property in MSBuild. I also have a string "Str" that needs to be duplicated n-times to achieve a final string that is the repetition of "Str" n times. Eg. If n is 3 and Str is "abc", what I want to obtain is "abcabcabc" Since one cannot loop in MSBuild, I don't know how to achieve this. Perhaps with an item group, but how do I create one based on a property containing an "n" count? Thanks! 回答1: usually for things like this I resolve to using inline C#, as it costs me

Output Path and MSBuild

爱⌒轻易说出口 提交于 2019-12-12 13:14:48
问题 I have a solution with 9 projects. All references in each project have their CopyLocal property set to False. When I build it from VS, none of these referenced binaries are copyed to the output build directory. Similarly, when I build using msbuild, I only see the project binaries and no references. However, when I specify an output path in the msbuild command, some references are copied and I don't know why? Is there some setting I am forgetting to set? Has anyone seen this before? 回答1: When