Skip to content

Commit 2a4863b

Browse files
committed
Move potentially throwing app domain cleanup code inside of try/catch
1 parent dcc4678 commit 2a4863b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/xunit.runner.visualstudio/Utility/AppDomainManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ public virtual void Dispose()
5656
{
5757
if (appDomain is not null)
5858
{
59-
var cachePath = appDomain.SetupInformation.CachePath;
60-
6159
try
6260
{
61+
var cachePath = appDomain.SetupInformation.CachePath;
62+
6363
AppDomain.Unload(appDomain);
6464

6565
if (cachePath is not null)

0 commit comments

Comments
 (0)