diff --git a/src/VirtoCommerce.Build/Build.cs b/src/VirtoCommerce.Build/Build.cs index a1b30c4..8e55bcb 100644 --- a/src/VirtoCommerce.Build/Build.cs +++ b/src/VirtoCommerce.Build/Build.cs @@ -275,12 +275,12 @@ public static Solution Solution var testProjects = Solution.GetProjects("*.Test|*.Tests|*.Testing"); var outPath = RootDirectory / ".tmp"; - foreach (var testProject in testProjects) + foreach (var testProjectPath in testProjects.Select(p=> p.Path).ToArray()) { - DotNet($"add \"{testProject.Path}\" package coverlet.collector"); + DotNet($"add \"{testProjectPath}\" package coverlet.collector"); var testSetting = new DotNetTestSettings() - .SetProjectFile(testProject.Path) + .SetProjectFile(testProjectPath) .SetConfiguration(Configuration) .SetFilter(TestsFilter) .SetNoBuild(true) @@ -1172,7 +1172,14 @@ private void CompressExecuteMethod() keepFiles = TextTasks.ReadAllLines(ModuleKeepFile).ToArray(); } - ArtifactPacker.CompressModule(ModuleOutputDirectory, ZipFilePath, ModuleManifest.Id, ModuleManifestFile, WebProject.Directory, ignoredFiles, keepFiles, _moduleContentFolders); + ArtifactPacker.CompressModule(options => options.WithSourceDirectory(ModuleOutputDirectory) + .WithOutputZipPath(ZipFilePath) + .WithModuleId(ModuleManifest.Id) + .WithModuleManifestPath(ModuleManifestFile) + .WithWebProjectDirectory(WebProject.Directory) + .WithIgnoreList(ignoredFiles) + .WithKeepList(keepFiles) + .WithModuleContentFolders(_moduleContentFolders)); } else { diff --git a/src/VirtoCommerce.Build/PlatformTools/Azure/AzurePipelineArtifactsClient.cs b/src/VirtoCommerce.Build/PlatformTools/Azure/AzurePipelineArtifactsClient.cs index d1c9de4..6c3a10f 100644 --- a/src/VirtoCommerce.Build/PlatformTools/Azure/AzurePipelineArtifactsClient.cs +++ b/src/VirtoCommerce.Build/PlatformTools/Azure/AzurePipelineArtifactsClient.cs @@ -34,7 +34,7 @@ public Stream OpenRead(Uri address) } finally { - ((IDisposable)client)?.Dispose(); + client?.Dispose(); } } }