private static ProjectBase TryGetProjectTypeFromDefineConstants(Project coreVisualStudioProject, out string message) { string preProcessorConstants = GetPreProcessorConstantsFromProject(coreVisualStudioProject); //string sasfd = ProjectManager.LibrariesPath; // Check for other platforms before checking for FRB_XNA because those projects // include FRB_XNA in them ProjectBase toReturn = null; if (preProcessorConstants.Contains("ANDROID")) { toReturn = new AndroidProject(coreVisualStudioProject); } else if (preProcessorConstants.Contains("WINDOWS_8")) { toReturn = new Windows8MonoGameProject(coreVisualStudioProject); } else if (preProcessorConstants.Contains("IOS")) { toReturn = new IosMonogameProject(coreVisualStudioProject); } else if (preProcessorConstants.Contains("UWP")) { toReturn = new UwpProject(coreVisualStudioProject); } else if (preProcessorConstants.Contains("WINDOWS_PHONE")) { toReturn = new WindowsPhoneProject(coreVisualStudioProject); } else if (preProcessorConstants.Contains("LINUX")) { toReturn = new DesktopGlLinuxProject(coreVisualStudioProject); } else if (preProcessorConstants.Contains("DESKTOP_GL")) { toReturn = new DesktopGlProject(coreVisualStudioProject); } // Do XNA_4 last, since every // other project type has this // preprocessor type, so every project // type would return true here else if (preProcessorConstants.Contains("XNA4")) { toReturn = new Xna4Project(coreVisualStudioProject); } message = null; if (toReturn == null) { message = $"Could not determine project type from preprocessor directives. The preprocessor directive string is \"{preProcessorConstants}\""; } return(toReturn); }
private static ProjectBase TryGetProjectTypeFromDefineConstants(Project coreVisualStudioProject) { string preProcessorConstants = GetPreProcessorConstantsFromProject(coreVisualStudioProject); //string sasfd = ProjectManager.LibrariesPath; // Check for other platforms before checking for FRB_XNA because those projects // include FRB_XNA in them ProjectBase toReturn = null; if (preProcessorConstants.Contains("ANDROID")) { toReturn = new AndroidProject(coreVisualStudioProject); } else if (preProcessorConstants.Contains("WINDOWS_8")) { toReturn = new Windows8MonoGameProject(coreVisualStudioProject); } else if(preProcessorConstants.Contains("IOS")) { toReturn = new IosMonogameProject(coreVisualStudioProject); } else if(preProcessorConstants.Contains("UWP")) { toReturn = new UwpProject(coreVisualStudioProject); } else if (preProcessorConstants.Contains("WINDOWS_PHONE")) { toReturn = new WindowsPhoneProject(coreVisualStudioProject); } else if (preProcessorConstants.Contains("XNA4")) { toReturn = new Xna4Project(coreVisualStudioProject); } else if (preProcessorConstants.Contains("FRB_XNA")) { toReturn = new XnaProject(coreVisualStudioProject); } else if (preProcessorConstants.Contains("FSB") || preProcessorConstants.Contains("SILVERLIGHT")) { toReturn = new FsbProject(coreVisualStudioProject); } else if (preProcessorConstants.Contains("FRB_MDX")) { toReturn = new MdxProject(coreVisualStudioProject); } return toReturn; }