Skip to content

Commit

Permalink
Update MSBuild locator to the latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorKrolic committed Dec 22, 2023
1 parent 79c1589 commit 8545ead
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion src/LanguageServer.Common/LanguageServer.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Build" Version="16.7.0" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.Build.Locator" Version="1.2.6" />
<PackageReference Include="Microsoft.Build.Locator" Version="1.6.10" />
<PackageReference Include="NuGet.Protocol" Version="6.0.5" />
<PackageReference Include="Serilog" Version="2.5.0" />
</ItemGroup>
Expand Down
3 changes: 0 additions & 3 deletions src/LanguageServer.Common/Utilities/MSBuildHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ public static class MSBuildHelper
/// </param>
public static void DiscoverMSBuildEngine(string baseDirectory = null, ILogger logger = null)
{
if (MSBuildLocator.IsRegistered)
MSBuildLocator.Unregister();

_registeredMSBuildInstance = null;

// Assume working directory is VS code's current working directory (i.e. the workspace root).
Expand Down
1 change: 0 additions & 1 deletion src/LanguageServer/LanguageServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<PackageReference Include="OmniSharp.Extensions.LanguageProtocol" Version="0.7.9" />
<PackageReference Include="OmniSharp.Extensions.LanguageServer" Version="0.7.9" />
<PackageReference Include="Microsoft.Build" Version="16.7.0" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.Build.Locator" Version="1.2.6" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" />
<PackageReference Include="Nito.AsyncEx.Tasks" Version="1.0.1" />
<PackageReference Include="Nito.AsyncEx.Coordination" Version="1.0.1" />
Expand Down
12 changes: 0 additions & 12 deletions test/LanguageServer.Engine.Tests/MSBuildEngineFixture.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Microsoft.Build.Locator;
using System;
using Xunit;

namespace MSBuildProjectTools.LanguageServer.Tests
Expand All @@ -10,7 +8,6 @@ namespace MSBuildProjectTools.LanguageServer.Tests
/// An xUnit collection fixture that ensures the MSBuild Locator API is called to discover and use the latest version of the MSBuild engine before any tests are run that depend on it.
/// </summary>
public sealed class MSBuildEngineFixture
: IDisposable
{
/// <summary>
/// Create a new <see cref="MSBuildEngineFixture"/>.
Expand All @@ -19,15 +16,6 @@ public MSBuildEngineFixture()
{
MSBuildHelper.DiscoverMSBuildEngine();
}

/// <summary>
/// Dispose of resources being used by the <see cref="MSBuildEngineFixture"/>.
/// </summary>
public void Dispose()
{
if (MSBuildLocator.IsRegistered)
MSBuildLocator.Unregister();
}
}

/// <summary>
Expand Down

0 comments on commit 8545ead

Please sign in to comment.