msbuild

Upgrade a visual studio solution on the command line with visual studio express

左心房为你撑大大i 提交于 2019-12-22 06:11:29
问题 Is there a way to upgrade a visual studio solution on the command line with visual studio express? When trying to build the old solution with msbuild I get a warning to upgrade with either "vcbuild /upgrade" or "devenv /upgrade". Both of them do not exist in VS Express 2012 and msbuild from that version does not include an /upgrade flag. I also found a solution proposing to use vcupgrade, which exists but can only upgrade individual projects. Also, the upgrade fails in my case, whereas it is

Upgrade a visual studio solution on the command line with visual studio express

旧时模样 提交于 2019-12-22 06:10:32
问题 Is there a way to upgrade a visual studio solution on the command line with visual studio express? When trying to build the old solution with msbuild I get a warning to upgrade with either "vcbuild /upgrade" or "devenv /upgrade". Both of them do not exist in VS Express 2012 and msbuild from that version does not include an /upgrade flag. I also found a solution proposing to use vcupgrade, which exists but can only upgrade individual projects. Also, the upgrade fails in my case, whereas it is

Resolve actual Reference path using Microsoft.Build.Evaluation

自古美人都是妖i 提交于 2019-12-22 05:59:31
问题 I'm doing some introspection and analysis of csproj files using the Microsoft.Build.Evaluation tools in a small C# console app. I want to locate the actual location of Reference items, using the same heuristics as MSBuild itself ie the locations described here. I'm heading towards auto conversion of build artifacts into packages, similar to what's outlined on the JetBrains blog here The only examples I can find expect the HintPath to be correct, for example this project, and I know there are

Build a solution with an ASP.NET Core project on a build server

北城余情 提交于 2019-12-22 05:56:09
问题 I have a .sln solution of multiple projects, all for the .NET Framework 4.6, nothing with .NET Core. Now I've added a new web project using ASP.NET Core, still targeting the .NET Framework 4.6. The PowerShell-based build script includes a NuGet package restore that is called like this: nuget.exe restore $solutionFile -NonInteractive This fails with the following message: MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'. C:\GitLabCI\builds

Build a solution with an ASP.NET Core project on a build server

ぃ、小莉子 提交于 2019-12-22 05:56:04
问题 I have a .sln solution of multiple projects, all for the .NET Framework 4.6, nothing with .NET Core. Now I've added a new web project using ASP.NET Core, still targeting the .NET Framework 4.6. The PowerShell-based build script includes a NuGet package restore that is called like this: nuget.exe restore $solutionFile -NonInteractive This fails with the following message: MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'. C:\GitLabCI\builds

MSDeploy fails to deploy manually zipped package

一曲冷凌霜 提交于 2019-12-22 05:53:18
问题 Earlier I was building and deploying web project using msbuild.exe Now I want to modify some files before deploying, so I make a .zip package using msbuild, then unzip it, modify some files and then zip it again and try to deploy using msdeploy. The problem is, that it deploys empty folder . When I try to deploy unmodified .zip package - it works fine. After long hours digging, I figured out, that msdeploy does not support packages, which were zipped using other than built in windows zip

Setting AssemblyFileVersion with MSBuild-call?

一曲冷凌霜 提交于 2019-12-22 05:26:11
问题 We have a batch-based buildprocess and we are using MSBuild only for compiling our project-files from visual studio. We also have integrated wix into our build-process. To set the version of our software we specify in the main-build-script some environment variables, that we use during the build-process. My problem is, that i have to set the FileVersion of the Assembly (AssemblyFileVersion) in my assembly-informations. Is there a way to give the MSBuild-call a property with the version to set

Simple Powershell Msbuild with parameter fails

时光毁灭记忆、已成空白 提交于 2019-12-22 05:24:14
问题 I am trying to pass a simple variable passing, No parameter msbuild MySolution.sln /p:Configuration=Debug /p:Platform="Any CPU" Try 1 $buildOptions = '/p:Configuration=Debug /p:Platform="Any CPU"' msbuild MySolution.sln + $buildOptions -> cause MSB1008 Try 2 $command = "msbuild MySolution.sln" + $buildOptions Invoke-expression $command -> cause MSB1009 I tried the solution on this post but I think it is a different error. 回答1: Try one of these: msbuild MySolution.sln $buildOptions Start

Web.config transform is running twice on publish

烈酒焚心 提交于 2019-12-22 05:22:06
问题 I have a solution that includes three web projects (as well as a lot of class library projects). The web projects all use Web.config transforms to specify per-environment configuration. I have Web.config transforms for multiple build profiles, named Web.UAT.config, Web.Staging.config and Web.Release.config I am building and deploying the project from my CI server using MSBuild with the following arguments: /t:Clean,Build /p:Configuration=UAT;DeployOnBuild=True;PublishProfile=UAT For exactly

How make MSBuild build custom target specified in csproj building sln?

Deadly 提交于 2019-12-22 05:15:12
问题 I am facing an issue with MSBuild I can't overcome it by myself. As a result I rely on community's wisdom. The real situation I'm having troubles with I have a soluiton file containing several projects with dependencies to other projects in same solution. I'd like to append a custom target to one of the project's csproj file and build it from the command line. It will allow me to make all the necessary output binaries for this project for further processing during the building of the custom