public static BuildTargetResult ReplaceCoreHostPackaging(BuildTargetContext c) { ReplaceFileContents(@"pkg\dir.props", contents => { DependencyInfo coreFXInfo = c.GetCoreFXDependency(); Regex regex = new Regex(@"Microsoft\.NETCore\.Platforms\\(?<version>\d\.\d\.\d)-(?<release>.*)\\runtime\.json"); return regex.ReplaceGroupValue(contents, "release", coreFXInfo.NewReleaseVersion); }); return c.Success(); }
public static BuildTargetResult ReplaceCrossGen(BuildTargetContext c) { ReplaceFileContents(@"scripts\dotnet-cli-build\CompileTargets.cs", compileTargetsContent => { DependencyInfo coreFXInfo = c.GetCoreFXDependency(); Regex regex = new Regex(@"CoreCLRVersion = ""(?<version>\d.\d.\d)-(?<release>.*)"";"); return regex.ReplaceGroupValue(compileTargetsContent, "release", coreFXInfo.NewReleaseVersion); }); return c.Success(); }