msbuild

Preventing Visual Studio from rewriting project references

孤人 提交于 2019-12-25 01:00:27
问题 I have a large solution in which the "root" project includes feature projects by glob: <ProjectReference Include="..\Feature\*\*.csproj" /> This works, despite not looking great in the references list, but the issue that occasionally Visual Studio will rewrite the csproj with all of the project references resolved: <ProjectReference Include="..\Feature\A\A.csproj" /> <ProjectReference Include="..\Feature\B\B.csproj" /> It's not clear what triggers this, but I'm guessing it might have

MSBUILD Task Items in subdirectories: Are incremental builds not possible on these?

被刻印的时光 ゝ 提交于 2019-12-24 23:02:37
问题 I have a simple Word to Pdf converter as an MSBuild Task. The task takes Word files (ITaskItems) as input and Pdf files (ITaskItems) as output. The script uses a Target transform for conversion: <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> <UsingTask AssemblyFile="$(MSBuildExtensionsPath)\MyTasks.dll" TaskName="MyTasks.DocToPdf" /> <Target Name="Build" DependsOnTargets="Convert" /> <Target Name="Convert" Inputs="@

What should I install, except Visual Studio itself, for Microsoft.Common.props to appear under c:\Program Files (x86)\MSBuild\14.0\?

我只是一个虾纸丫 提交于 2019-12-24 22:14:30
问题 My csproj files import Microsoft.Common.props, but this file does not exist on my build server. The build server does not have Visual Studio 2015 installed (and I like it this way), but we did install the 2015 build tool chain. The file is not there. What else is missing to install? Google seems to be helpless here. 回答1: What should I install, except Visual Studio itself, for Microsoft.Common.props to appear under c:\Program Files (x86)\MSBuild\14.0\? AFAIK, you have to install the Visual

How to get the SolutionPath in a PowerShell Post-built script for TFS2013?

喜夏-厌秋 提交于 2019-12-24 21:43:40
问题 In a TFS2013 build, in the Post-build path of the build definition, I call a PowerShell script which need to get the path of the Solution built just before. But the SolutionPath varibale is not provided in the Environment Variables and we can't pass this variable in the Post-Build Arguments in the Definition Build. Have you a tip for that without modify the build template ? Thank you. 回答1: The reason there isn't a SolutionPath variable in the tfbuild , in my opinion, is because there aren't

MSBuild: Evaluating reserved properties with ReadLinesFromFile

雨燕双飞 提交于 2019-12-24 19:19:56
问题 I'm using MSBuild to customize the build process of Visual Studio, WiX, SandCastle, ... projects. To keep it as generic as possible I'd like to use text files defining some 'project specific' settings, like where the files should be loaded from, which custom executables to run and so on. A text file could look like this: $(MSBuildProjectDirectory)....\Projects\Project1\bin\Release obj\$(Configuration)\Project1.Files.wxi -in *.dll -id TEST Each line represents one command or file. Inside my

Set output build path for Visual Studio 2017 per user with vars

a 夏天 提交于 2019-12-24 19:11:17
问题 I am trying to change the output path for build per user. I want to redirect output to Ram Disk. After many attempts i finished with something like that: <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <OutputPath>R:\VisualStudioBuilds\MyProjectName\bin\$(Configuration)\</OutputPath> </PropertyGroup> </Project> But the project name is hardcoded! To change this situation i have tried another

I am confused about the role of nuget.exe in the world where its functionality is integrated into msbuild

夙愿已清 提交于 2019-12-24 18:46:00
问题 Given: To consume NuGet packages we use PackageReference in msbuild. To produce NuGet packages we use the pack msbuild target. To push NuGet packages we can use the dotnet nuget push command. Plus nuget.exe does not seem to be installed by any of the standard build tooling. So, what is its role? Now, I suspect there are still simple chores we cannot do without it. For example, I noticed dotnet nuget push pushes nupkg into a flat file structure, so, if I want a hierarchical one I probably need

FTP only changed files in MSBuild

两盒软妹~` 提交于 2019-12-24 17:24:02
问题 An MSBuild project copies its output to a directory on a server. Each day, only a few files change and most have an older creation date. I can FTP this to a remote server with MSBuild tasks. But how can I do this FTP and only copy the few files that have changed? 回答1: To do this you'll need something that will manage the sync for you - that is that will keep track of what file is where and update accordingly. We have used FTPSync to do the file sync bit very tidly for a number of sites. From

Wix Heat Error on Jenkins CI

早过忘川 提交于 2019-12-24 16:17:20
问题 I am building a wix bundle that depends on a wix setup project and the wix setup depends on a C# project. When I build locally, everything works great but when I build the bundle on Jenkins, I get an error when I try to harvest some files. The heat operation is a pre-build event. heat.exe : error HEAT5053: The directory 'c:\.Hudson\jobs\Project-Branch\workspace\MyProject\bin\x86\Release\Help' did not contain any files or sub-directories and since empty directories are not being kept, there

Populate web.config with build variables

允我心安 提交于 2019-12-24 14:00:06
问题 Upon editing a build, I can set some 'variables'. Is it possible to have these variables be used to transform web.config? 回答1: Usually, web.config is transformed base on the build configuration and the value is stored in their transformation files. So if you create a variable for configuration such as $(BuildConfiguration), you can set the build configuration to this variable and set the value of this variable to control the build configuration and the web.config will be transformed base on