public static BuildTargetResult ReplaceDependencyVersions(BuildTargetContext c) { ReplaceFileContents(@"build_projects\shared-build-targets-utils\DependencyVersions.cs", fileContents => { DependencyInfo coreFXInfo = c.GetCoreFXDependency(); DependencyInfo coreSetupInfo = c.GetCoreSetupDependency(); fileContents = ReplaceDependencyVersion(fileContents, coreFXInfo, "CoreCLRVersion", "Microsoft.NETCore.Runtime.CoreCLR"); fileContents = ReplaceDependencyVersion(fileContents, coreSetupInfo, "SharedFrameworkVersion", "Microsoft.NETCore.App"); fileContents = ReplaceDependencyVersion(fileContents, coreSetupInfo, "SharedHostVersion", "Microsoft.NETCore.DotNetHost"); return(fileContents); }); return(c.Success()); }