src/Misc/EFTools/EntityDesign/VisualStudio/EdmUtils.cs
// <summary>
//     Checks whether a project is using IIS for SQL Database File Upgrade purposes
//     Note: using IISExpress will return false.
// </summary>
Checks whether a project is using IIS for SQL Database File Upgrade purposes
Note: using IISExpress will return false.
Checks whether a project is using IIS for SQL Database File Upgrade purposes Note : using IISExpress will return false .
private static bool IsUsingIIS(Project project)
        {
            var webSiteTypeProjectProperty = VsUtils.GetProjectPropertyByName(project, "WebSiteType") as int?;
            if (webSiteTypeProjectProperty != null
                && (1 == webSiteTypeProjectProperty))
            {
                var isUsingIISExpress = VsUtils.GetProjectPropertyByName(project, "IsUsingIISExpress") as bool?;
                return (isUsingIISExpress == null || false == isUsingIISExpress);
            }
            else
            {
                var webAppUseIIS = VsUtils.GetProjectPropertyByName(project, "WebApplication.UseIIS") as bool?;
                if (webAppUseIIS == null
                    || false == webAppUseIIS)
                {
                    return false;
                }
                else
                {
                    var webAppIsUsingIISExpress = VsUtils.GetProjectPropertyByName(project, "WebApplication.IsUsingIISExpress") as bool?;
                    return (webAppIsUsingIISExpress == null || false == webAppIsUsingIISExpress);
                }
            }
        }
private static bool IsUsingIIS ( Project project ) { var webSiteTypeProjectProperty = VsUtils . GetProjectPropertyByName ( project , " " ) as int ? ; if ( webSiteTypeProjectProperty != null && ( 1 == webSiteTypeProjectProperty ) ) { var isUsingIISExpress = VsUtils . GetProjectPropertyByName ( project , " " ) as bool ? ; return ( isUsingIISExpress == null || false == isUsingIISExpress ) ; } else { var webAppUseIIS = VsUtils . GetProjectPropertyByName ( project , " " ) as bool ? ; if ( webAppUseIIS == null || false == webAppUseIIS ) { return false ; } else { var webAppIsUsingIISExpress = VsUtils . GetProjectPropertyByName ( project , " " ) as bool ? ; return ( webAppIsUsingIISExpress == null || false == webAppIsUsingIISExpress ) ; } } }
Checks whether a project is using IIS for SQL Database File Upgrade purposes
Note: using IISExpress will return false.
Checks whether a project is using IIS for SQL Database File Upgrade purposes Note : using IISExpress will return false .
// it's a WebSite project so check IsUsingIISExpress. If this is null or false then is using IIS. // it's a non-Website project so check WebApplication.UseIIS and WebApplication.IsUsingIISExpress // WebApplication.UseIIS does not exist or is false // WebApplication.UseIIS is true, return true unless webAppIsUsingIISExpress is also true
project
Project