Skip to content

Commit dbe960d

Browse files
CR: Just use Assembly.Location
1 parent 92131da commit dbe960d

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/Components/WebAssembly/Server/src/DebugProxyLauncher.cs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,8 @@ private static void RemoveUnwantedEnvironmentVariables(IDictionary<string, strin
8282
private static string LocateDebugProxyExecutable(IWebHostEnvironment environment)
8383
{
8484
var assembly = Assembly.Load(environment.ApplicationName);
85-
var assemblyLocation = GetAssemblyLocation(assembly);
8685
var debugProxyPath = Path.Combine(
87-
Path.GetDirectoryName(assemblyLocation),
86+
Path.GetDirectoryName(assembly.Location),
8887
"BlazorDebugProxy",
8988
"Microsoft.AspNetCore.Components.WebAssembly.DebugProxy.dll");
9089

@@ -97,17 +96,6 @@ private static string LocateDebugProxyExecutable(IWebHostEnvironment environment
9796
return debugProxyPath;
9897
}
9998

100-
private static string GetAssemblyLocation(Assembly assembly)
101-
{
102-
if (Uri.TryCreate(assembly.CodeBase, UriKind.Absolute, out var result) &&
103-
result.IsFile && string.IsNullOrWhiteSpace(result.Fragment))
104-
{
105-
return result.LocalPath;
106-
}
107-
108-
return assembly.Location;
109-
}
110-
11199
private static void CompleteTaskWhenServerIsReady(Process aspNetProcess, TaskCompletionSource<string> taskCompletionSource)
112100
{
113101
string capturedUrl = null;

0 commit comments

Comments
 (0)