msbuild

Unable to update a value in msbuild proj file using powershell

牧云@^-^@ 提交于 2019-12-25 10:54:14
问题 I am trying to read a .csproj file using powershell by converting it into xml file to increment WPF app version value. I am able to read the value without any issue and incremented the version value but when I try to save the file with new value, the value doesn't get saved. The code I pasted in this question is to update the QA details. I am trying to read the below file. How do i update and save file <Choose> <When Condition=" '$(BuildEnvironment)' == 'QA' "> <PropertyGroup>

How to make MSBuild correctly track files generated with an external tool across referenced projects?

a 夏天 提交于 2019-12-25 10:48:26
问题 I have MSBuild code that takes files with a particular Build Action ( CompileFoo in this example) and generates output files (with a different extension). This is the code I have so far: <Target Name="BuildFoo" BeforeTargets="Compile" Inputs="@(CompileFoo)" Outputs="@(CompileFoo -> '$(OutputPath)%(RelativeDir)%(Filename).bin' )" > <!-- makefoo doesn't know how to create directories: --> <MakeDir Directories="$(OutputPath)%(CompileFoo.RelativeDir)"/> <Exec Command="makefoo -o "$(OutputPath)%

How to make MSBuild correctly track files generated with an external tool across referenced projects?

佐手、 提交于 2019-12-25 10:48:06
问题 I have MSBuild code that takes files with a particular Build Action ( CompileFoo in this example) and generates output files (with a different extension). This is the code I have so far: <Target Name="BuildFoo" BeforeTargets="Compile" Inputs="@(CompileFoo)" Outputs="@(CompileFoo -> '$(OutputPath)%(RelativeDir)%(Filename).bin' )" > <!-- makefoo doesn't know how to create directories: --> <MakeDir Directories="$(OutputPath)%(CompileFoo.RelativeDir)"/> <Exec Command="makefoo -o "$(OutputPath)%

Include Unmanaged DLL from Nuget package to web Deploy package

空扰寡人 提交于 2019-12-25 09:41:38
问题 I have Nuget package which contains unmanaged DLL and target to copy this DLL to output folder: <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Target Name="AfterBuild" DependsOnTargets="CopyFilesToOutputDirectory"> <ItemGroup> <MyPackageSourceFile Include="$(SolutionDir)\packages\somepackage\unmanaged\*.dll" /> </ItemGroup> <Copy SourceFiles="@(MyPackageSourceFile)" DestinationFolder="$(OutputPath)" /> </Target>

How can I extract Git commit hash from VS/msbuild?

混江龙づ霸主 提交于 2019-12-25 09:39:56
问题 The scenario is: Developers are running a PowerShell script from their machines to publish various Nuget packages to OctopusDeploy via MSBuild. We'd like to make the current git commit's hash (the base of the Git repo is the same as the .sln directory) part of the generated version number. To do this we presumably need to extract the current commit's hash and plug it into the version number string we then pass into MSBuild as a parameter. So the question is, how can we get this from MSBuild

How can I extract Git commit hash from VS/msbuild?

偶尔善良 提交于 2019-12-25 09:39:08
问题 The scenario is: Developers are running a PowerShell script from their machines to publish various Nuget packages to OctopusDeploy via MSBuild. We'd like to make the current git commit's hash (the base of the Git repo is the same as the .sln directory) part of the generated version number. To do this we presumably need to extract the current commit's hash and plug it into the version number string we then pass into MSBuild as a parameter. So the question is, how can we get this from MSBuild

Microsoft Ajax Minifier - TFS 2010 Workflow - AjaxMin in the TFS Build

半城伤御伤魂 提交于 2019-12-25 09:25:02
问题 The AjaxMin project at http://ajaxmin.codeplex.com/ is great and very useful. What I have previously used is the code option of AjaxMin where I would manually scan a directory for all JS and CSS files, and minify the contents, then rewrite the original file with the minified content. This code would be run in a custom "BuildConfigurator" that was created just for the purpose of running on builds to get them ready for deployment. We have since made the decision to get rid of BuildConfigurator

Cannot add ARM Platform to existing MSBuild Project

▼魔方 西西 提交于 2019-12-25 09:14:27
问题 I'm trying to add ARM platform support to an existing Visual C++ project. I want to ensure the project can build Windows Phone and Windows Store apps in addition to X86 and X64 programs. Microsoft does not appear to provide official documentation on the subject matter (or I can't seem to find it). In the absence of official documentation, I'm following the discussion provided on Microsoft Blogs at A guide to .vcxproj and .props file structure. I think the blog is quite good, and I don't think

C++ executable keep looking for ordinal entry point

烈酒焚心 提交于 2019-12-25 08:38:51
问题 I have a C++ application with the below source code: #include <cstdint> #include <iostream> #include <vector> #include <bsoncxx/json.hpp> #include <mongocxx/client.hpp> #include <mongocxx/stdx.hpp> #include <mongocxx/uri.hpp> #include <mongocxx/client.hpp> #include <mongocxx/instance.hpp> using bsoncxx::builder::stream::close_array; using bsoncxx::builder::stream::close_document; using bsoncxx::builder::stream::document; using bsoncxx::builder::stream::finalize; using bsoncxx::builder::stream

MSBuild Targets - How to detect changes to .csproj content files

那年仲夏 提交于 2019-12-25 08:32:47
问题 What I'm trying to accomplish is detecting changes to projects during build so I can set a flag indicating that the project was changed. I've already figured out how to detect when a C# component has changed by utilizing incremental builds and CoreCompileDependsOn. But this doesn't seem to trigger when a content file of a project has changed. From what I understand, there would be a Copy task somewhere specifying SkipUnchangedFiles="true" depending on the setting of the content file within