msbuild-4.0

How can msbuild.exe be set up to embed the proper value for SSE2 into _M_IX86_FP?

点点圈 提交于 2021-01-28 01:56:56
问题 I have built a solution with VS2010 Express Edition with SSE2 set in the properties C++ code generation enhanced instruction set. Then in the program test against predefined MARCO _M_IX86_FP yields as expected the value of 2. The same project built with msbuild.exe with /p:"VCBuildAdditionalOptions=/arch:SSE2" appears to build the solution with /arch:SSE2 in place for each project. But, the test against predefined MARCO _M_IX86_FP yields a value of zero. How can msbuild.exe be set up to embed

MSBuild /m:4 fails because it builds the same project twice

前提是你 提交于 2020-01-03 08:55:28
问题 My team has a large solution (~500 csproj's). We use VS2012, and build using TFS Build, which uses MSBuild 4. Currently we build serially, but we want to build in parallel (using msbuild /maxcpucount:4 ). However, when I try it on my 4-proc machine, I get a weird failure: 11:2>CSC : fatal error CS0042: Unexpected error creating debug information file 'C:\Common\obj\Debug\Common.PDB' -- 'C:\Common\obj\Debug\Common.pdb: The process cannot access the file because it is being used by another

MSBuild /m:4 fails because it builds the same project twice

徘徊边缘 提交于 2020-01-03 08:55:05
问题 My team has a large solution (~500 csproj's). We use VS2012, and build using TFS Build, which uses MSBuild 4. Currently we build serially, but we want to build in parallel (using msbuild /maxcpucount:4 ). However, when I try it on my 4-proc machine, I get a weird failure: 11:2>CSC : fatal error CS0042: Unexpected error creating debug information file 'C:\Common\obj\Debug\Common.PDB' -- 'C:\Common\obj\Debug\Common.pdb: The process cannot access the file because it is being used by another

Include referenced project's .config file

守給你的承諾、 提交于 2019-12-31 08:57:49
问题 Rather than excluding a file from the referenced output of an assembly, I want to add one! I have a console application project (BuildTest1) that references a second class library project (ClassLibrary1). The Visual Studio solution looks like this: I have a class library project that has an app.config. I want this .config file copied to the referring project's output, just like the .dll and .pdb files are. The config file for the class library is copied to the class library output directory

Incremental Build of Nuget Packages

爱⌒轻易说出口 提交于 2019-12-25 07:43:41
问题 I want to execute an msbuild project which uses batching to determine that one or more csproj projects have been freshly-built, and therefore require fresh nuget packaging. The script I've made so far seems like a reasonable start, but it the incremental-build mechanism isn't working. The MainBuild target executes every time, no matter what. Here is what I have: <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="MainBuild" xmlns="http://schemas.microsoft.com

How to re-run property evaluation in MSBuild target?

喜你入骨 提交于 2019-12-23 15:57:36
问题 I have a custom MSBuild target, partial snippet as follows .. <Target Name="PublishHtm"> <PropertyGroup> <PublishHtmTemplateContents>$([System.IO.File]::ReadAllText($(PublishHtmTemplatePath)))</PublishHtmTemplateContents> <PublishHtm>$(PublishHtmTemplateContents)</PublishHtm> </PropertyGroup> <WriteLinesToFile Lines="$(PublishHtm)" File="$(PublishDir)\publish.htm" Overwrite="true"/> </Target> This is a rework attempt for this solution in that I'm trying to isolate this template to an external

How can I capture the cl.exe command line in Visual Studio 2010?

那年仲夏 提交于 2019-12-23 05:24:17
问题 I have a project that I converted from a makefile that has a source file that expects the command line options from the compiler. For example for when the project was built with gcc if you did program --help it would spit out the gcc command line used to compile the program. How can I do the same thing in Visual Studio, so that it spits out the cl command line used to compile the program? Basically I want to hit F7 (to build solution) and have the whole thing automated. I can't find a macro

Logging Build messages with MSBuild 4.0

故事扮演 提交于 2019-12-21 12:55:55
问题 I am using MsBuild 4.0 in code, like so: var globalProperties = new Dictionary<string, string>(); var buildRequest = new BuildRequestData(solutionPathAbsolute, globalProperties, null, new string[] { "Build" }, null); var pc = new ProjectCollection(); var result = BuildManager.DefaultBuildManager.Build(new BuildParameters(pc), buildRequest); Note how this API is completely different from MsBuild 3.5... How does one hook in a logger to recieve detailed build messages with the new API? 回答1: The

VS2010 rebuilds C++ project because of modified irrelevant files

别来无恙 提交于 2019-12-21 04:22:32
问题 As all of us already know VS2010 has got an major upgrade of its build system, which is based on MSBuild. According to MS representatives (see comments in Visual Studio 2010 always rebuild project after hibernation/restart of computer) MSBuild now injects itself into other tools (like C++ compilers, linkers, etc.) to find out the dependencies of a target. One of the drawbacks of such approach is that now your project may be forcedly rebuilt because of modifications in irrelevant files :( In

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

☆樱花仙子☆ 提交于 2019-12-20 18:25:27
问题 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