How to get MSBuild 15 without a full install of Visual Studio? - sdk

"MSBuild is now installed in a folder under each version of Visual Studio." However, I do not want to install a full VS on the server. "MSBuild is now available as part of the .NET Core SDK."
Now that I've installed the .Net Core 2.1 SDK (and the 4.7.2 Framework), what is the path to msbuild.exe?

MSBuild.exe 15 was found after installing the VS Build Tools with no additional packages selected in the install interface.
Edit: Updated link above to go to older downloads. Expand 2017 panel, click Download, login with a Microsoft account, then you will see Build Tools for Visual Studio 2017 (version 15.9) in the list of available downloads.
Edit: increased minor version to 9 to reflect the latest of major version 15.
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe

Related

Why are all my templates in visual studio gone?

I recently installed Visual Studio for Mac 2022. I had VS Mac 2019, and it had the .net templates. When I installed VS 2022, all my previous .net templates were gone, even though I selected to install .net templates. When I open VS 2019, it has all of the templates installed, even the ones that I installed with only VS 2022. Is there any way to fix this, or should I just use VS 2019? 2022 vs 2019
Could you please try to set your .NET SDK path?
You can locate it under Preferences->SDK Locations->.NET Core and set the path as /usr/local/share/dotnet/dotnet.
Hope this can help solve the problem.
Ref: https://developercommunity.visualstudio.com/t/Starter-templates-missing/10070338?space=41&q=missing+templates
The Other - .NET project templates in Visual Studio for Mac 2019 require the Mono framework.
In Visual Studio for Mac 2022 the project templates that require Mono have been removed.
Instead you can install the .NET SDK use the project templates that target .NET 6.0, .NET Core 3.1, and these are available from the Web and Console section, if the associated SDKs are installed.
To install the .NET SDK you can either download them directly from the download page or re-run the installer and ensure that .NET is selected.

Where in the Visual Studio installer do I find the BuildTools component?

In which Workload of the Visual Studio 2017 Community 15.9 installation would I find the VS2017 BuildTools component?
I am looking at the workloads in the installer options and there seems not to be any workload that has such a thing.
I even searched in the component in the Individual Components tab also but couldn't find anything matching the exact string.
The reason I am looking for it is that when I try to build the source code for ASP.NET MVC v5.2.6, I get the error message as follows.
> build
Could not find MSBuild.exe. Please install the VS2017
BuildTools component or a workload that includes it.
*** BUILD FAILED **
I had written to the ASP.NET MVC team earlier about this message before I had installed Visual Studio 2017. I had had just Visual Studio 2019 then and they asked that I install Visual Studio 2017.
I already have MS Build at various locations. I had multiple versions of MSBuild even before having installed VS 2017.
Build Tools for Visual Studio 2017 is still available as an online installer. You can get the current version here: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15.

Setup .NET Core App in TFS (Visual Studio Team Services)

When I build my .NET CoreApp in Visual Studio Team Services (was Visual Studio Online), the build breaks with this message:
"GETSDKTOOLINGINFO(0,0): Error : The project is configured to use .NET
Core SDK version 1.0.0-preview2-003131 which is not installed or
cannot be found under the path C:\Program Files\dotnet. These
components are required to build and run this project. Download the
version of .NET Core SDK specified in global.json or update the SDK
version in global.json to the version that is installed."
Any idea how to fix this? Since it's VS Team Services and everything is supposed to be preinstalled.
I suppose you're using the Hosted Pool?
In that case you'll need to wait for Microsoft to update the image of the hosted agent. Microsoft keeps a list of what's installed. As of this moment the following .NET Core SDK is installed:
.NET Core 1.0 with Preview 2 Tooling
You may be able to perform a silent install by downloading the SDK in a build step and installing it as part of every build.

Visual studio 2013 Build error on TFS

I use framework 4.5 and vs 2013 and TFS 2013. When I build project get error like that;
"C:\Program Files
(x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets
(3079): Task could not find "AL.exe" using the SdkToolsPath "" or the
registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft
SDKs\Windows\v8.1A\WinSDK-NetFx40Tools-x86". Make sure the
SdkToolsPath is set and the tool exists in the correct processor
specific location under the SdkToolsPath and that the Microsoft
Windows SDK is installed"
I tried everything but I could't fix error. Can you help me about it ?
Download and install the Windows Software Development Kit (SDK) for Windows 8.1. In the setup program, make sure .NET Framework 4.5.1 Software Development Kit is selected.
This will install al.exe to C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools.

Web.config fail to transform on TFS 2012

I currently work on a MVC 4.0 project that was upgraded to MVC 5.0 using the official guide.
I use Visual Studio 2012 locally and a publish profile was created for the project.
Locally I call msbuild via the Visual Studio developer command prompt using: msbuild /m /p:Configuration=Dev;DeployOnBuild=true;PublishProfile=Dev my-solution.sln
All projects in the solutions do have a Dev configuration and there is a web.dev.config.
The command line on the server is the same.
So far the difference is that on the server only the visual studio shell is installed (not the full) and we cannot install the full instance of VS2012 on the server.
Also, seeing on the install of TFS on the server, I discovered that only v9.0 target files were installed (Visual Studio 2008). Copying Visual Studio 2012 target files do not fix this problem.
I see 2 solutions so far but searching for a third.
Install full Visual Studio 2012 instance
Update csproj to include a target transformConfigFiles (basically copy and paste the content of the "Microsoft.Web.Publishing.targets" section) or import the file via a declaration inside of the .csproj
Would there be a third solution available?
It is pretty common to install full Visual Studio on your build server. As of VS 2012 you couldn't even run Unit Tests in your build without VS installed.
I'd suggest installing VS and seeing if that fixes the issue.

Resources