Skip to content

Commit 8b9d8c3

Browse files
committed
chore: removing some warnings
1 parent 56d9920 commit 8b9d8c3

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

src/Buildalyzer/Buildalyzer.csproj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="[4,)" />
16-
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="[4,)" />
17-
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
18-
<PackageReference Include="MsBuildPipeLogger.Server" Version="1.1.6" />
1915
<PackageReference Include="Microsoft.Build" Version="17.0.1" />
2016
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="17.0.1" />
17+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="[4,)" />
18+
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="[4,)" />
2119
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
2220
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.815" Aliases="StructuredLogger" />
2321
<PackageReference Include="MsBuildPipeLogger.Server" Version="1.1.6" />

src/Buildalyzer/Environment/BuildEnvironment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public BuildEnvironment(
7676
WorkingDirectory = workingDirectory;
7777

7878
// Check if we've already specified a path to MSBuild
79-
string envMsBuildExePath = System.Environment.GetEnvironmentVariable(Environment.EnvironmentVariables.MSBUILD_EXE_PATH);
79+
string? envMsBuildExePath = System.Environment.GetEnvironmentVariable(Environment.EnvironmentVariables.MSBUILD_EXE_PATH);
8080
MsBuildExePath = !string.IsNullOrEmpty(envMsBuildExePath) && File.Exists(envMsBuildExePath)
8181
? envMsBuildExePath : msBuildExePath;
8282
if (string.IsNullOrWhiteSpace(MsBuildExePath) && string.IsNullOrWhiteSpace(dotnetExePath))

src/Buildalyzer/Logging/EventProcessor.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
extern alias StructuredLogger;
2-
3-
using System;
4-
using System.Collections.Generic;
5-
using System.Linq;
62
using Microsoft.Build.Framework;
73
using Microsoft.Extensions.Logging;
84

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

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

106102
if (propertiesAndItems != null && propertiesAndItems.Properties != null && propertiesAndItems.Items != null)

0 commit comments

Comments
 (0)