diff --git a/Directory.Build.props b/Directory.Build.props
index 74352a81..79e228b2 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -22,7 +22,7 @@
2.7.0
2.5.7
4.20.70
- 20.0.15
+ 21.0.2
3.2.0
\ No newline at end of file
diff --git a/src/Crossroads/Services/PackageApplicationBuilder.cs b/src/Crossroads/Services/PackageApplicationBuilder.cs
index e215d09b..a846f74a 100644
--- a/src/Crossroads/Services/PackageApplicationBuilder.cs
+++ b/src/Crossroads/Services/PackageApplicationBuilder.cs
@@ -154,7 +154,7 @@ private void CopyIncludeDirectories()
foreach (var includeDirectory in Option.Include)
{
- IDirectoryInfo dirInfo = fileSystem.DirectoryInfo.FromDirectoryName(includeDirectory);
+ IDirectoryInfo dirInfo = fileSystem.DirectoryInfo.New(includeDirectory);
CopyDirectory(includeDirectory, Path.Combine(assetsDirectory, dirInfo.Name), true);
}
}
@@ -179,7 +179,7 @@ private string launcherSourceDirectory
private void CopyDirectory(string sourceDirName, string destDirName, bool copySubDirs)
{
- IDirectoryInfo dir = fileSystem.DirectoryInfo.FromDirectoryName(sourceDirName);
+ IDirectoryInfo dir = fileSystem.DirectoryInfo.New(sourceDirName);
IDirectoryInfo[] dirs = dir.GetDirectories();
diff --git a/test/Crossroads.Test/Services/PackageApplicationBuilderTests.cs b/test/Crossroads.Test/Services/PackageApplicationBuilderTests.cs
index 149907cd..6901d0cb 100644
--- a/test/Crossroads.Test/Services/PackageApplicationBuilderTests.cs
+++ b/test/Crossroads.Test/Services/PackageApplicationBuilderTests.cs
@@ -135,10 +135,10 @@ public async Task Build_OnLinux_WithValidInclude_Success()
public async Task Build_Dispose_WorkingDirDeleteFailure__ResolveException()
{
var fileSystem = new Mock();
- fileSystem.Setup(x => x.DirectoryInfo.FromDirectoryName(It.IsAny())).Returns(It.IsAny());
- fileSystem.Setup(x => x.DirectoryInfo.FromDirectoryName(It.IsAny()).GetDirectories()).Returns(It.IsAny());
- fileSystem.Setup(x => x.DirectoryInfo.FromDirectoryName(It.IsAny()).GetFiles()).Returns(Array.Empty);
- fileSystem.Setup(x => x.DirectoryInfo.FromDirectoryName(It.IsAny()).GetDirectories()).Returns(Array.Empty);
+ fileSystem.Setup(x => x.DirectoryInfo.New(It.IsAny())).Returns(It.IsAny());
+ fileSystem.Setup(x => x.DirectoryInfo.New(It.IsAny()).GetDirectories()).Returns(It.IsAny());
+ fileSystem.Setup(x => x.DirectoryInfo.New(It.IsAny()).GetFiles()).Returns(Array.Empty);
+ fileSystem.Setup(x => x.DirectoryInfo.New(It.IsAny()).GetDirectories()).Returns(Array.Empty);
fileSystem.Setup(x => x.Directory.Exists(It.IsAny())).Returns(true);
fileSystem.Setup(x => x.Directory.Delete(It.IsAny(), It.IsAny())).Throws(new Exception());
var resource = new Mock();