msbuild

msbuild script utilizing solution information

时光总嘲笑我的痴心妄想 提交于 2019-12-19 03:54:08
问题 I have a csproj file, being part of two different Visual Studio solutions. The project file should be able to behave slightly different, depending on the solution it will be used from. What I would need, is something usable as a 'Condition' - a property named for example $(SolutionName) - filled in automagically. At least, this is my idea. I didn't found anything like that. I also considered to have two small project files importing the common parts. This would prevent editing all these

Is there any way to call custom code when publishing?

非 Y 不嫁゛ 提交于 2019-12-19 03:31:28
问题 We have quite a large site now, build in C#/Asp.Net. We've got two publishing profiles, one for Staging and one for Production. They have been made using standard Web Deploy publish profiles. What we now want to do is to send out an email any time we publish to Production. What I would like to do is find some sort of post publish method that I can hook into. Sort of like the Post-build event, except for publishing instead. Is this possible? 回答1: Although I haven't tested it out there is some

The WiX Toolset v3.11 (or newer) build tools must be installed to build this project

风流意气都作罢 提交于 2019-12-19 03:18:37
问题 Just installed Visual Studio 2017 and wix extension and when trying to build a solution which uses Wix I get the following error: Error The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. Could not find wix.targets at 'C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.x\'. To download WiX Toolset v3.11 (or newer), see http://wixtoolset.org/releases/ Installer C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\WiX\v3.x\Wix.targets

UWP with Desktop Bridge package build automation with MSbuild

淺唱寂寞╮ 提交于 2019-12-19 03:12:15
问题 Does anyone know how to automate UWP with Desktop Bridge (Desktop Extension) package build (.appxupload/.appxbundle) by using MSbuild tool? I've got the setup like on the following blog. For the simple UWP app (without Desktop Extension) I’m able to this with the following command: msbuild UWP.sln /p:Configuration=Release;AppxBundle=Always;AppxBundlePlatforms=”x86|x64|ARM”;UapAppxPackageBuildMode=StoreUpload However, when I try it on Package.wapproj I’ve got a bunch of errors. For instance,

TFS 2017 Build Automatically kicks off and keeps failing

杀马特。学长 韩版系。学妹 提交于 2019-12-19 03:10:53
问题 I have a TFS 2017 server build, it is linked to a bit bucket\Git repo. The build is set to automatically kickoff when master changes. This works fine and also works fine if i manually kick off a build of master or a branch. But i keep getting thse failed build that randomly kick off by Project Collection Service Accounts They always fail with this error An exception occurred while polling the repository. Error: Microsoft.TeamFoundation.Build2.Server.Extensions.ExternalConnectorException: this

error MSB3147: Could not find required file 'setup.bin' Publish to Local FAILURE

允我心安 提交于 2019-12-19 02:52:05
问题 After scouring the internet and discussing this in chat here, I'm finally asking a new question about an old error. I'm using Visual Studio Enterprise 2015 on Windows 10. The question and answers on this are from 2011 MSBuild: error MSB3147: Could not find required file 'setup.bin'. This question and the accepted answer were written in 2012, the other answers are from 2015, with one from 2016, that is not helpful Could not find required file 'setup.bin'. The target build for the project is 4

Can Visual Studio automatically adjust the name of other file as it does with app.config?

不羁岁月 提交于 2019-12-19 02:05:48
问题 When adding an Application Configuration file to a .Net project in Visual Studio it will be named app.config and will be renamed (on build) to ApplicationName.config . I have a solution with about 40 projects. I want to add log4net functionality to quite a few of them. So for every project I would add a file app.log4net . I would then declare a post-build event like this: copy $(ProjectDir)app.log4net $(TargetPath).log4net That works just fine. But I was wondering whether there was a built-in

Visual Studio project build as an executable AND a DLL

末鹿安然 提交于 2019-12-18 21:50:12
问题 In Visual Studio 2008 project properties, Application tab, I can set the Output type to Windows Application, Console Application, or Class Library. I have a project that I want to build as a stand-alone tool (console app) and be available to a couple other tools I'm working on as a class library. The VS GUI only lets me choose one or the other, and building the proj twice all the time is inconvenient. How can I set it up to build both output types in a single build job? Do I write some custom

ItemGroup With Custom Metadata regarding files

孤街浪徒 提交于 2019-12-18 21:19:35
问题 I’m trying to create a “Files” task item group with a metadata attribute called “TargetPath” populated with the relative path to a file. Example: For these paths: D:\Test\Blah.exe D:\Test\Config\fun.config D:\Test\en-US\my.resources.dll The output should be: File Target = Blah.exe File Target = Config\fun.config File Target = en-US\my.resources.dll Here is my best attempt... hopefully this makes my question clearer: <ItemGroup> <Files Include="d:\test\**\*" > <TargetPath>%(RecursiveDir)%

Assembly in GAC is not copied to output in project that references a project that references the GAC assembly with CopyLocal=true

不想你离开。 提交于 2019-12-18 19:10:25
问题 I have a "Project A" that references System.Web.Mvc with CopyLocal=TRue. System.Web.Mvc is in the GAC both on my local maching and on the buildserver. I also have a "Project B" that references "Project A" in the output for "Project B" System.Web.Mvc is not copied to during the build. I suspect that this is because it is in the GAC. Is this true? And can I do something to make MSBuild copy it to the output folder? I read the answer from Muse VsExtensions in this thread, which talks about only