msbuild

MSBuild clean directory string

守給你的承諾、 提交于 2019-12-24 00:53:45
问题 I have a property in MSBuild to represent the directory above the MSBuildProjectDirectory: <PropertyGroup> <BuildDir>$(MSBuildProjectDirectory)\..</PRSBuildDir> </PropertyGroup> I need to then use this property, but I need the directory string cleaned so that it doesn't include the .. . In other words I need the .. evaluated, so that if the current project file is in C:\Test\Tom\MyDir , then I need a property containing the string C:\Test\Tom . The reason I'm asking is because I'm trying to

VS2015-The default XML namespace of the project must be the MSBuild XML namespace

谁说胖子不能爱 提交于 2019-12-24 00:44:49
问题 I am trying to add an existing project to my source project in VS2015, and I am getting the following error: Visual Studio 2015 - The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. if the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 fromat. How can I solve this? 回答1: VS2015-The

Microsoft.Build.Utilities.ToolLocationHelper error on TeamCity

百般思念 提交于 2019-12-24 00:43:25
问题 Although my solution is building on my local machine, it throws this error on TeamCity when I use "Visual Studio (sln)" as the runner for the build step: [Microsoft.Build.Utilities.ToolLocationHelper]::GetPlatformSDKDisplayName($(TargetPlatformIdentifier), $(TargetPlatformVersion))". Method 'Microsoft.Build.Utilities.ToolLocationHelper.GetPlatformSDKDisplayName' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine( a , b )).

Msbuild ItemGroup exclude doesn't work with wildcards

天大地大妈咪最大 提交于 2019-12-24 00:07:04
问题 This Itemgroup ItemsFromAnotherTarget contains: ..\..\References\AnotherFolder\ReferencedAssembly.dll bin\GeneratedAssembly1.dll bin\GeneratedAssembly2.dll somefolder\somefile.txt somefolder\somefile.exe bin\anexe.exe The idea is to generate another item group BinaryFiles containing bin\GeneratedAssembly1.dll bin\GeneratedAssembly2.dll somefolder\somefile.exe bin\anexe.exe So I have the following: <ItemGroup> <BinaryFiles Include="@(ItemsFromAnotherTarget)" Condition="'%(Extension)'=='.dll'

How to bind a custom event to the grunt task runner in VS 2013

て烟熏妆下的殇ゞ 提交于 2019-12-23 22:54:03
问题 I'm aware of the task runner as a visual studio extension, you can bind a grunt task to a specific visual studio "event" like: before build after build clean open solution In my case I want to automate the deploy process to run a build task using grunt (clean, minify, concat files, etc.) before creating a deploy package when publishing a website in visual studio . I also want to do some modifications to the deploy package instead to pickup the whole list of files in the main directory I'd

WIX: GenerateBootStrapper conditions?

倾然丶 夕夏残阳落幕 提交于 2019-12-23 22:24:07
问题 I've built an installer with WIX and have packaged it with the .NET 4.0 framework using the GenerateBootstrapper task. Now .NET 4.0 cannot be installed on XP SP2, but it appears to have no precondition check for this so its installer fails halfway through. I'd like to add my own check to make sure the OS that the entire package is being installed on is supported by the .NET 4.0 framework. Is there a way to embed an OS/Service Pack check in the bootstrapper when you use GenerateBootstrapper ?

Is it possible to compile Typescript files locally but not on the build server?

牧云@^-^@ 提交于 2019-12-23 22:13:46
问题 I've added Typescript to my build process, but I'm getting the Write to file failed error because the destination js file is Read Only, and this is because I'm including the emitted js file in TFS. I know I could remove the js file from TFS and always generate on the fly, but I don't want to do that because I want to include them in the project and the deployment to the build server will fail if I do that with files that aren't in TFS. I could use a pre-build step to remove the Read Only

How do I get Visual Studio 2010 to pass a variable to MSBuild?

断了今生、忘了曾经 提交于 2019-12-23 21:49:36
问题 I have built a custom msbuild deploy.targets file that allows me to publish the resulting binaries to a directory that I specify on the command line. What that means is that if I run $>msbuild /p:DestServer=\myserver\final-dest then my project will be compiled, and the resulting *.dlls will be copied to a staging instance - in this case the directory final-dest on myserver. I want this functionality because when I do a compile for good, I want a copy of the *.dlls in that directory, but I

Error: assembly specified in the dependencies manifest was not found.

﹥>﹥吖頭↗ 提交于 2019-12-23 21:18:51
问题 When I try to deploy the console core app, I'm getting the error: Error: assembly specified in the dependencies manifest was not found -- package: 'microsoft.aspnetcore.hosting.abstractions', version: '1.0.0', path: 'lib/netstandard1.3/Microsoft.AspNetCore.Hosting.Abstractions.dll' I can see that Microsoft.AspNetCore.Hosting.Abstractions.dll exists in lib/netstandard1.3/Microsoft.AspNetCore.Hosting.Abstractions.dll. Is there a way to get the path? 回答1: If we are using TFS 2013, then the work

How to configure msbuild/MSVC to deploy dependent files of dependent assemblies

牧云@^-^@ 提交于 2019-12-23 20:49:42
问题 I have a dependency chain that looks like this (simplification for example purposes): application -> foo (contains foo.dll) -> bar (contains bar.dll and bar_data.xml) the dependent files are correctly marked with "copy if newer" on the data file and "copy local" on the references. bar/bin/Debug correctly contains bar.dll and bar_data.xml foo/bin/Debug correctly contains foo.dll, bar.dll and bar_data.xml application/bin/Debug only contains foo.dll and bar.dll (and app.exe), but not bar_data