msbuild

How can I use a single Visual Studio solution to build both x86 and x64 at the same time?

删除回忆录丶 提交于 2020-01-09 12:18:01
问题 I've got an x86 Visual Studio solution with many project files in it. Some of the DLL files are designed to work as plug-ins to other applications on a user's system. We're expanding some of the DLL files to be able to support 64-bit applications. I'd like to set up the solution/projects so that just hitting "Build" will build both the x86 and x64 versions of those DLL files. The solution contains both C++ and C# projects. I realize that "Batch Build" is capable of building both, though it

Using MSBuild to Build Multiple Configurations

时光毁灭记忆、已成空白 提交于 2020-01-09 06:28:52
问题 I'm trying to edit my project file to enable me to have a project that builds multiple build configs at once. I've done this using a batching approach and using the MSBuild task (see below). If I run the script, I get an this error: Error 103 The OutputPath property is not set for project "ThisMSBuildProjectFile.csproj". Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='AnyCPU'. I get this if I

_CopyWebApplication with web.config transformations

∥☆過路亽.° 提交于 2020-01-09 06:04:19
问题 I am trying to have my web application automatically Publish when a Release build is performed. I'm doing this using the _CopyWebApplication target. I added the following to my .csproj file: <!-- Automatically Publish in Release build. --> <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" /> <Target Name="AfterBuild"> <RemoveDir Directories="$(ProjectDir)..\Output\MyWeb" ContinueOnError="true" /> <MSBuild Projects="MyWeb

npm install 命令解析

丶灬走出姿态 提交于 2020-01-08 20:41:14
前言 npm install module_name 不同的参数,会使得module 模块安装到不同的目录下面。 不加任何参数 npm install module_name 本地安装(将安装包放在 ./node_modules 下) -g 将安装包放在 /usr/local 下或者你 node 的安装目录。 可以直接在命令行里使用。 –save (1)会把msbuild包安装到node_modules目录中 (2)会在package.json的dependencies属性下添加msbuild (3)之后运行npm install命令时,会自动安装msbuild到node_modules目录中 (4)之后运行npm install --production或者注明NODE_ENV变量值为production时,会自动安装msbuild到node_modules目录中 –save-dev (1)会把msbuild包安装到node_modules目录中 (2)会在package.json的devDependencies属性下添加msbuild (3)之后运行npm install命令时,会自动安装msbuild到node_modules目录中 (4)之后运行npm install --production或者注明NODE_ENV变量值为production时

VS2010 How to include files in project, to copy them to build output directory automatically during build or publish

好久不见. 提交于 2020-01-08 12:27:14
问题 Task is to form Visual Studio 2010 project so, that during any build or publish some foo.exe utility should be copied to output ( bin ) directory. Early I have made PostBuildEvent task in .csproj (MSBuild-file): <PropertyGroup> <PostBuildEvent> Copy "$(SolutionDir)Tools\foo.exe" "$(ProjectDir)$(OutDir)foo.exe" </PostBuildEvent> </PropertyGroup> But this is not universal. During publishing (Visual Studio 2010) foo.exe appears in bin directory, but is not copied to output publish directory.

Set build order without using project reference

允我心安 提交于 2020-01-07 08:36:27
问题 In our solution we have more than 150 projects, now most of projects are using some .js file, which is generated by another project. So I need build this project before others. I know I can set the other projects are reference this project, but the problem is that we have nearly 100 projects that needs those .js file, add this project as reference project to 100 projects is not the best option. So how can I set the build order without adding project reference? Thanks any advice. 回答1: how can

MSBuild.ILMerge.Task not allowing Duplicate Types

喜你入骨 提交于 2020-01-07 04:24:47
问题 I'm getting the following error from a call to ILMerge. ILMerge.Merge: ERROR!!: Duplicate type 'System.Net.Http.HttpRequestMessageExtensions' found in assembly 'System.Net.Http.Formatting'. Do you want to use the /alllowDup option? And you'd think this would be straightforward to solve. The error message says what to do. But my call to ILMerge is made by MSBuild.ILMerge.Task And it seems I'm already doing what I need to do to get this to happen... From my ILMerge.props file: <!-- added in

Visual-Studio Manifest Tool doesn't accept multiple Additional Manifest Files?

强颜欢笑 提交于 2020-01-07 00:33:51
问题 TL;DR (How) is it possible to get Visual Studio (2010 - 2015) to accept multiple manifest files (to merge) via the actual Additional Manifest Files GUI / props option (and not via workarounds)? Simplified walk through: My C++ application embeds an additional manifest file (containing Private Assembly info) via the Visual-C++ Setting: Cfg Properties > Manifest Tool > Input and Output > Additional Manifest Files This works as expected. Now, I need to add/merge in a second manifest file . Since

Copying entire project structure into another directory using afterbuild task

我是研究僧i 提交于 2020-01-06 18:37:12
问题 I want to use the AfterBuild target for copying the entire project structure into a separate folder. This is the project structure TANKProject | |__TANK.CLI |__TANK.Core |__TANK.Web I want to copy the entire project structure including bin folder and the .sln folder into a location B:\animesh\repos . To do that, I put the following snippet in the AfterBuild target in each .csproj file: <ItemGroup> <_CustomFiles Include="..\TANK.ProjectName\*.*" /> </ItemGroup> <Copy SourceFiles="@(

How to get the value of an MSBuild variable

孤者浪人 提交于 2020-01-06 16:24:07
问题 How can I get the value of MSBuild variable (ex. $(MSBuildToolsPath) , $(MSBuildAssemblyVersion) , $(TargetFrameworkIdentifier) , etc.). I need to get the value on the C# side, but I can access msbuild.exe if it's not available from the C# code. 回答1: BuildManager and the likes are for building, only; Microsoft decided to split up the MSBuild API in different namespaces according to functionality. Once you know that it's not too hard figuring out what you need: you just need to evaluate