msbuild-target

beforebuild target of all the projects are executing at first on solution build

冷暖自知 提交于 2020-01-25 06:43:09
问题 In our solution, I have two projects which contain a .tt file. My build order should be as follows > 1. project_A Template transform > 2. project_A Build > 3. Project_A resource DLL will be created in the post-build event. > 4. Project_B Template transform > 5. Project_B Build I am using the following target invocation in csproj file or both project, <Target Name="BeforeBuild"> <CallTarget Targets="Transform" ></CallTarget> </Target> In visual studio, each beforebuild target is called

Xmlpoke to add multiple appsettings key doesn't work

亡梦爱人 提交于 2020-01-16 19:12:13
问题 I have a Msbuild target that gets executed successfully by adding a single key called 'ProjectID' to the appsetting section of web.config. Now am changing the behavior of this target by adding one more key 'ApplicationId' to the same appsetting section. The log shows the xmlpoke is executed for both. But only the projectID value is correctly replaced with every run. (Excerpt from)PropertyGroup definition: <?xml version="1.0" encoding="utf-8" ?> <Project ToolsVersion="15.0" DefaultTargets=

Pass custom msbuild target from Solution to Project

你离开我真会死。 提交于 2020-01-02 02:41:12
问题 I have a Solution with a large number of associated .csproj files. Each .csproj file has a <Target Name="PublishQA">... . The build fails when I try to compile the whole solution: > msbuild mysolution.sln /t:PublishQA` "c:\myproj.sln" (publishqa target) (1) -> c:\myproj.sln.metaproj : error MSB4057: The target "PublishQA" does not exist in the project. [c:\myproj.sln] When I build the .csproj project directly, it builds just fine. How do I tell msbuild to pass the target to the project files?

error MSB4057: The target “v8” does not exist in the project

久未见 提交于 2019-12-24 15:13:42
问题 I'm trying to build V8 as part of ArangoDB using the official build scripts and following the official Windows build instructions. The compilation fails for all v8* targets ( v8-build.bat ): msbuild All.sln /t:v8 /p:Configuration=Release /p:Platform=x64 msbuild All.sln /t:v8_libbase /p:Configuration=Release /p:Platform=x64 msbuild All.sln /t:v8_libplatform /p:Configuration=Release /p:Platform=x64 error MSB4057: The target "v8" does not exist in the project. If I open the solution file in

How can I prevent bad project references?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-22 09:19:11
问题 We are using C# projects with TFS as source control and for the CI builds. I keep finding that other developers are referencing assemblies from /Bin directories incorrectly when they should be using our /Libs folder (where we keep 3rd party assemblies) What can I do as part of the solution build or CI build (we do also use powershell) to check and fail the build if anyone does this? 回答1: Add a custom activity to your build process template. The activity's pseudo code should look like: Execute

SQL Database Project: build different scripts depending on build configuration

我怕爱的太早我们不能终老 提交于 2019-12-18 16:58:39
问题 The problem I want to solve is to build different scripts depending on build configuration. Say we have two instances of SQL Server: Enterprise version with connected Linked servers LocalDb version for offline developing and unit tests Enterprise version has views for Linked servers when LocalDB substitues those views with local tables. Those Linked Server views and local tables have the same names and set of fields. So they are not included in build by default (Build Action = None). Instead

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

Transforming multiple config files for multiple projects via MsBuildProj file

帅比萌擦擦* 提交于 2019-12-06 10:27:49
问题 I am trying to run multiple commands on a list of files based on a pattern (all files of form *.config under sub directories of a given directory), like so: <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="BuildSolution" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.Tasks.dll" /> <PropertyGroup> <Configuration Condition=" '$

How can I prevent bad project references?

主宰稳场 提交于 2019-12-06 03:37:52
We are using C# projects with TFS as source control and for the CI builds. I keep finding that other developers are referencing assemblies from /Bin directories incorrectly when they should be using our /Libs folder (where we keep 3rd party assemblies) What can I do as part of the solution build or CI build (we do also use powershell) to check and fail the build if anyone does this? Add a custom activity to your build process template. The activity's pseudo code should look like: Execute before the compilation phase. Loop all new changesets containing file extensions ending with *proj. For all

Pass custom msbuild target from Solution to Project

為{幸葍}努か 提交于 2019-12-05 04:16:25
I have a Solution with a large number of associated .csproj files. Each .csproj file has a <Target Name="PublishQA">... . The build fails when I try to compile the whole solution: > msbuild mysolution.sln /t:PublishQA` "c:\myproj.sln" (publishqa target) (1) -> c:\myproj.sln.metaproj : error MSB4057: The target "PublishQA" does not exist in the project. [c:\myproj.sln] When I build the .csproj project directly, it builds just fine. How do I tell msbuild to pass the target to the project files??? As a case you can create seperate targets file which explicitly builds your solution, <!-- mytargets