msbuild

MsDeploy Virtual Directory gets converted to Virtual Application on deploy

你离开我真会死。 提交于 2019-12-23 17:23:48
问题 For my CMS to work properly it needs to be deployed to a virtual directory underneath the www root so it can access (via reflection) the website to manage (note: CMS = N2CMS). When using Visual Studio 'Publish To Web' all is fine. But when I generate the package via msbuild commandline and publish that version my virtual directory is converted to a virtual application. I configured my remote server to have a virtual directory '/n2' underneath my IIS web application ('exampleapp') and

Filter on Category for NUnit MSBuild tasks?

我是研究僧i 提交于 2019-12-23 17:22:05
问题 I'm setting up a MSBuild project to run some NUnit test, using the MSBuild Community Tasks Project. With these settings I'll be able to run the NUnit tests: <Target Name="Test" DependsOnTargets="Build"> <CreateItem Include="$(ProjectTestDir)\$(ClassLibraryOutputDirectory)\*.Tests.dll"> <Output TaskParameter="Include" ItemName="TestAssembly" /> </CreateItem> <NUnit Assemblies="@(TestAssembly)" /> </Target> ... but how can i run only certain tests - say the ones with a specific Category? We've

Recursively copy all files with MSBuild

醉酒当歌 提交于 2019-12-23 17:17:34
问题 I have the following set of files with MSBuild: <ScriptFiles Include="Server/scripts/**/*.js" /> I then copy all of it over to another directory: <Copy SourceFiles="@(ScriptFiles)" DestinationFiles="@(ScriptFiles->'$(BuildDir)/WWW/scripts/%(RecursiveDir)%(Filename)%(Extension)')" /> However, what I want to do is copy *.js , and copy /yui/*.* . What I tried doing is: <ScriptFiles Include="Server/scripts/**/*.js;Server/scripts/yui/**/*" /> However, what this does is flatten the /yui/ directory

MSBuild Click-Once issues with manifest

浪子不回头ぞ 提交于 2019-12-23 16:49:04
问题 I am getting the following error when I publish my ClickOnce application with MSBuild. I have a pre-publish task which copys the correct app.config file into the project before the publish and this is the only thing that I think could be causing this error. How can I correct this? Following failure messages were detected: File, MyApplication.exe.config, has a different computed hash than specified in manifest. 回答1: You're copying the file after the hash is generated. You need to copy the file

Error MSB4025: Visual Studio 2015 Package Restore for .NET Core Projects Breaks

↘锁芯ラ 提交于 2019-12-23 16:30:05
问题 I was using VS Studio 2015 Professional Edition on Windows 10 Professional for developing .NET Core applications. Everything was working fine before installing VS 2017 Edition and restarting the OS. Now, any project I create it seems that dependencies cannot be installed: project.json: { "version": "1.0.0-*", "buildOptions": { "emitEntryPoint": true }, "dependencies": { "Microsoft.NETCore.App": { "type": "platform", "version": "1.0.1" } }, "frameworks": { "netcoreapp1.0": { "imports":

How to reference File element inside wxs file generated by heat.exe in Wix

我与影子孤独终老i 提交于 2019-12-23 16:28:07
问题 I am going to create setup for my web project. I use http://blog.bartdemeyer.be/2013/10/create-an-installer-for-website-with-wix-part-1/ as my reference. In the middle of article, author create a file called WebSiteContent.wxs using heat.exe: <Target Name="Harvest"> <!-- Harvest all content of published result --> <Exec Command='$(WixPath)heat dir $(Publish) -dr INSTALLFOLDER -ke -srd -cg MyWebWebComponents -var var.publishDir -gg -out $(WebSiteContentCode)' ContinueOnError="false"

How can I pause in the middle of the execution of a MSBuild script?

自古美人都是妖i 提交于 2019-12-23 16:16:26
问题 I tried to use: <Exec Command="pause" /> But that doesn't work. Please help to to pause! Nam. 回答1: The MSBuild Community Tasks has a Prompt task that sounds like it will work for you. I've never used it myself, so can't say from experience. 回答2: I've tried Prompt task with an sample script as below. It works. Thank you! Nam. <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="MAIN" > <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild

FSharp project build fails in MSBuild in TeamCity

余生颓废 提交于 2019-12-23 16:15:26
问题 I have the following setup described here (TeamCity with MSBuild and F# 3.1 Tools installed). I have a number of projects in my solution, among which also a F# project. Everything builds fine in Visual Studio, but when I try to build it with MSBuild on my TeamCity server (which does not have VS installed) it throws the following build error on a project that references my FSharp project : "C:\TeamCity\buildAgent\work\9d3b5b7177ddb2b9\MY_SOLUTION.sln.teamcity" (TeamCity_Generated_Build target)

MSBuild not building with all cores

心不动则不痛 提交于 2019-12-23 16:15:26
问题 I have a project configured with Visual Studios 2008. When I open the IDE and hit build, all the cores on my system are used to build the project. However, when I try and build from the command line only 1 core is used. Here is the command that I am running: C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild VTK.sln /m /fl /tv:3.5 /p:Configuration=RelWithDebInfo From reading the docs, it would appear that the /m switch should tell MSBuild to use all cores, but it does not. Any ideas how to make

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