How can I install the VS2017 version of msbuild on a build server without installing the IDE?

The Visual Studio Build tools are a different download than the IDE. They appear to be a pretty small subset, and they’re called Build Tools for Visual Studio 2019 (download). You can use the GUI to do the installation, or you can script the installation of msbuild: vs_buildtools.exe –add Microsoft.VisualStudio.Workload.MSBuildTools –quiet Microsoft.VisualStudio.Workload.MSBuildTools is a “wrapper” … Read more

How to Publish Web with msbuild?

I got it mostly working without a custom msbuild script. Here are the relevant TeamCity build configuration settings: Artifact paths: %system.teamcity.build.workingDir%\MyProject\obj\Debug\Package\PackageTmp Type of runner: MSBuild (Runner for MSBuild files) Build file path: MyProject\MyProject.csproj Working directory: same as checkout directory MSBuild version: Microsoft .NET Framework 4.0 MSBuild ToolsVersion: 4.0 Run platform: x86 Targets: Package Command line … Read more

MSBuild doesn’t copy references (DLL files) if using project dependencies in solution

I just deal with it like this. Go to the properties of your reference and do this: Set “Copy local = false” Save Set “Copy local = true” Save and that’s it. Visual Studio 2010 doesn’t initially put: <private>True</private> in the reference tag and setting “copy local” to false causes it to create the tag. … Read more

This project references NuGet package(s) that are missing on this computer

In my case, I had to remove the following from the .csproj file: <Import Project=”$(SolutionDir)\.nuget\NuGet.targets” Condition=”Exists(‘$(SolutionDir)\.nuget\NuGet.targets’)” /> <Target Name=”EnsureNuGetPackageBuildImports” BeforeTargets=”PrepareForBuild”> <PropertyGroup> <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> </PropertyGroup> <Error Condition=”!Exists(‘$(SolutionDir)\.nuget\NuGet.targets’)” Text=”$([System.String]::Format(‘$(ErrorText)’, ‘$(SolutionDir)\.nuget\NuGet.targets’))” /> … Read more

Found conflicts between different versions of the same dependent assembly that could not be resolved

eta: There’s a killer article on this stuff by SO’s own @Nick Craver that you should read While the other responses say this, they don’t make it explicit, so I will…. On VS2013.2, to actually trigger the emission of the cited information, you need to not read the message, which says: C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning … Read more

Resolving MSB3247 – Found conflicts between different versions of the same dependent assembly

Change the “MSBuild project build output verbosity” to “Detailed” or above. To do this, follow these steps: Bring up the Options dialog (Tools -> Options…). In the left-hand tree, select the Projects and Solutions node, and then select Build and Run. Note: if this node doesn’t show up, make sure that the checkbox at the … Read more

Microsoft.WebApplication.targets was not found, on the build server. What’s your solution?

To answer the title of the question (but not the question about the output you’re getting): Copying the following folder from your dev machine to your build server fixes this if it’s just web applications C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications Remove x86 according to how your build breaks. If you have other project types you will probably … Read more

Compile Views in ASP.NET MVC

From the readme word doc for RC1 (not indexed by google) ASP.NET Compiler Post-Build Step Currently, errors within a view file are not detected until run time. To let you detect these errors at compile time, ASP.NET MVC projects now include an MvcBuildViews property, which is disabled by default. To enable this property, open the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)