共用方式為


ProjectFileConverter Class

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

MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Inheritance Hierarchy

System.Object
  Microsoft.Build.Conversion.ProjectFileConverter

Namespace:  Microsoft.Build.Conversion
Assembly:  Microsoft.Build.Conversion.Core (in Microsoft.Build.Conversion.Core.dll)

Syntax

'Declaration
Public NotInheritable Class ProjectFileConverter
public sealed class ProjectFileConverter
public ref class ProjectFileConverter sealed
[<Sealed>]
type ProjectFileConverter =  class end
public final class ProjectFileConverter

The ProjectFileConverter type exposes the following members.

Constructors

  Name Description
Public method ProjectFileConverter Initializes a new instance of the ProjectFileConverter class.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Top

Properties

  Name Description
Public property ConversionSkippedBecauseProjectAlreadyConverted Gets a value indicating whether the last attempted conversion was skipped because the project file is already in the latest format.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property ConversionWarnings Gets a list of warnings generated during the conversion.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property IsMinorUpgrade Determines whether the conversion is a minor upgrade operation. With a minor upgrade, the converted project file can be opened in the older version of Visual Studio as well, so the tools version isn’t updated.
Public property IsUserFile Gets or sets a value indicating whether the project file being converted is a .user file.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property NewProjectFile Gets or sets the new project file name.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property OldProjectFile Gets or sets the old project file name.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property SolutionFile Gets or sets the name of the solution file that contains the project being converted.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Top

Methods

  Name Description
Public method Convert() Converts the project specified by the OldProjectFile property and saves it in the file specified by the NewProjectFile property.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public method 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 that that's what he really wants to do.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public method Convert(ProjectLoadSettings) Obsolete. Converts the project specified by the OldProjectFile property and saves it in the file specified by the NewProjectFile property.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public method ConvertInMemory() Creates a new project in memory from the OldProjectFile.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public method ConvertInMemory(Engine) Obsolete. Creates a new project in memory from the OldProjectFile.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public method 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.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public method Equals (Inherited from Object.)
Public method FSharpSpecificConversions 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.MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method ToString (Inherited from Object.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Build.Conversion Namespace