Udostępnij za pośrednictwem


ProjectFileConverter Class

Definition

Converts a Visual Studio project file to the Visual Studio 2010 project file format.

public ref class ProjectFileConverter sealed
public sealed class ProjectFileConverter
type ProjectFileConverter = class
Public NotInheritable Class ProjectFileConverter
Inheritance
ProjectFileConverter

Remarks

Warning

This class (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.Construction Microsoft.Build.Evaluation Microsoft.Build.Execution

Constructors

ProjectFileConverter()

Initializes a new instance of the ProjectFileConverter class.

Properties

ConversionSkippedBecauseProjectAlreadyConverted

Gets a value indicating whether the last attempted conversion was skipped because the project file is already in the latest format.

ConversionWarnings

Gets a list of warnings generated during the conversion.

IsMinorUpgrade

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

Is the conversion a minor upgrade operation? Minor upgrade also means the converted project file can be opened in old VS as well, so we won't update the tools version.

IsUserFile

Gets or sets a value indicating whether the project file being converted is a .user file.

NewProjectFile

Gets or sets the new project file name.

OldProjectFile

Gets or sets the old project file name.

SolutionFile

Gets or sets the name of the solution file that contains the project being converted.

Methods

Convert()

Converts the project specified by the OldProjectFile property and saves it in the file specified by the NewProjectFile property.

Convert(ProjectLoadSettings)
Obsolete.

Converts the project specified by the OldProjectFile property and saves it in the file specified by the NewProjectFile property.

Convert(String)
Obsolete.

This is the entry point method, which performs the project file format conversion. This method will overwrite "newProjectFile" if it already exists, so the caller of this method should confirm with the user if that's what they really want to do.

ConvertInMemory()

Creates a new project in memory from the OldProjectFile.

ConvertInMemory(Engine, ProjectLoadSettings)
Obsolete.

This is the entry point method, which performs the project file format conversion. This method will simply create a new MSBuild Project object in memory, instead of trying to write it to disk.

ConvertInMemory(Engine)
Obsolete.

Creates a new project in memory from the OldProjectFile.

FSharpSpecificConversions(Boolean)

Performs conversions specific to F# projects (VS2008 CTP -> VS2012) and (VS2010 -> VS2012).

This involves: changing the location of FSharp targets, and for 2008CTP, adding explicit mscorlib and FSharp.Core references.

Applies to