We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69db9b1 commit d7a984cCopy full SHA for d7a984c
dotnet/src/webdriver/Internal/FileUtilities.cs
@@ -187,20 +187,18 @@ public static string GetCurrentDirectory()
187
}
188
189
string currentDirectory = location!;
190
-
191
+#if !NET8_0_OR_GREATER
192
// If we're shadow copying, get the directory from the codebase instead
193
if (AppDomain.CurrentDomain.ShadowCopyFiles)
194
{
195
-#pragma warning disable SYSLIB0012 // Type or member is obsolete
196
var codeBase = executingAssembly.CodeBase;
197
-#pragma warning restore SYSLIB0012 // Type or member is obsolete
198
199
if (codeBase is not null)
200
201
currentDirectory = Path.GetDirectoryName(codeBase)!;
202
203
+#endif
204
205
return currentDirectory;
206
0 commit comments