Skip to content

Commit

Permalink
Delete pragma suppression for warning disabled with UnconditionalSupp…
Browse files Browse the repository at this point in the history
…ressMessage

#109963 (comment)
  • Loading branch information
MichalStrehovsky authored Nov 20, 2024
1 parent 1474fc3 commit 14cb403
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,12 @@ static MsQuicApi()

if (OperatingSystem.IsWindows())
{
#pragma warning disable IL3000 // Avoid accessing Assembly file path when publishing as a single file
// Windows ships msquic in the assembly directory next to System.Net.Quic, so load that.
// For single-file deployments, the assembly location is an empty string so we fall back
// to AppContext.BaseDirectory which is the directory containing the single-file executable.
string path = typeof(MsQuicApi).Assembly.Location is string assemblyLocation && !string.IsNullOrEmpty(assemblyLocation)
? System.IO.Path.GetDirectoryName(assemblyLocation)!
: AppContext.BaseDirectory;
#pragma warning restore IL3000

path = System.IO.Path.Combine(path, Interop.Libraries.MsQuic);

Expand Down

0 comments on commit 14cb403

Please sign in to comment.