Skip to content

Commit

Permalink
chore: removing some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
phmonte committed Jun 18, 2024
1 parent 56d9920 commit 8b9d8c3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
6 changes: 2 additions & 4 deletions src/Buildalyzer/Buildalyzer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="[4,)" />
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="[4,)" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="MsBuildPipeLogger.Server" Version="1.1.6" />
<PackageReference Include="Microsoft.Build" Version="17.0.1" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="17.0.1" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="[4,)" />
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="[4,)" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.815" Aliases="StructuredLogger" />
<PackageReference Include="MsBuildPipeLogger.Server" Version="1.1.6" />
Expand Down
2 changes: 1 addition & 1 deletion src/Buildalyzer/Environment/BuildEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public BuildEnvironment(
WorkingDirectory = workingDirectory;

// Check if we've already specified a path to MSBuild
string envMsBuildExePath = System.Environment.GetEnvironmentVariable(Environment.EnvironmentVariables.MSBUILD_EXE_PATH);
string? envMsBuildExePath = System.Environment.GetEnvironmentVariable(Environment.EnvironmentVariables.MSBUILD_EXE_PATH);
MsBuildExePath = !string.IsNullOrEmpty(envMsBuildExePath) && File.Exists(envMsBuildExePath)
? envMsBuildExePath : msBuildExePath;
if (string.IsNullOrWhiteSpace(MsBuildExePath) && string.IsNullOrWhiteSpace(dotnetExePath))
Expand Down
6 changes: 1 addition & 5 deletions src/Buildalyzer/Logging/EventProcessor.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
extern alias StructuredLogger;

using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Build.Framework;
using Microsoft.Extensions.Logging;

Expand Down Expand Up @@ -100,7 +96,7 @@ private void ProjectStarted(object sender, ProjectStartedEventArgs e)

// Get the TFM for this project
// use an empty string if no target framework was found, for example in case of C++ projects with VS >= 2022
var tfm = propertiesAndItems?.Properties.TryGet("TargetFrameworkMoniker")?.StringValue
string tfm = propertiesAndItems?.Properties.TryGet("TargetFrameworkMoniker")?.StringValue
?? string.Empty;

if (propertiesAndItems != null && propertiesAndItems.Properties != null && propertiesAndItems.Items != null)
Expand Down

0 comments on commit 8b9d8c3

Please sign in to comment.