Skip to content

Commit

Permalink
Added deprecation messages (#10198)
Browse files Browse the repository at this point in the history
We are working on actually deprecating the projects under the deprecated folder. For now adding the deprecation message to public classes.
  • Loading branch information
maridematte authored Jun 4, 2024
1 parent 644d340 commit 4b522b0
Show file tree
Hide file tree
Showing 28 changed files with 3,728 additions and 2 deletions.
179 changes: 179 additions & 0 deletions src/Deprecated/Conversion/ProjectFileConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,23 @@ namespace Microsoft.Build.Conversion
*
**************************************************************************/
/// <summary>
/// This class (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// <xref:Microsoft.Build.Construction>
/// <xref:Microsoft.Build.Evaluation>
/// <xref:Microsoft.Build.Execution>
/// This class performs a project file format conversion from Visual Studio
/// .NET 2002 or 2003 to MSBuild format (for Whidbey).
/// </summary>
/// <remarks>
/// <format type="text/markdown"><![CDATA[
/// ## Remarks
/// > [!WARNING]
/// > This class (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// > <xref:Microsoft.Build.Construction>
/// > <xref:Microsoft.Build.Evaluation>
/// > <xref:Microsoft.Build.Execution>
/// ]]></format>
/// </remarks>
/// <owner>rgoel</owner>
public sealed class ProjectFileConverter
{
Expand Down Expand Up @@ -192,9 +206,24 @@ public sealed class ProjectFileConverter
private Dictionary<string, string> propertiesToEscape = null;

/// <summary>
/// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// <xref:Microsoft.Build.Construction>
/// <xref:Microsoft.Build.Evaluation>
/// <xref:Microsoft.Build.Execution>
///
/// Default constructor. We need a constructor that takes zero parameters,
/// because this class needs to be instantiated from COM.
/// </summary>
/// <remarks>
/// <format type="text/markdown"><![CDATA[
/// ## Remarks
/// > [!WARNING]
/// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// > <xref:Microsoft.Build.Construction>
/// > <xref:Microsoft.Build.Evaluation>
/// > <xref:Microsoft.Build.Execution>
/// ]]></format>
/// </remarks>
/// <owner>rgoel</owner>
public ProjectFileConverter
(
Expand All @@ -209,9 +238,24 @@ public ProjectFileConverter
}

/// <summary>
/// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// <xref:Microsoft.Build.Construction>
/// <xref:Microsoft.Build.Evaluation>
/// <xref:Microsoft.Build.Execution>
///
/// The read/write accessor for the old project filename. This must be
/// set by the consumer before calling Convert().
/// </summary>
/// <remarks>
/// <format type="text/markdown"><![CDATA[
/// ## Remarks
/// > [!WARNING]
/// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// > <xref:Microsoft.Build.Construction>
/// > <xref:Microsoft.Build.Evaluation>
/// > <xref:Microsoft.Build.Execution>
/// ]]></format>
/// </remarks>
/// <owner>rgoel</owner>
public string OldProjectFile
{
Expand All @@ -226,9 +270,24 @@ public string OldProjectFile
}

/// <summary>
/// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// <xref:Microsoft.Build.Construction>
/// <xref:Microsoft.Build.Evaluation>
/// <xref:Microsoft.Build.Execution>
///
/// The read/write accessor for the new project filename. This must be
/// set by the consumer before calling Convert().
/// </summary>
/// <remarks>
/// <format type="text/markdown"><![CDATA[
/// ## Remarks
/// > [!WARNING]
/// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// > <xref:Microsoft.Build.Construction>
/// > <xref:Microsoft.Build.Evaluation>
/// > <xref:Microsoft.Build.Execution>
/// ]]></format>
/// </remarks>
/// <owner>rgoel</owner>
public string NewProjectFile
{
Expand All @@ -243,12 +302,27 @@ public string NewProjectFile
}

/// <summary>
/// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// <xref:Microsoft.Build.Construction>
/// <xref:Microsoft.Build.Evaluation>
/// <xref:Microsoft.Build.Execution>
///
/// The read/write accessor for the boolean which tells the converter
/// whether the project file we're converting is a "main" project file
/// or a .USER file. Most of the conversion logic is identical for
/// both types of files, but for example, one difference is that the
/// "main" project file gets an &lt;Import&gt; tag inserted at the end.
/// </summary>
/// <remarks>
/// <format type="text/markdown"><![CDATA[
/// ## Remarks
/// > [!WARNING]
/// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// > <xref:Microsoft.Build.Construction>
/// > <xref:Microsoft.Build.Evaluation>
/// > <xref:Microsoft.Build.Execution>
/// ]]></format>
/// </remarks>
/// <owner>rgoel</owner>
public bool IsUserFile
{
Expand All @@ -263,10 +337,25 @@ public bool IsUserFile
}

/// <summary>
/// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// <xref:Microsoft.Build.Construction>
/// <xref:Microsoft.Build.Evaluation>
/// <xref:Microsoft.Build.Execution>
///
/// The read/write accessor for the solution file which contains this
/// project being converted. This is used to look up information about the
/// project-to-project references.
/// </summary>
/// <remarks>
/// <format type="text/markdown"><![CDATA[
/// ## Remarks
/// > [!WARNING]
/// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// > <xref:Microsoft.Build.Construction>
/// > <xref:Microsoft.Build.Evaluation>
/// > <xref:Microsoft.Build.Execution>
/// ]]></format>
/// </remarks>
/// <owner>rgoel</owner>
public string SolutionFile
{
Expand All @@ -281,9 +370,24 @@ public string SolutionFile
}

/// <summary>
/// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// <xref:Microsoft.Build.Construction>
/// <xref:Microsoft.Build.Evaluation>
/// <xref:Microsoft.Build.Execution>
///
/// Indicates if the last attempted conversion was skipped because the project is already in the latest format.
/// This will always return false;
/// </summary>
///<remarks>
/// <format type="text/markdown"><![CDATA[
/// ## Remarks
/// > [!WARNING]
/// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// > <xref:Microsoft.Build.Construction>
/// > <xref:Microsoft.Build.Evaluation>
/// > <xref:Microsoft.Build.Execution>
/// ]]></format>
/// </remarks>
/// <owner>SumedhK</owner>
/// <value>true, if conversion was skipped</value>
public bool ConversionSkippedBecauseProjectAlreadyConverted
Expand All @@ -295,8 +399,23 @@ public bool ConversionSkippedBecauseProjectAlreadyConverted
}

/// <summary>
/// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// <xref:Microsoft.Build.Construction>
/// <xref:Microsoft.Build.Evaluation>
/// <xref:Microsoft.Build.Execution>
///
/// This property returns the list of warnings that were generated during the conversion
/// </summary>
/// <remarks>
/// <format type="text/markdown"><![CDATA[
/// ## Remarks
/// > [!WARNING]
/// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// > <xref:Microsoft.Build.Construction>
/// > <xref:Microsoft.Build.Evaluation>
/// > <xref:Microsoft.Build.Execution>
/// ]]></format>
/// </remarks>
/// <owner>faisalmo</owner>
/// <value>true, if conversion was skipped</value>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Public interface that has shipped previously. ")]
Expand All @@ -309,9 +428,24 @@ public string[] ConversionWarnings
}

/// <summary>
/// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// <xref:Microsoft.Build.Construction>
/// <xref:Microsoft.Build.Evaluation>
/// <xref:Microsoft.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.
/// </summary>
/// <remarks>
/// <format type="text/markdown"><![CDATA[
/// ## Remarks
/// > [!WARNING]
/// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// > <xref:Microsoft.Build.Construction>
/// > <xref:Microsoft.Build.Evaluation>
/// > <xref:Microsoft.Build.Execution>
/// ]]></format>
/// </remarks>
public bool IsMinorUpgrade
{
get
Expand All @@ -326,11 +460,26 @@ public bool IsMinorUpgrade
}

/// <summary>
/// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// <xref:Microsoft.Build.Construction>
/// <xref:Microsoft.Build.Evaluation>
/// <xref:Microsoft.Build.Execution>
///
/// 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.
/// </summary>
/// <remarks>
/// <format type="text/markdown"><![CDATA[
/// ## Remarks
/// > [!WARNING]
/// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// > <xref:Microsoft.Build.Construction>
/// > <xref:Microsoft.Build.Evaluation>
/// > <xref:Microsoft.Build.Execution>
/// ]]></format>
/// </remarks>
/// <owner>rgoel</owner>
public void Convert()
{
Expand Down Expand Up @@ -914,12 +1063,27 @@ private bool FixTargetFrameworkSubset()
}

/// <summary>
/// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// <xref:Microsoft.Build.Construction>
/// <xref:Microsoft.Build.Evaluation>
/// <xref:Microsoft.Build.Execution>
///
/// 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.
/// </summary>
/// <param name="actuallyMakeChanges">if true, make the changes, otherwise, don't actually make any changes, but do report the return boolean as to whether you would make changes</param>
/// <returns>true if anything was (would be) changed, false otherwise</returns>
/// <remarks>
/// <format type="text/markdown"><![CDATA[
/// ## Remarks
/// > [!WARNING]
/// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// > <xref:Microsoft.Build.Construction>
/// > <xref:Microsoft.Build.Evaluation>
/// > <xref:Microsoft.Build.Execution>
/// ]]></format>
/// </remarks>
public bool FSharpSpecificConversions(bool actuallyMakeChanges)
{
// For FSharp projects, should import different location of FSharp targets
Expand Down Expand Up @@ -1350,10 +1514,25 @@ private bool VBSpecificConversions()
}

/// <summary>
/// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// <xref:Microsoft.Build.Construction>
/// <xref:Microsoft.Build.Evaluation>
/// <xref:Microsoft.Build.Execution>
///
/// 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.
/// </summary>
/// <remarks>
/// <format type="text/markdown"><![CDATA[
/// ## Remarks
/// > [!WARNING]
/// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
/// > <xref:Microsoft.Build.Construction>
/// > <xref:Microsoft.Build.Evaluation>
/// > <xref:Microsoft.Build.Execution>
/// ]]></format>
/// </remarks>
public ProjectRootElement ConvertInMemory()
{
ConvertInMemoryToMSBuildProject();
Expand Down
Loading

0 comments on commit 4b522b0

Please sign in to comment.