msbuild

NAnt <msbuild> custom output directory

血红的双手。 提交于 2020-01-01 05:13:28
问题 I'm new to NAnt and have been able to create a <target> which 1) Deletes any code from the current folder 2) Exports fresh code from SVN 3) Builds the code in the default directory which is the PrecompiledWeb folder (its a web app) Here it is: <target name="export" description="export code from svn"> <delete dir="${Delete.Dir}"></delete> <exec program="svn" commandline="export ${MySVN.Repos} ${MySVN.Dest}" /> <msbuild project="${Solution.Filename}"> <property name="Configuration" value=

MSBuild: How to build web deploy package for Web Deployment Projects (VS2010)?

混江龙づ霸主 提交于 2020-01-01 04:40:28
问题 I migrated a Web Site project (with Web Deployment project) from VS2008 to VS2010. Now I can make "Build Deployment Package" for Web Deployment Project in VS2010 and it works great! But I can't find a way how to do the same via MSBuild. 回答1: I answer on my one question. So after a lot of googling and 2 days of investigation it finally works. Brief how to: I created Configuration = QA (based on Debug configuration) for Solution via Configuration Manager. Important: I removed 'Platform'

Why msbuild is so slow when nothing has changed since the last build of the solution?

天大地大妈咪最大 提交于 2020-01-01 04:32:30
问题 I have a solution with 109 projects. A mix of all - .NET, Silverlight, MVC, Web Applications, Console applications. Now I build it on the console using msbuild. It takes some time. Understandable - lots of projects, lots of files. But when I build it the second time right after the first - it still takes lots of time, even if nothing is actually built - the diag msbuild log confirms it. For example, here is the Task performance summary for the first full build: Task Performance Summary: 4 ms

Get NuGet package folder in MSBuild

孤人 提交于 2020-01-01 04:24:04
问题 I want to call executable tools like NUnit which I manage via NuGet in MSBuild: <Target Name="Test"> <CreateItem Include="$(BuildCompileDirectory)\*.Tests.*dll"> <Output TaskParameter="Include" ItemName="TestAssemblies" /> </CreateItem> <NUnit Assemblies="@(TestAssemblies)" ToolPath="$(PackagesDirectory)\NUnit.2.5.10.11092\tools" WorkingDirectory="$(BuildCompileDirectory)" OutputXmlFile="$(BuildDirectory)\$(SolutionName).Tests.xml" /> </Target> The problem is that the folder of a NuGet

MSBuild error MSB4018 in VS2015: The “Link” task failed unexpectedly

拟墨画扇 提交于 2020-01-01 04:21:09
问题 After upgrading a solution with 25 projects from VS2012 Update 4 to VS2015 RTM (14.0.23107.0), I get the following error while building one of the projects: (...) MSB4018: 'The "Link" task failed unexpectedly. (...) System.NullReferenceException: Object reference not set to an instance of an object.' (...) Here the full output: 1>------ Build started: Project: Buttons, Configuration: Release Win32 ------ 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(643

MSbuild build order issue - pre-build steps first or dependent projects first

爷,独闯天下 提交于 2020-01-01 02:16:28
问题 I have a project A depending on project B. Project A has some pre-build tasks that is dependent of some generated files from project B. When I build in Visual Studio, no problem. But when using MSBuild.exe, then there is problem because the build order is: A's pre-build steps <- failed because B hasn't been compiled B is compiled <- expected to be executed first A is compiled Is it the expected behaviour using MSBuild? Is there a way to tell MSBuild to do B first before A's prebuild steps? I

Is there a Visual Studio Build Profiler?

不羁岁月 提交于 2020-01-01 01:30:31
问题 My VS.NET 2008 solution is taking longer and longer to compile (ASP.NET 3.5 + ASP.NET MVC 2 + C#) and I am wondering if there is a way to know what project takes the longer to compile and why? I disabled the compilation of a few projects and it helped reduce the build time but I want it faster. 回答1: Tools -> Options -> Projects and Solutions -> Build and Run Then change MSBUild project build output verbosity When on normal (defaul is minimal) it gives timings for each project, so this could

Make a target run once at the Solution level in MSBuild

五迷三道 提交于 2019-12-31 22:39:20
问题 I need a set of tasks that need to be executed exactly once for the entire solution. This will run tasks that will modify each project to run a separate set of tasks for each project. We had done this earlier using a separate project to the solution which had the solution level tasks, but we want to move away from that. Has anyone done this or does anyone have any suggestions on how to implement this? 回答1: Since Solution files are not in MSBuild format they are not easily extended or

How can I debug (preferably in an IDE) an MSBuild script?

与世无争的帅哥 提交于 2019-12-31 22:26:12
问题 We use MSBuild quite extensively as part of our continuous integration process, and whilst it is incredibly powerful and we can do practically all of our build, test and deployment within it (utilising some custom tasks) - we've found that debugging it using tags is a pain and cannot always provide us with enough information. I've found: http://www.wintellect.com/CS/blogs/jrobbins/archive/2007/12/03/msbuild-debuggers.aspx, but unfortunately the project seems to have disappeared from Codeplex.

Zip files after build completes in Visual Studio

旧巷老猫 提交于 2019-12-31 21:42:34
问题 I have a requirement where I need to zip some files after I build a solution file. Could this be achieved automatically once I build my project in Release/Debug mode. 回答1: Usually I don't put stuff like creating zip files, installers, NuGet packages etc. into my actual project. Why? Because when I put it there, it gets executed each time I'm building the project in Visual Studio, for example when I'm debugging. But zip files, installers etc. are only needed when I do a release , so I don't