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

How do I configure MSBuild to use a saved publishProfile for WebDeploy?

I’m sorry to tell you that the publish.xml file which VS2010 uses was not designed to be used in this way. In fact it was not even designed to be checked-in/shared with others. The logic for reading/writing those files are strictly contained inside Visual Studio and not available through MSBuild. So there is no straight … Read more

In Team foundation server what is build agent and controller?

In TFS, the build system consists of two main constructs: the Build controller and the Build agents. The Controller’s job is to queue build requests and send them to the “most available” build agent. The Agent’s job is to perform the actual build. This setup allows you to easy grow into a “Build Farm”, which … Read more

Team Build: Publish locally using MSDeploy

Unfortunately sharing of the Publish Profile is not supported or implemented in MSBuild. The logic to publish from the profile is contained in VS itself. Fortunately the profile doesn’t contain much information so there are ways to achieve what you are looking for. Our targets do not specifically support the exact same steps as followed … Read more

msbuild, how to set environment variables?

The coded task can be put right at the project file since MSBuild v4.0. Like this: <UsingTask TaskName=”SetEnvironmentVariableTask” TaskFactory=”CodeTaskFactory” AssemblyFile=”$(MSBuildToolsPath)\Microsoft.Build.Tasks.v$(MSBuildToolsVersion).dll”> <ParameterGroup> <Name ParameterType=”System.String” Required=”true” /> <Value ParameterType=”System.String” Required=”true” /> </ParameterGroup> <Task> <Using Namespace=”System” /> <Code Type=”Fragment” Language=”cs”> <![CDATA[ Environment.SetEnvironmentVariable(Name, Value); ]]> </Code> </Task> </UsingTask> Note that in MSBuild 14+, the AssemblyFile reference should be just: … Read more

How do I build a solution programmatically in C#?

See .NET 4.0 MSBuild API introduction for an example using the .NET 4.0 MSBuild API: List<ILogger> loggers = new List<ILogger>(); loggers.Add(new ConsoleLogger()); var projectCollection = new ProjectCollection(); projectCollection.RegisterLoggers(loggers); var project = projectCollection.LoadProject(buildFileUri); // Needs a reference to System.Xml try { project.Build(); } finally { projectCollection.UnregisterAllLoggers(); } A simpler example: var project = new Project(buildFileUri, null, … Read more

Where can I find the meaning of NUnit console exit codes?

Error code -100 stands for UNEXPECTED_ERROR static ConsoleUi() { OK = 0; INVALID_ARG = -1; FILE_NOT_FOUND = -2; FIXTURE_NOT_FOUND = -3; TRANSFORM_ERROR = -4; UNEXPECTED_ERROR = -100; } EDIT: Additional information from a thread on the NUnit-Discuss google group: Additionally, positive values give a count of failed tests in the run. The -100 return code … Read more

How to suppress all warnings using MSBuild

msbuild /clp:ErrorsOnly /consoleloggerparameters: Parameters to console logger. (Short form: /clp) The available parameters are: PerformanceSummary–Show time spent in tasks, targets and projects. Summary–Show error and warning summary at the end. NoSummary–Don’t show error and warning summary at the end. **ErrorsOnly–Show only errors.** WarningsOnly–Show only warnings. NoItemAndPropertyList–Don’t show list of items and properties at the start … Read more

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