msbuild-4.0

The type or namespace could not be found

北战南征 提交于 2019-12-01 07:41:24
I'm currently trying to convert a WiX 3.5 custom actions project in Visual Studio 2008 to WiX 3.7 and Visual Studio 2012 and I'm getting the following exception: The type or namespace name 'MyNamespace' could not be found (are you missing a using directive or an assembly reference?) The dll is definitely referenced and Visual Studio 2012 has no problem seeing the namespace. Everything under the namespace even pops up in Intellisense, but when I build it I'm getting this exception. Anyone have an idea of what's going on here? Additional Info: The namespace I'm referencing is a .Net 2.0 library

MSBuild Inline Task - Reference non-standard Microsoft assemblies

六眼飞鱼酱① 提交于 2019-11-30 17:27:28
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.Publishing.Tasks"/> <Code Type="Fragment" Language="cs">...</Code> </Task> This compiles fine and the DLL

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

泄露秘密 提交于 2019-11-30 13:42:31
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 referenced DLLs of this project are saved at local folder, and signed already. If i change the property

MSBuild deploy failing after upgrade to .NET 4.5

两盒软妹~` 提交于 2019-11-30 05:54:21
问题 We recently upgraded our VS 2010 and .NET 4 application to VS 2012 and .NET 4.5. We have a build script to deploy the application on the test server. We have two boxes - one is Windows 8 with VS 2012 (fresh install) and other is Windows 7 with VS 2010 and VS 2012 (installed newly). When running the build script from Windows 8 box build script is working well and deploys the application to test server. But when deploying the application from Windows 7 box I get the following error: "C:\Achinth

MSBuild build order

跟風遠走 提交于 2019-11-29 16:22:15
问题 I have a large solution with more than 100 projects (C++, Managed C++, C#) and many of them depends on each others. I have a TeamCity server and I want build this solution there. When I build solution in VisualStudio everything goes fine, but with TeamCity I have a CS0006 error. I know why that so - TeamCity uses MSBuild 4 to build solutions, but there is a known bug in MSBuild 4 - it ignores build order and build projects from solutions in order it wants. Because of this behavior if you have

Run an MSBuild target only if project is actually built

好久不见. 提交于 2019-11-29 07:17:43
I have an MSBuild file that builds * / .sln files (builds all .sln files that exist). The build uses the Build target, so if no changes were made to input files, no project should be built again. I would like to execute some custom target only if a project actually gets built again. How can this be done? Both AfterBuild and AfterCompile are always called, no matter if the compile/build actually takes place. Basically you want the same behaviour as the PostBuildEvent for instance, so I looked up how Microsoft.Common.Targets does it (this file always provides a nice insight in to how msbuild is

How to debug a project file in MSBuild 12.0 / VS2013?

守給你的承諾、 提交于 2019-11-29 04:02:51
Tracing a project was easy in MSBuild 4.0 / VS2010 , all you had to do was set registry key which enabled an msbuild /debug command line option. The debugger would launch and break at the start of the project file. MSBuild 12 introduces a new environment variable for this. At the command prompt, set MSBUILDDEBUGONSTART=1 and then run MSBuild (no command line switch). This launches the debugger, but does no break . The project just runs to completion with VS open. Am I missing a setting? Or has this (undocumented) feature been removed? I was able to at least get the debugger to halt by hard

How to get all the metadata keys for any ItemGroup item?

孤人 提交于 2019-11-28 23:58:17
Is there a way to get all the metadata keys associated with a given item? I want to do something like the following. Given: <ItemGroup> <MyItems Include="item1"> <key1>val1</key1> <key2>val2</key2> <key3>val3</key3> </MyItems> <MyItems Include="item2"> <key4>val4</key4> </MyItems> </ItemGroup> Be able to determine that item1 has metadata available for key1, key2, and key3, and that item2 has metadata available for key4, without knowing what the names of those keys actually are. In effect, I'm trying to use the metadata to specify attributes that I have no idea about, and then trying to figure

Build MSBuild target without dependencies

谁说胖子不能爱 提交于 2019-11-28 07:22:50
Is there any way I can tell MSBuild 4.0 to build a target, but ignore any dependencies? I just want to build that target itself, nothing else. Lee K-A I would like to reiterate @EMP's solution (and I can't vote him up due to my puny reputation). The correct way to avoid MSBuild's default behavior of rebuilding all the dependencies listed in the project file is to set the BuildProjectReferences property to false. In his answer he invokes MSBuild from within an MSBuild script; here's an example from the command line: MSBuild myproj.csproj /p:Configuration=Debug /p:BuildProjectReferences=false /t

MSBuild deploy failing after upgrade to .NET 4.5

江枫思渺然 提交于 2019-11-28 03:39:42
We recently upgraded our VS 2010 and .NET 4 application to VS 2012 and .NET 4.5. We have a build script to deploy the application on the test server. We have two boxes - one is Windows 8 with VS 2012 (fresh install) and other is Windows 7 with VS 2010 and VS 2012 (installed newly). When running the build script from Windows 8 box build script is working well and deploys the application to test server. But when deploying the application from Windows 7 box I get the following error: "C:\Achinth\Build\Work\build\qa1sb.proj" (DeployAll target) (1) ->"C:\Achinth\Build\Work\App\App.csproj"