List of MSBuild built-in variables

Comprehensive lists from Microsoft Docs (New Docs): Common macros for MSBuild commands and properties MSBuild reference for .NET SDK projects Comprehensive lists from MSDN (Legacy Docs): MSBuild reserved properties Common MSBuild properties Macros for Build Commands and Properties Other useful lists: Well-known item metadata MSBuild special characters First link shows the MSBuild property for project … Read more

How do I specify the platform for MSBuild?

In MSBuild or Teamcity use command line MSBuild yourproject.sln /property:Configuration=Release /property:Platform=x64 or use shorter form: MSBuild yourproject.sln /p:Configuration=Release /p:Platform=x64 However you need to set up platform in your project anyway, see the answer by Julien Hoarau.

How do I run msbuild from the command line using Windows SDK 7.1?

To enable msbuild in Command Prompt, you simply have to add the directory of the msbuild.exe install on your machine to the PATH environment variable. You can access the environment variables by: Right clicking on Computer Click Properties Then click Advanced system settings on the left navigation bar On the next dialog box click Environment … Read more

The CodeDom provider type “Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider” could not be located

If your project has Roslyn references and you are deploying it on an IIS server, you might get unwanted errors on the website as many hosting providers still have not upgraded their servers and hence do not support Roslyn. To resolve this issue, you will need to remove the Roslyn compiler from the project template. … Read more

Path to MSBuild

Poking around the registry, it looks like HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\2.0 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\3.5 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0 may be what you’re after; fire up regedit.exe and have a look. Query via command line (per Nikolay Botev) reg.exe query “HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0” /v MSBuildToolsPath Query via PowerShell (per MovGP0) dir HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\

How do you get the current project directory from C# code when creating a custom MSBuild task?

using System; using System.IO; // This will get the current WORKING directory (i.e. \bin\Debug) string workingDirectory = Environment.CurrentDirectory; // or: Directory.GetCurrentDirectory() gives the same result // This will get the current PROJECT bin directory (ie ../bin/) string projectDirectory = Directory.GetParent(workingDirectory).Parent.FullName; // This will get the current PROJECT directory string projectDirectory = Directory.GetParent(workingDirectory).Parent.Parent.FullName;

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