Skip to content

Commit

Permalink
Merge pull request #9597 from drewnoakes/bits
Browse files Browse the repository at this point in the history
Small fixes
  • Loading branch information
drewnoakes authored Nov 21, 2024
2 parents 54ac541 + f56ba82 commit 5bc38a4
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@
<ItemGroup>
<!-- Needed to break assembly conflict on StreamJsonRpc between microsoft.visualstudio.projectsystem.query and microsoft.visualstudio.languageservices -->
<PackageReference Include="Microsoft.VisualStudio.RpcContracts" />
<!-- Pin MessagePack to a patched version with security vulnerable fix -->
<PackageReference Include="MessagePack" />
<!-- Path property: PkgMicrosoft_CodeAnalysis_Common -->
<!-- The path is needed so we can copy the runtime assembly into the NPM package. -->
<PackageReference Include="Microsoft.CodeAnalysis.Common" GeneratePathProperty="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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";

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 5bc38a4

Please sign in to comment.