diff --git a/TestAssets/TestProjects/PortableTests/PortableAppWithIntentionalManagedDowngrade/.noautoupdate b/TestAssets/TestProjects/PortableTests/PortableAppWithIntentionalManagedDowngrade/.noautoupdate new file mode 100644 index 000000000..e69de29bb diff --git a/scripts/update-dependencies/UpdateFilesTargets.cs b/scripts/update-dependencies/UpdateFilesTargets.cs index c4a7eefc0..625fd329c 100644 --- a/scripts/update-dependencies/UpdateFilesTargets.cs +++ b/scripts/update-dependencies/UpdateFilesTargets.cs @@ -85,9 +85,12 @@ namespace Microsoft.DotNet.Scripts { List dependencyInfos = c.GetDependencyInfos(); + const string noUpdateFileName = ".noautoupdate"; + IEnumerable projectJsonFiles = Enumerable.Union( Directory.GetFiles(Dirs.RepoRoot, "project.json", SearchOption.AllDirectories), - Directory.GetFiles(Path.Combine(Dirs.RepoRoot, @"src\dotnet\commands\dotnet-new"), "project.json.pretemplate", SearchOption.AllDirectories)); + Directory.GetFiles(Path.Combine(Dirs.RepoRoot, @"src\dotnet\commands\dotnet-new"), "project.json.pretemplate", SearchOption.AllDirectories)) + .Where(p => !File.Exists(Path.Combine(Path.GetDirectoryName(p), noUpdateFileName))); JObject projectRoot; foreach (string projectJsonFile in projectJsonFiles)