diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/Packaging/ManagedProjectSystemPackage.cs b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/Packaging/ManagedProjectSystemPackage.cs index a7ba82a6564..acd5676af17 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/Packaging/ManagedProjectSystemPackage.cs +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/Packaging/ManagedProjectSystemPackage.cs @@ -13,12 +13,12 @@ namespace Microsoft.VisualStudio.Packaging [PackageRegistration(AllowsBackgroundLoading = true, RegisterUsing = RegistrationMethod.Assembly, UseManagedResourcesOnly = true)] [ProvideProjectFactory(typeof(XprojProjectFactory), null, "#27", "xproj", "xproj", null)] [ProvideAutoLoad(ActivationContextGuid, PackageAutoLoadFlags.BackgroundLoad)] - [ProvideUIContextRule(ActivationContextGuid, + [ProvideUIContextRule( + contextGuid: ActivationContextGuid, name: "Load Managed Project Package", expression: "dotnetcore", - termNames: new[] { "dotnetcore" }, - termValues: new[] { "SolutionHasProjectCapability:.NET & CPS" } - )] + termNames: ["dotnetcore"], + termValues: ["SolutionHasProjectCapability:.NET & CPS"])] [ProvideMenuResource("Menus.ctmenu", 5)] internal sealed class ManagedProjectSystemPackage : AsyncPackage { diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/HotReload/ProjectHotReloadSession.cs b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/HotReload/ProjectHotReloadSession.cs index 8e56ddd7f34..52bf3ff1bde 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/HotReload/ProjectHotReloadSession.cs +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/HotReload/ProjectHotReloadSession.cs @@ -3,7 +3,6 @@ using System.Diagnostics.CodeAnalysis; using Microsoft.VisualStudio.Debugger.Contracts.HotReload; using Microsoft.VisualStudio.HotReload.Components.DeltaApplier; -using static Microsoft.VisualStudio.ProjectSystem.VS.HotReload.ProjectHotReloadSessionManager; namespace Microsoft.VisualStudio.ProjectSystem.VS.HotReload { diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/HotReload/ProjectHotReloadSessionManager.cs b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/HotReload/ProjectHotReloadSessionManager.cs index 4f84366b1b0..170a6b0299d 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/HotReload/ProjectHotReloadSessionManager.cs +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/HotReload/ProjectHotReloadSessionManager.cs @@ -1,12 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE.md file in the project root for more information. using System.Diagnostics; -using System.Runtime.InteropServices; using Microsoft.VisualStudio.Debugger.Contracts.HotReload; using Microsoft.VisualStudio.HotReload.Components.DeltaApplier; using Microsoft.VisualStudio.ProjectSystem.Debug; using Microsoft.VisualStudio.ProjectSystem.Properties; -using Microsoft.VisualStudio.ProjectSystem.VS.Build; using Microsoft.VisualStudio.Shell; using Microsoft.VisualStudio.Shell.Interop; using Microsoft.VisualStudio.Threading; diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Tree/Dependencies/AttachedCollections/Implementation/FrameworkReferenceAssemblyAttachedCollectionSourceProvider.cs b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Tree/Dependencies/AttachedCollections/Implementation/FrameworkReferenceAssemblyAttachedCollectionSourceProvider.cs index da43da87573..a475e440359 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Tree/Dependencies/AttachedCollections/Implementation/FrameworkReferenceAssemblyAttachedCollectionSourceProvider.cs +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Tree/Dependencies/AttachedCollections/Implementation/FrameworkReferenceAssemblyAttachedCollectionSourceProvider.cs @@ -17,13 +17,10 @@ namespace Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.AttachedColl [VisualStudio.Utilities.Order(Before = HierarchyItemsProviderNames.Contains)] internal sealed class FrameworkReferenceAssemblyAttachedCollectionSourceProvider : DependenciesAttachedCollectionSourceProviderBase { - private readonly IRelationProvider _relationProvider; - [ImportingConstructor] - public FrameworkReferenceAssemblyAttachedCollectionSourceProvider(IRelationProvider relationProvider) + public FrameworkReferenceAssemblyAttachedCollectionSourceProvider() : base(Flags.FrameworkDependency) { - _relationProvider = relationProvider; } protected override bool TryCreateCollectionSource( @@ -48,7 +45,7 @@ protected override bool TryCreateCollectionSource( var framework = new FrameworkReferenceIdentity(path, profile, name); var item = new FrameworkReferenceItem(framework); - if (AggregateContainsRelationCollection.TryCreate(item, _relationProvider, out AggregateContainsRelationCollection? collection)) + if (AggregateContainsRelationCollection.TryCreate(item, relationProvider, out AggregateContainsRelationCollection? collection)) { containsCollectionSource = new AggregateRelationCollectionSource(hierarchyItem, collection); return true; diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed/Microsoft.VisualStudio.ProjectSystem.Managed.csproj b/src/Microsoft.VisualStudio.ProjectSystem.Managed/Microsoft.VisualStudio.ProjectSystem.Managed.csproj index 9263961a2f3..7784885240f 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed/Microsoft.VisualStudio.ProjectSystem.Managed.csproj +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed/Microsoft.VisualStudio.ProjectSystem.Managed.csproj @@ -50,8 +50,6 @@ - - diff --git a/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/Debug/ProjectLaunchTargetsProviderTests.cs b/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/Debug/ProjectLaunchTargetsProviderTests.cs index 6fbd1e196d1..893acbb3fbe 100644 --- a/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/Debug/ProjectLaunchTargetsProviderTests.cs +++ b/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/Debug/ProjectLaunchTargetsProviderTests.cs @@ -580,7 +580,7 @@ public void ValidateSettings_WhenExeFound_DoesNotThrow() public void ValidateSettings_WhenWorkingDirNotFound_Throws() { string executable = "bar.exe"; - string workingDir = "c:\foo"; + string workingDir = @"c:\foo"; var debugger = GetDebugTargetsProvider(); var profileName = "run"; @@ -610,7 +610,7 @@ public async Task CommandLineArgNewLines_AreStripped() public void ValidateSettings_WhenWorkingDirFound_DoesNotThrow() { string executable = "bar.exe"; - string workingDir = "c:\foo"; + string workingDir = @"c:\foo"; var debugger = GetDebugTargetsProvider(); var profileName = "run"; diff --git a/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/HotReload/ProjectHotReloadSessionManagerTests.cs b/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/HotReload/ProjectHotReloadSessionManagerTests.cs index 0e83bb2f2b7..ea7df5aebd0 100644 --- a/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/HotReload/ProjectHotReloadSessionManagerTests.cs +++ b/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/HotReload/ProjectHotReloadSessionManagerTests.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE.md file in the project root for more information. using Microsoft.VisualStudio.ProjectSystem.Debug; -using Microsoft.VisualStudio.ProjectSystem.VS.Build; using Microsoft.VisualStudio.Shell.Interop; namespace Microsoft.VisualStudio.ProjectSystem.VS.HotReload