Questions tagged [microsoft.build]

MSBuild is a Microsoft build platform typically used in conjunction with Visual Studio. MSBuild version 2.0 is part of .NET Framework 2.0 and works together with Visual Studio 2005. Version 3.5 of MSBuild, which is bundled together with .NET 3.5 (and Visual Studio 2008), allows .NET projects to be built for either 2.0, 3.0 or 3.5 .NET version support (also known as"multi-targeting").

MSBuild is a Microsoft build platform typically used in conjunction with Visual Studio. MSBuild version 2.0 is part of .NET Framework 2.0 and works together with Visual Studio 2005. Version 3.5 of MSBuild, which is bundled together with .NET 3.5 (and Visual Studio 2008), allows .NET projects to be built for either 2.0, 3.0 or 3.5 .NET version support (also known as"multi-targeting").

It is possible to build Visual Studio projects and solutions without the Visual Studio IDE installed. MSBuild is available at no cost.

MSBuild acts on MSBuild project files which have a similar XML syntax to Apache Ant or NAnt. Even though the syntax is based upon well-defined XML schema, the fundamental structure and operation is comparable to the traditional Unix make utility: the user specifies what will be used (typically source code files) and what the result should be (typically an application), but the utility itself decides what to do and the order in which to do it.

42 questions
0
votes
1 answer

How to programatically analyse solution configuration mappings

We are trying to use the Microsoft.Build NuGet package to be able to programatically analyse the configuration mapping in solution files. As an example to be able to detect when a project is being built using Debug when the solution is being built…
MobileDev
  • 189
  • 7
0
votes
0 answers

Unable to find type [Microsoft.Build.Construction.SolutionFile]

I've suddenly got a problem with a script that has been running without problems previously $sln = 'D:\[...]\[...].sln' Add-Type -Path (${env:ProgramFiles(x86)} + '\Reference…
JHBonarius
  • 10,824
  • 3
  • 22
  • 41
0
votes
1 answer

Microsoft.Build could not load EvaluationContext

While building my code through command line I get the error: System.TypeLoadException: Could not load type 'Microsoft.Build.Evaluation.Context.EvaluationContext' from assembly 'Microsoft.Build, Version=15.1.0.0,…
0
votes
1 answer

Microsoft.Build.Tasks.v3.5 fails at copying dlls from dll.refresh references

I'm constantly getting an error on the TFS2010 build server, due to an inexistent DLL file. It update this file through dll.refresh from another folder, both folders are mapped in the workspace. I opened the log, and found this: Task…
Conrad Clark
  • 4,533
  • 5
  • 45
  • 70
0
votes
1 answer

Visual Studio won't accept UWP version for Nugget package?

This is driving me nuts! I'm trying to install Microsoft.Build. Using Nugget Manager I can successfully install Microsoft.Build.Framework but not Microsoft.Build. I've upgraded to the latest version 1903 (build 18362), but still get the…
0
votes
3 answers

Building Project Programmatically Fails Using Microsoft.Build

I installed the three following packages into my console application: Microsoft.Build Microsoft.Build.Framework Microsoft.Build.Tasks.Core Microsoft.Build.Utilities.Core And I tried to use the following method to build a project: static…
Mo Sadeghipour
  • 489
  • 8
  • 25
0
votes
1 answer

How to use an api function that wants a value key pair in powershell

I am trying to make an install script with powershell using the microsoft build api. I know how I can do what I want in C#, I have tested a little example, and almost got it ready in powershell. I only need to know what to fill in as key value…
Marc W
  • 89
  • 1
  • 8
0
votes
0 answers

Publish ClickOnce Application using Microsoft.Build Namespaces

I have a project that is saved to a file location that I want to be able to publish. The project has all the publish properties set and I would like these properties to be used (URLs etc..) I currently have the following code that creates a Build: …
CJH
  • 1,266
  • 2
  • 27
  • 61
0
votes
0 answers

Getting all the configurations and platforms from a solution(in C# code)

I'm developing some compiling tool. I'm using Microsoft.Build libraries for compile solution by selected configuration: string projectFileName = @"D:\MySolution.sln"; ProjectCollection pc = new ProjectCollection(); Dictionary
0
votes
1 answer

Find out the reason why a BuiltIn function in c# is returning false

How can i find out the reason why a BuiltIn function in c# is returning false. For example. I have implemented Execute method in Microsoft.Build.Framework.ITask in one of my child class.This Execute function will return "True" if task i gave to…
mystack
  • 4,910
  • 10
  • 44
  • 75
0
votes
1 answer

Visual Studio unable to read the project file (anymore)

Ever since my latest windows update, (which system restore is failing to undo) I can't load any projects with visual studio 2010. The project are greyed out (unavailable) and when I try to reload them I get the…
0
votes
1 answer

Import added does not appear in the Imports collection (Msbuild Project)

This code does not write anything to the console cause the collection is empty. Project p = new Project(engine); p.AddNewImport(@"C:\mytarget.targets",""); foreach(Import imp in p.Imports) Console.WriteLine(p.ProjectPath); But!, if I debug the…
sebagomez
  • 9,501
  • 7
  • 51
  • 89
1 2
3