msbuild

msbuild not working properly with tfs 2010 and importet Microsoft.TeamFoundation.Build.targets

烈酒焚心 提交于 2019-12-13 01:18:16
问题 i'm stuck with extending my msbuild project file and tfs 2010. What i want to achieve is to automatically generate the documentation for my source code after the build. I searched the web and found out, that the file Microsoft.TeamFoundation.Build.targets defines a lot of customizable targets for either desktop- or team-build. One of them is the GenerateDocumentation -Target which i want to use. The Problem i have is, that despite i imported this file, the overloaded targets are not invoked

How can I specify another server to copy the build files onto?

若如初见. 提交于 2019-12-13 01:14:43
问题 I'm trying to create a MSBuild script for running in TeamCity. I have a problem when I want to copy the files generated by the Project Build to another server. I tried to map that server as X:\ but I got the error that it can't find that path. Can anybody help me? Thanks 回答1: Drive mappings can be problematic to use from build scripts. It would be better if you can use a network share. If not you may have to use a tool like MSDeploy. 回答2: Like David commented above, you need to run the

MSBuild recursive copy

我们两清 提交于 2019-12-13 00:39:33
问题 In Csproj I have the following section: <ItemGroup> <Content Include="C\MyPath\**"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <Link>Res\%(RecursiveDir)%(Filename)%(Extension)</Link> </Content> Thus if C\MyPath\ has a following structure: -C -MyPath -f1.txt -folder1 -f3.txt -folder4 -folder2 -f4.txt -folder5 I don`t want exactly the recursive copy but I want folder1 and folder2 not to be generated but rather start recursive copy from the second level: -Res - f1.txt - f3,txt

Running a build against multiple projects with different build arguments

怎甘沉沦 提交于 2019-12-13 00:38:08
问题 I have a series of projects that need to be compiled and published, deployed to separate directories with separate MSBuild arguments. As it stands, I have separate builds for each. For example, project 1: MSBuild Arguments: /target:myTarget /property:PublishDir=\\1.1.1.1\PublishDir1 and project 2: MSBuild Arguments: /target:myTarget /property:PublishDir=\\1.1.1.2\PublishDir2 However I'd like to merge them into a single build. The problem I have is that although TFS will allow me to specify

Issue building UWP app using MSBuild (GENERATEPROJECTPRIFILE)

我的梦境 提交于 2019-12-13 00:32:39
问题 I am trying to build a UWP app from the command-line in an effort to automate the builds from check-in to publishing to the store. Everything works fine when running the builds from within Visual Studio and when I create app packages, it all works fine (but takes too long, 15 minutes or so). While invoking msbuild per platform (x86, x64 & ARM), only ARM seems to fail with the following error: _CreatePriConfigXmlForSplitting "C:\Source\MyProject\src\MyProject\MyProject.csproj" (Build target)

Using MSBuild to build SSDT projects with VS2017 fails

混江龙づ霸主 提交于 2019-12-12 22:42:15
问题 I am trying to set up continuous integration of .sqlproj SSDT projects on our windows server 2016 server. In order to do this I have installed VS2017 and SSDT tools onto the server to get the required tools. I have also installed MS build tools 2017. The issue I am currently having is regarding what looks to be miss-matched versions of installed ms build tools and ssdt. The command i am using to run the build is as follows: C:\\Windows\Microsoft.NET\\Framework64\\v4.0.30319\\MSBuild.exe /p

MSBuild & SQL Server Database Project: bind the deploy and publish desination to the build configuration

…衆ロ難τιáo~ 提交于 2019-12-12 22:13:32
问题 Visual Studio 2012. SQL Server Database Project. Four build configurations were created in solution: Debug, DevDb, TestDb, LocalDb. Three publish profiles were created in project: DevDb.publish.xml, TestDb.publish.xml, LocalDb.publish.xml Pushing F5 button (!) I want to: deploy project with connection string from project properties if build configuration is Debug . publish project with connection string from the corresponding publish profiles if build configuration is DevDb , TestDb or

How to build c++ project with MsBuild v15?

南楼画角 提交于 2019-12-12 20:32:52
问题 I installed the folowing assembly with NuGet Package Manager in Visual Studio 2017 Microsoft.Build; Microsoft.Build.Framework. Microsoft.Build.Utilities.Core All is in version 15 I want to build a c++ project with Msbuild public static void Build(string namePerozhe) { Logger l = new Logger(); ProjectCollection pc = new ProjectCollection(); pc.DefaultToolsVersion = "15.0"; pc.Loggers.Add(l); Dictionary<string, string> GlobalProperty = new Dictionary<string, string>(); GlobalProperty.Add(

VBC Fatal error BC2000: Project already has a reference to assembly

时间秒杀一切 提交于 2019-12-12 18:06:14
问题 I've researched this issue for a few days with no answer. There are references to the error code but I believe that BC2000 is used for all "compiler initialization" errors, regardless of the underlying issue. I have a VS solution that compiles just fine in our dev environment with MSBuild 12.0. However, when trying to compile in our Win 2008 R2 SP1 build machine using MSBuild 12.0, we get a fatal error. The command being executed for MSBuild is: "C:\Program Files (x86)\MSBuild\12.0\Bin

Build a string in MSBuild as a concatenation of a base string n-times

て烟熏妆下的殇ゞ 提交于 2019-12-12 18:05:53
问题 I have a numer, "n" in a property in MSBuild. I also have a string "Str" that needs to be duplicated n-times to achieve a final string that is the repetition of "Str" n times. Eg. If n is 3 and Str is "abc", what I want to obtain is "abcabcabc" Since one cannot loop in MSBuild, I don't know how to achieve this. Perhaps with an item group, but how do I create one based on a property containing an "n" count? Thanks! 回答1: usually for things like this I resolve to using inline C#, as it costs me