private IEnumerable <IProjectUpgradeAction> GetSchemaUpgrades(ProjectMigrationOptions options, BaseProjectUpgradeContext context) { var upgradeActions = new List <IProjectUpgradeAction>(); //if (options.PackagesVersion == ReleaseVersion.) //{ // upgrades the compilation options section. var compilationOptionsUpgradeAction = new UpgradeCompilationOptionsJson(); upgradeActions.Add(compilationOptionsUpgradeAction); // moves things to packOptions. var upgradePackOptions = new UpgradePackOptions(); upgradeActions.Add(upgradePackOptions); // moves content to the new packOptions and buildOptions / copyToOutput var moveContent = new MoveContentToNewOptions(); upgradeActions.Add(moveContent); // moves resources to buildOptions. var moveResources = new MoveResourcesToBuildOptions(); upgradeActions.Add(moveResources); // move compile to build options. var moveCompileToBuildOptions = new MoveCompileToBuildOptions(); upgradeActions.Add(moveCompileToBuildOptions); // move exclude to build options var moveExcludeToBuildOptions = new MoveExcludeToBuildOptions(); upgradeActions.Add(moveExcludeToBuildOptions); // moves things to publishOptions. var upgradePublishOptions = new UpgradePublishOptions(); upgradeActions.Add(upgradePublishOptions); // includes appSettings.Json files in copyToOutput var includeAppSettingsFilesInCopyToOutput = new IncludeAppSettingsFilesInCopyToOutput(); upgradeActions.Add(includeAppSettingsFilesInCopyToOutput); // includes Views folder in copyToOutput var includeViewsFolderInCopyToOutput = new IncludeViewsFolderInCopyToOutput(); upgradeActions.Add(includeViewsFolderInCopyToOutput); // renames the old dnx4YZ TFM's to be the net4YZ Tfm's. var frameworksUpgradeAction = new MigrateDnxFrameworksToNetFramework452Json(); upgradeActions.Add(frameworksUpgradeAction); // upgrades xproj file, by updating old dnx imports to new dotnet ones. var xprojImportsUpgrade = new MigrateProjectImportsFromDnxToDotNet(); upgradeActions.Add(xprojImportsUpgrade); // updates xproj baseintermediate output path var xprojUpdateBaseIntermediateOutputPath = new UpdateBaseIntermediateOutputPath(); upgradeActions.Add(xprojUpdateBaseIntermediateOutputPath); // updates xproj targetFramework var xprojUpdateTargetFramework = new SetTargetFrameworkVersion(options.TargetFrameworkVersionForXprojFile); upgradeActions.Add(xprojUpdateTargetFramework); // updates launch settings var updateLaunchSettings = new UpdateLaunchSettings(); upgradeActions.Add(updateLaunchSettings); // } // if (options.PackagesVersion == ReleaseVersion.RTM) // { // NONE NECESSAERY. // } return(upgradeActions); }
public BaseProjectMigrator(BaseProjectUpgradeContext context) { Context = context; AppliedActions = new List <IProjectUpgradeAction>(); }
public ProjectMigrator(BaseProjectUpgradeContext context) : base(context) { }