msbuild

npm install -g karma error MSB4019: The imported project “C:\Microsoft.Cpp.Default.props” was not found

跟風遠走 提交于 2019-12-17 10:29:18
问题 I've been looking into AngularJS and following its install steps, but I get an error running step #1: npm install -g karma Here is the full output: Microsoft Windows [Version 6.2.9200] (c) 2012 Microsoft Corporation. All rights reserved. C:\Users\Travis>node --version v0.10.18 C:\Users\Travis>python --version Python 2.7.3 C:\Users\Travis>npm install -g karma npm http GET https://registry.npmjs.org/karma npm http 304 https://registry.npmjs.org/karma npm http GET https://registry.npmjs.org/di

Change name of exe depending on conditional compilation symbol

馋奶兔 提交于 2019-12-17 09:55:43
问题 Can you tell Visual Studio to output a different name of an exe file depending on if a specific conditional compilation symbol is set? 回答1: If you load the .csproj file into a text editor, you can control the AssemblyName property: <AssemblyName Condition="'$(Configuration)' == 'Debug'">WindowsFormsApplication9.Debug</AssemblyName> <AssemblyName Condition="'$(Configuration)' != 'Debug'">WindowsFormsApplication9</AssemblyName> Note though that this does not only change the file name, but the

MSBuild to copy dynamically generated files as part of project dependency

我只是一个虾纸丫 提交于 2019-12-17 09:46:31
问题 I have a custom msbuild task that is generating some output files to the output directory ($(TargetDir)) of a ProjectA. Current code is something like this: <MyCustomTask ...> <Output TaskParameter="OutputFiles" ItemName="FileWrites"/> </MyCustomTask> A ProjectB is referencing ProjectA but the problem is that when building ProjectB, generated files by MyCustomTask are not copied to the output directory of the ProjectB. How can we get dynamically generated additional files to be copied as part

how to replace string in file using msbuild?

*爱你&永不变心* 提交于 2019-12-17 09:35:54
问题 I want to replace a string such "how r u" in file test.xml with a string "i am fine" in another file xy.xml.using regular expression in ms build. ie i have to read string from one file(xy.xml) and replace it in another file test.xml. so please provide necessary steps to solve this issue with example 回答1: EDIT: This answer is obsolete. Use solution below... Use ReadLinesFromFile task to get replacement string from the xy.xml file. Check this Then use value from xy.xml as a replacement string

Choice for build tool: MSBuild, NANT or something else?

醉酒当歌 提交于 2019-12-17 07:53:08
问题 I am doing automation in my company. We are a C# workshop. Currently I am working on automated build. NANT is flow control tool. While NANT is not actively developed (last binary released on June 2012 and github repo is not active), MSBuild is better. Therefore, I prefer MSBuild but retiring NANT is still questionable - what is the cost? I have come up with some pros and cons, but I know collective intelligence is better. Thanks for your help! Update : I have read the question, but the second

How to exclude project from build in MSBUILD?

╄→尐↘猪︶ㄣ 提交于 2019-12-17 07:23:09
问题 I need to build a solution but exclude one project. How should I do it? I searched a lot about this issue but nothing could help. ItemGroup section rise the following exception: Invalid element . Unknown task or datatype. PropertyGroup also rise the exception. Below is my code sample: <project name="TI 8.1.6 build script"> <ItemGroup> <Solution Include="${ROOT}\Core\TI Core.sln" Exclude="${ROOT}\Utilities\DTS Indexing Service\Tdi.Origami.IndexUpdaterServiceSetup\Tdi.Origami

Is it possible to install a C# compiler without Visual Studio?

时间秒杀一切 提交于 2019-12-17 07:09:21
问题 I want to build projects from the command line. Is it possible to deploy a C# compiler without installing Visual Studio? 回答1: Sure, the framework includes a compiler, csc.exe. Look at this article for a quick how-to. The important parts: You can get the command-line compiler (csc.exe) from Microsoft site http://msdn2.microsoft.com/en-us/netframework/aa731542.aspx. Download the redistributable package of the .NET Framework, which includes the compiler and the .NET Framework with C# 2005 syntax

Running Code Analysis (FxCop > 10) on build agent without installing Visual Studio

ぃ、小莉子 提交于 2019-12-17 07:01:43
问题 After FxCop 10 Microsoft stopped shipping a separate installer for FxCop. Officially one can currently only run code analysis (FxCop 12.0 / 14.0 / 15.0) after installing Visual Studio 2013 / 2015 / 2017. However, we are adamant about not installing Visual Studio on the build agents (the installation needs then to be kept in-sync with what we have got on the developer computers etc.). So how would i go about getting FxCop 12.0 / 14.0 / 15.0 to work on a build agent, preferrably without

Using msbuild to execute a File System Publish Profile

送分小仙女□ 提交于 2019-12-17 06:31:44
问题 I have a c# .Net 4.0 project created with VS2010 and now being accessed with VS2012. I'm trying to publish only the needed files from this website to a destination location (C:\builds\MyProject[Files]) My file structure: ./ProjectRoot/MyProject.csproj ./ProjectRoot/Properties/PublishProfiles/FileSystemDebug.pubxml I'm running the following via MSBuild: C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe ./ProjectRoot/MyProject.csproj /p:DeployOnBuild=true /p:PublishProfile=./ProjectRoot

MSI Build uninstall- Installed directory not removing

别来无恙 提交于 2019-12-17 06:18:16
问题 I created the MSI build package for our application. After this installation, we triggered another dependent driver software in the separate process in a committed event of Installer class like below, Process.Start (" Path of driver software ") We are facing an issue, installed directory ( It's empty ) folder is not removing while un-installing the same. Actually like installation, we triggered the un-installation of dependent driver software in the separate process by overriding the