diff --git a/.build/CBT/CBT.Core.dll b/.build/CBT/CBT.Core.dll index e4fbdba..a5d8a76 100644 Binary files a/.build/CBT/CBT.Core.dll and b/.build/CBT/CBT.Core.dll differ diff --git a/.build/CBT/build.props b/.build/CBT/build.props index de71f53..d634e80 100644 --- a/.build/CBT/build.props +++ b/.build/CBT/build.props @@ -81,6 +81,8 @@ $(CBTModuleRestoreCommandArguments) $(CBTModuleRestoreCommandAdditionalArguments) $(CBTIntermediateOutputPath)\AssetsLockFilePath.flag + + false $(CBTCoreAssemblyPath.GetType().Assembly.GetType('System.AppDomain').GetProperty('CurrentDomain').GetValue(null, null).CreateInstanceFromAndUnwrap($(CBTCoreAssemblyPath), $(CBTModuleRestoreTaskName)).Execute($(CBTModuleImportsAfter.Split(';')), $(CBTModuleImportsBefore.Split(';')), $(CBTModuleExtensionsPath), $(CBTModulePropertiesFile), $(CBTNuGetDownloaderAssemblyPath), $(CBTNuGetDownloaderClassName), '$(CBTNuGetDownloaderArguments)', $(CBTModuleRestoreInputs.Split(';')), $(CBTModulePackageConfigPath), $(NuGetPackagesPath), $(CBTPackagesFallbackPath), $(CBTModuleRestoreCommand), $(CBTModuleRestoreCommandArguments), $(MSBuildProjectFullPath), $(CBTModuleNuGetAssetsFlagFile))) diff --git a/src/CBT.Core.UnitTests/BuildPropsTest.cs b/src/CBT.Core.UnitTests/BuildPropsTest.cs index cf178b9..c6c3f71 100644 --- a/src/CBT.Core.UnitTests/BuildPropsTest.cs +++ b/src/CBT.Core.UnitTests/BuildPropsTest.cs @@ -61,6 +61,7 @@ public void RequiredPropertiesTest() {new Property("CBTModuleRestoreCommandArguments", @"restore ""$(CBTModulePackageConfigPath)"" -NonInteractive", defaultCondition)}, {new Property("CBTModuleRestoreCommandArguments", @"$(CBTModuleRestoreCommandArguments) $(CBTModuleRestoreCommandAdditionalArguments)", @" '$(CBTModuleRestoreCommandAdditionalArguments)' != '' ")}, {new Property("CBTModuleNuGetAssetsFlagFile", @"$(CBTIntermediateOutputPath)\AssetsLockFilePath.flag", defaultCondition)}, + {new Property("RestoreCBTModules", @"false", @" '$(ExcludeRestorePackageImports)' == 'true' ")}, {new Property("CBTModulesRestored", @"$(CBTCoreAssemblyPath.GetType().Assembly.GetType('System.AppDomain').GetProperty('CurrentDomain').GetValue(null, null).CreateInstanceFromAndUnwrap($(CBTCoreAssemblyPath), $(CBTModuleRestoreTaskName)).Execute($(CBTModuleImportsAfter.Split(';')), $(CBTModuleImportsBefore.Split(';')), $(CBTModuleExtensionsPath), $(CBTModulePropertiesFile), $(CBTNuGetDownloaderAssemblyPath), $(CBTNuGetDownloaderClassName), '$(CBTNuGetDownloaderArguments)', $(CBTModuleRestoreInputs.Split(';')), $(CBTModulePackageConfigPath), $(NuGetPackagesPath), $(CBTPackagesFallbackPath), $(CBTModuleRestoreCommand), $(CBTModuleRestoreCommandArguments), $(MSBuildProjectFullPath), $(CBTModuleNuGetAssetsFlagFile)))", @" '$(RestoreCBTModules)' != 'false' And '$(BuildingInsideVisualStudio)' != 'true' And '$(CBTModulesRestored)' != 'true' And Exists('$(CBTCoreAssemblyPath)') ")}, }; var propertiesToScan = _project.Properties.Where(p => p.Parent.Parent is ProjectRootElement); diff --git a/src/CBT.Core/Tasks/RestoreModules.cs b/src/CBT.Core/Tasks/RestoreModules.cs index 9638f45..efee21b 100644 --- a/src/CBT.Core/Tasks/RestoreModules.cs +++ b/src/CBT.Core/Tasks/RestoreModules.cs @@ -444,7 +444,7 @@ private bool RestorePackages() }, }) { - process.StartInfo.EnvironmentVariables.Add("RestoreCBTModules", "false"); + process.StartInfo.EnvironmentVariables["RestoreCBTModules"] = "false"; process.ErrorDataReceived += (sender, args) => { if (!String.IsNullOrWhiteSpace(args?.Data))