From 0df4e16a6cd580b8f57e4efb080156d4eb33dc94 Mon Sep 17 00:00:00 2001 From: Drew Noakes Date: Wed, 6 Mar 2024 12:15:01 +1100 Subject: [PATCH 1/2] Fix warning in .NET 8 code around serialization Fixes the following warning in .NET 8 builds (currently only via the integration test project): > tests\Common\ThrowingTraceListener.cs(50,101,50,122): warning SYSLIB0051: 'Exception.Exception(SerializationInfo, StreamingContext)' is obsolete: 'This API supports obsolete formatter-based serialization. It should not be called or extended by application code.' (https://aka.ms/dotnet-warnings/SYSLIB0051) --- tests/Common/ThrowingTraceListener.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/Common/ThrowingTraceListener.cs b/tests/Common/ThrowingTraceListener.cs index c2989ec4b11..316959811fb 100644 --- a/tests/Common/ThrowingTraceListener.cs +++ b/tests/Common/ThrowingTraceListener.cs @@ -32,7 +32,9 @@ public override void WriteLine(string message) { } +#if !NET8_0_OR_GREATER [Serializable] +#endif public class DebugAssertFailureException : Exception { public DebugAssertFailureException() @@ -47,9 +49,11 @@ public DebugAssertFailureException(string message, Exception inner) : base(messa { } +#if !NET8_0_OR_GREATER protected DebugAssertFailureException(SerializationInfo info, StreamingContext context) : base(info, context) { } +#endif } } } From e5669127c999a3a9749c9ea8ea5757b8c5a5f9e5 Mon Sep 17 00:00:00 2001 From: Drew Noakes Date: Wed, 6 Mar 2024 12:18:16 +1100 Subject: [PATCH 2/2] Add missing parameter doc --- .../MSBuildDependencies/MSBuildDependencyFactoryBase.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Tree/Dependencies/Subscriptions/MSBuildDependencies/MSBuildDependencyFactoryBase.cs b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Tree/Dependencies/Subscriptions/MSBuildDependencies/MSBuildDependencyFactoryBase.cs index 8d58bf897a8..8afa1e2a654 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Tree/Dependencies/Subscriptions/MSBuildDependencies/MSBuildDependencyFactoryBase.cs +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Tree/Dependencies/Subscriptions/MSBuildDependencies/MSBuildDependencyFactoryBase.cs @@ -179,6 +179,7 @@ protected internal virtual ProjectTreeFlags UpdateTreeFlags(string id, ProjectTr /// Gets the to set for a dependency, based on its resolved state and item properties. /// /// if the dependency is resolved, if it is unresolved, or if the status is not yet determined. + /// Whether the MSBuild invocation that produced this data also encountered an error or not. /// The properties of the item. /// The diagnostic level to use when the property is either missing or empty. Intended to receive a dependency's current diagnostic level when an evaluation-only update is being processed. ///