How do I make a build system for Sublime Text 2 to build msbuild?

I got it to work by modifying the build system file C:\Users\dave\AppData\Roaming\Sublime Text 2\Packages\User\msbuild.sublime-build like this: { “cmd”: [“c:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe”], “working_dir”: “${project_path:${folder:${file_path}}}” } I looked at an existing build configuration that shipped with Sublime to figure it out: C:\Users\myUser\AppData\Roaming\Sublime Text 2\Packages\Makefile\Make.sublime-build

Is there a way to list all the build targets available in a build file?

Using MSBuild 2.0/3.5 : Custom Task You could write a custom msbuild task like this : using System; using System.Collections.Generic; using Microsoft.Build.BuildEngine; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; namespace MSBuildTasks { public class GetAllTargets : Task { [Required] public String ProjectFile { get; set; } [Output] public ITaskItem[] Targets { get; set; } public override bool Execute() … Read more

When should we call a target using ‘DependsOnTargets’ and ?

MSBuild provides different ways to call target : MSBuild task CallTarget task DependsOnTarget target attribute BeforeTargets and AfterTargets target attributes in MSBuild 4 Using CallTarget is an explicit approach, you start at your first target and call explicitly each target in the order you want. Whereas DependsOnTargets is an implicit approach, MSBuild infers the calling … Read more

test if an MSBuild property is defined?

There exists common method for overriding properties. Sample from C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets <PropertyGroup> <TargetFrameworkIdentifier Condition=”‘$(TargetFrameworkIdentifier)’ == ””>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion Condition=” ‘$(TargetFrameworkVersion)’ == ” “>v4.0</TargetFrameworkVersion> </PropertyGroup> If you will try to get value from $(NeverDefinedProperty) you just get an empty string. Can you describe the problem you want to solve?

Configure MSBuild output path

Using MSBuild command line, you can specify the output path like below: C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe <path_to_project_file> /t:Build /p:OutDir=c:\custom_build_out\;Configuration=PRODUCTION;Platform=x64 Note: If you change the order of specifying the OutDir property for /p, this doesn’t work. The OutDir property is for specifying a full path to an alternate directory. OutputPath is for a relative directory. It has … Read more

Publish Web Deploy using VS Code

Assuming you are using the latest vscode now (1.7.x). You can use Visual Studio Code’s Task Runner. First, you would need to configure the task runner by pressing <F1> and enter task. Select Tasks: Configure Task Runner. A new file tasks.json would be created by vscode with following content. { // See https://go.microsoft.com/fwlink/?LinkId=733558 // for … Read more

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