src/Misc/EFTools/EntityDesign/VisualStudio/EdmUtils.cs
// <summary>
//     Called when a MDF database file is upgraded from Dev10 to Dev11
//     1. Check the project type, return immediately if project is misc project.
//     2. Update the config file if needed
// </summary>
Called when a MDF database file is upgraded from Dev10 to Dev11
1. Check the project type, return immediately if project is misc project.
2. Update the config file if needed
Called when a MDF database file is upgraded from Dev10 to Dev11 1 . Check the project type return immediately if project is misc project . 2 . Update the config file if needed
[SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "databaseFile")]
        [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "newConnectionString")]
        internal static void SqlDatabaseFileUpgradeService_OnUpgradeProject(
            IVsHierarchy hierarchy, string databaseFile, string newConnectionString, IVsUpgradeLogger logger)
        {
            if (PackageManager.Package != null
                && PackageManager.Package.ModelManager != null)
            {
                var project = VSHelpers.GetProject(hierarchy);
                if (project != null
                    && !VsUtils.IsMiscellaneousProject(project)
                    && !IsUsingIIS(project))
                {
                    var configFileUtils = new ConfigFileUtils(project, PackageManager.Package);
                    UpdateConfigForSqlDbFileUpgrade(configFileUtils, project, logger);
                }
            }
        }
[ SuppressMessage ( " " , " " , MessageId = " " ) ] [ SuppressMessage ( " " , " " , MessageId = " " ) ] internal static void SqlDatabaseFileUpgradeService_OnUpgradeProject ( IVsHierarchy hierarchy , string databaseFile , string newConnectionString , IVsUpgradeLogger logger ) { if ( PackageManager . Package != null && PackageManager . Package . ModelManager != null ) { var project = VSHelpers . GetProject ( hierarchy ) ; if ( project != null && ! VsUtils . IsMiscellaneousProject ( project ) && ! IsUsingIIS ( project ) ) { var configFileUtils = new ConfigFileUtils ( project , PackageManager . Package ) ; UpdateConfigForSqlDbFileUpgrade ( configFileUtils , project , logger ) ; } } }
Called when a MDF database file is upgraded from Dev10 to Dev11
1.
Called when a MDF database file is upgraded from Dev10 to Dev11 1 .
// skip the step if it is a miscellaneous project or if the project is using IIS // (projects using IIS should not be upgraded - see bug 812074) // update the config file as needed
hierarchy
IVsHierarchy
databaseFile
string
newConnectionString
string
logger
IVsUpgradeLogger