public void CreateEveryProjectTemplate ()
		{
			var builder = new StringBuilder ();
			foreach (var template in ProjectTemplate.ProjectTemplates) {
				if (template.Name.Contains ("Gtk#"))
					continue;

				try {
					try { Directory.Delete (TempDir, true); } catch { }
					var cinfo = new ProjectCreateInformation {
						ProjectBasePath = TempDir,
						ProjectName =  "ProjectName",
						SolutionName =  "SolutionName",
						SolutionPath = TempDir
					};
					template.CreateWorkspaceItem (cinfo);
				} catch {
					builder.AppendFormat ("Could not create a project from the template '{0} / {1}'", template.Category, template.Name);
					builder.AppendLine ();
				}
			}

			if (builder.Length > 0)
				Assert.Fail (builder.ToString ());
		}
Exemplo n.º 2
0
		/// <summary>
		///   Initializes a new instance of the <see cref = "MonobjcProject" /> class.
		/// </summary>
		/// <param name = "language">The language.</param>
		/// <param name = "info">The info.</param>
		/// <param name = "projectOptions">The project options.</param>
		public MonobjcProject (String language, ProjectCreateInformation info, XmlElement projectOptions) : base(language, info, projectOptions)
		{
			IDELogger.Log ("MonobjcProject::ctor3");

			this.ApplicationType = GetNodeValue (projectOptions, "MacOSApplicationType", MonobjcProjectType.CocoaApplication);
			this.ApplicationCategory = GetNodeValue (projectOptions, "MacOSApplicationCategory", String.Empty);
			this.BundleId = GetNodeValue (projectOptions, "BundleId", "net.monobjc.application.Test");
			this.BundleVersion = GetNodeValue (projectOptions, "BundleVersion", "1.0");
			this.MainNibFile = GetNodeValue (projectOptions, "MainNibFile", null);
			this.BundleIcon = GetNodeValue (projectOptions, "BundleIcon", null);
			this.TargetOSVersion = GetNodeValue (projectOptions, "MacOSVersion", MacOSVersion.MacOS106);
			this.Signing = Boolean.Parse (GetNodeValue (projectOptions, "Signing", "false"));
			this.SigningIdentity = GetNodeValue (projectOptions, "SigningIdentity", String.Empty);
			this.UseEntitlements = Boolean.Parse (GetNodeValue (projectOptions, "UseEntitlements", "false"));
			this.OSFrameworks = GetNodeValue (projectOptions, "MacOSFrameworks", String.Empty);

			this.TargetOSArch = GetNodeValue (projectOptions, "MacOSArch", MacOSArchitecture.X86);
			this.EmbeddedFrameworks = GetNodeValue (projectOptions, "EmbeddedFrameworks", String.Empty);
			this.AdditionalAssemblies = GetNodeValue (projectOptions, "AdditionalAssemblies", String.Empty);
			this.ExcludedAssemblies = GetNodeValue (projectOptions, "ExcludedAssemblies", String.Empty);
			this.AdditionalLibraries = GetNodeValue (projectOptions, "AdditionalLibraries", String.Empty);

			this.Archive = Boolean.Parse (GetNodeValue (projectOptions, "Archive", "false"));
			this.ArchiveIdentity = GetNodeValue (projectOptions, "ArchiveIdentity", String.Empty);

			this.DevelopmentRegion = GetNodeValue (projectOptions, "MacOSDevelopmentRegion", "en");
			this.CombineArtwork = Boolean.Parse (GetNodeValue (projectOptions, "CombineArtwork", "false"));

			this.Initialize ();
		}
		public async Task CreatePackagingProjectFromTemplate ()
		{
			string templateId = "MonoDevelop.Packaging.Project";
			var template = ProjectTemplate.ProjectTemplates.FirstOrDefault (t => t.Id == templateId);
			var dir = Util.CreateTmpDir (template.Id);
			var cinfo = new ProjectCreateInformation {
				ProjectBasePath = dir,
				ProjectName = "ProjectName",
				SolutionName = "SolutionName",
				SolutionPath = dir
			};

			var workspaceItem = template.CreateWorkspaceItem (cinfo);
			string solutionFileName = Path.Combine (dir, "SolutionName.sln");
			await workspaceItem.SaveAsync (solutionFileName, Util.GetMonitor ());

			string projectFileName = Path.Combine (dir, "ProjectName.nuproj");
			var project = await MSBuildProject.LoadAsync (projectFileName);

			// First element is NuGet.Packaging.props
			var import = project.GetAllObjects ().FirstOrDefault () as MSBuildImport;
			Assert.AreEqual (import.Project, @"$(NuGetAuthoringPath)\NuGet.Packaging.Authoring.props");

			// NuGet.Packaging.targets exists.
			import = project.Imports.LastOrDefault () as MSBuildImport;
			Assert.AreEqual (import.Project, @"$(NuGetAuthoringPath)\NuGet.Packaging.Authoring.targets");

			int count = project.Imports.Count ();
			import = project.Imports.Skip (count - 2).FirstOrDefault ();
			Assert.AreEqual (import.Project, @"$(MSBuildBinPath)\Microsoft.Common.targets");
		}
Exemplo n.º 4
0
		public Project CreateSingleFileProject (string sourceFile)
		{
			ProjectCreateInformation info = new ProjectCreateInformation ();
			info.ProjectName = Path.GetFileNameWithoutExtension (sourceFile);
			info.CombinePath = Path.GetDirectoryName (sourceFile);
			info.ProjectBasePath = Path.GetDirectoryName (sourceFile);
			
			string language = string.Empty;
			
			switch (Path.GetExtension (sourceFile))
			{
			case ".c":
				language = "C";
				break;
			case ".cpp":
				language = "CPP";
				break;
			case ".cxx":
				language = "CPP";
				break;
			}
			
			if (language.Length > 0) {
				Project project =  new CProject (info, null, language);
				project.ProjectFiles.Add (new ProjectFile (sourceFile));
				return project;
			}
			
			return null;
		}
Exemplo n.º 5
0
        public void CreateEveryProjectTemplate()
        {
            var builder = new StringBuilder ();
            foreach (var template in ProjectTemplate.ProjectTemplates) {
                if (template.Name.Contains ("Gtk#"))
                    continue;
                try {
                    var dir = Util.CreateTmpDir (template.Id);
                    var cinfo = new ProjectCreateInformation {
                        ProjectBasePath = dir,
                        ProjectName = "ProjectName",
                        SolutionName = "SolutionName",
                        SolutionPath = dir
                    };
                    template.CreateWorkspaceItem (cinfo);
                } catch (Exception ex) {
                    builder.AppendFormat (
                        "Could not create a project from the template '{0} / {1}': {2}",
                        template.Category, template.Name, ex
                    );
                    builder.AppendLine ();
                    builder.AppendLine ();
                    builder.AppendLine (ex.ToString ());
                    builder.AppendLine ();
                }
            }

            if (builder.Length > 0)
                Assert.Fail (builder.ToString ());
        }
Exemplo n.º 6
0
		protected override void OnInitializeFromTemplate (ProjectCreateInformation projectCreateInfo, System.Xml.XmlElement template)
		{
			base.OnInitializeFromTemplate (projectCreateInfo, template);

			// Support more options when creating a VB.NET project:
			// 1) support adding vb imports
			var assemblyProject = Project;
			if (assemblyProject != null) {
				var imports = template.GetAttribute ("VBImports");
				if (imports != null) {
					try {
						var importType = Type.GetType ("MonoDevelop.VBNetBinding.Import, MonoDevelop.VBNetBinding");
						if (importType != null) {
							var importReferences = imports.Split (new [] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries);

							foreach (var elem in importReferences) {
								// use reflection to avoid hard ref
								var import = Activator.CreateInstance (importType, elem.Trim ());
								assemblyProject.Items.Add ((ProjectItem)import);
							}
						}
					} catch {
						// ignore
					}
				}
			}
		}
Exemplo n.º 7
0
        public HaxeProject(ProjectCreateInformation info, XmlElement projectOptions)
            : base()
        {
            if (projectOptions.Attributes ["TargetHXMLFile"] != null)
            {

                TargetHXMLFile = GetOptionAttribute (info, projectOptions, "TargetHXMLFile");

            }

            if (projectOptions.Attributes ["AdditionalArguments"] != null)
            {

                AdditionalArguments = GetOptionAttribute (info, projectOptions, "AdditionalArguments");

            }

            HaxeProjectConfiguration configuration;

            configuration = (HaxeProjectConfiguration)CreateConfiguration ("Debug");
            configuration.DebugMode = true;
            //configuration.Platform = target;
            Configurations.Add (configuration);

            configuration = (HaxeProjectConfiguration)CreateConfiguration ("Release");
            configuration.DebugMode = false;
            //configuration.Platform = target;
            Configurations.Add (configuration);
        }
Exemplo n.º 8
0
		protected override string GetDefaultTargetPlatform (ProjectCreateInformation projectCreateInfo)
		{
			if (CompileTarget == CompileTarget.Library)
				return string.Empty;
			
			// Guess a good default platform for the project
			if (projectCreateInfo.ParentFolder != null && projectCreateInfo.ParentFolder.ParentSolution != null) {
				ItemConfiguration conf = projectCreateInfo.ParentFolder.ParentSolution.GetConfiguration (projectCreateInfo.ActiveConfiguration);
				if (conf != null)
					return conf.Platform;
				else {
					string curName, curPlatform, bestPlatform = null;
					string sconf = projectCreateInfo.ActiveConfiguration.ToString ();
					ItemConfiguration.ParseConfigurationId (sconf, out curName, out curPlatform);
					foreach (ItemConfiguration ic in projectCreateInfo.ParentFolder.ParentSolution.Configurations) {
						if (ic.Platform == curPlatform)
							return curPlatform;
						if (ic.Name == curName)
							bestPlatform = ic.Platform;
					}
					if (bestPlatform != null)
						return bestPlatform;
				}
			}
			return Services.ProjectService.DefaultPlatformTarget;
		}
Exemplo n.º 9
0
		public PythonProject (string languageName, 
		                      ProjectCreateInformation info,
		                      XmlElement projectOptions)
		{
			PythonConfiguration defaultConfig;
			string binPath;
			
			if (!String.Equals (s_ProjectType, languageName)) {
				throw new ArgumentException ("Not Python Project");
			}
			
			if (info != null) {
				binPath = info.BinPath;
				this.Name = info.ProjectName;
			}
			else {
				binPath = ".";
			}
			
			// Setup our Debug configuration
			defaultConfig = CreateConfiguration ("Debug") as PythonConfiguration;
			this.Configurations.Add (defaultConfig);
			
			// Setup our Release configuration
			defaultConfig = CreateConfiguration ("Release") as PythonConfiguration;
			defaultConfig.Optimize = true;
			this.Configurations.Add (defaultConfig);
			
			// Setup proper paths for all configurations
			foreach (PythonConfiguration config in this.Configurations) {
				config.OutputDirectory = Path.Combine (binPath, config.Name);
			}
		}
Exemplo n.º 10
0
        public RubyProject(ProjectCreateInformation info,
						 XmlElement projectOptions, string language)
        {
            if (info != null) {
                Name = info.ProjectName;
            }
            Configurations.Add (CreateConfiguration ("Default"));
        }
		protected override void OnInitializeFromTemplate (ProjectCreateInformation projectCreateInfo, XmlElement template)
		{
			base.OnInitializeFromTemplate (projectCreateInfo, template);
			if (template.GetAttribute ("HideGettingStarted")?.ToLower () == "true")
				Project.UserProperties.SetValue ("HideGettingStarted", true);
			else
				showGettingStartedOnce = true;
		}
Exemplo n.º 12
0
 public IodineProject(ProjectCreateInformation info, XmlElement projectOptions)
     : this()
 {
     if (info != null) {
         this.Name = info.ProjectName;
     }
     IodineConfiguration releaseConfig = CreateConfiguration ("Release") as IodineConfiguration;
     Configurations.Add (releaseConfig);
 }
Exemplo n.º 13
0
		public ProjectCreateInformation (ProjectCreateInformation projectCreateInformation)
		{
			projectName = projectCreateInformation.ProjectName;
			solutionName = projectCreateInformation.SolutionName;
			solutionPath = projectCreateInformation.SolutionPath;
			projectBasePath = projectCreateInformation.ProjectBasePath;
			ParentFolder = projectCreateInformation.ParentFolder;
			ActiveConfiguration = projectCreateInformation.ActiveConfiguration;
		}
        public OpenFLProject(ProjectCreateInformation info, XmlElement projectOptions)
            : base()
        {
            if (projectOptions.Attributes ["TargetProjectXMLFile"] != null)
            {

                TargetProjectXMLFile = GetOptionAttribute (info, projectOptions, "TargetProjectXMLFile");

            }

            if (projectOptions.Attributes ["AdditionalArguments"] != null)
            {

                AdditionalArguments = GetOptionAttribute (info, projectOptions, "AdditionalArguments");

            }

            OpenFLProjectConfiguration configuration;

            string[] targets = new string[] { "Android", "BlackBerry", "Flash", "HTML5", "iOS", "Linux", "Mac", "webOS", "Windows" };

            foreach (string target in targets)
            {

                configuration = (OpenFLProjectConfiguration)CreateConfiguration ("Debug");
                configuration.DebugMode = true;
                configuration.Platform = target;

                if (target == "iOS")
                {

                    configuration.AdditionalArguments = "-simulator";

                }

                Configurations.Add (configuration);

            }

            foreach (string target in targets)
            {

                configuration = (OpenFLProjectConfiguration)CreateConfiguration ("Release");
                configuration.DebugMode = false;
                configuration.Platform = target;

                if (target == "iOS")
                {

                    configuration.AdditionalArguments = "-simulator";

                }

                Configurations.Add (configuration);

            }
        }
Exemplo n.º 15
0
		public Project CreateSingleFileProject (string sourceFile)
		{
			ProjectCreateInformation info = new ProjectCreateInformation ();
			info.ProjectName = Path.GetFileNameWithoutExtension (sourceFile);
			info.SolutionPath = Path.GetDirectoryName (sourceFile);
			info.ProjectBasePath = Path.GetDirectoryName (sourceFile);
			
			PythonProject project = new PythonProject (m_Language, info, null);
			project.Files.Add (new ProjectFile (sourceFile));
			return project;
		}
Exemplo n.º 16
0
		public MonoMacProject (string languageName, ProjectCreateInformation info, XmlElement projectOptions)
			: base (languageName, info, projectOptions)
		{
			Init ();
			/* TODO
			var mainNibAtt = projectOptions.Attributes ["MainNibFile"];
			if (mainNibAtt != null) {
				this.mainNibFile = mainNibAtt.InnerText;	
			}
			*/
		}
Exemplo n.º 17
0
		public PythonProject (ProjectCreateInformation info, XmlElement projectOptions)
		{
			if (info != null) {
				Name = info.ProjectName;
				Configurations.Add (CreateConfiguration ("Debug"));
				Configurations.Add (CreateConfiguration ("Release"));
				foreach (PythonCompilerParameters parameter in Configurations) {
					parameter.OutputDirectory = Path.Combine (info.BinPath, parameter.Name);
					parameter.OutputAssembly  = Name;
				}
			}
		}
Exemplo n.º 18
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GoldAddin.GoldProject"/> class.
        /// </summary>
        /// <remarks>this constructor is invoked when a new project is created in the IDE</remarks>
        public GoldProject(ProjectCreateInformation info, XmlElement projectOptions)
        {
            init ();

            //a project will not build unless at least 1 configuration is set
            var config = (GoldProjectConfiguration)(CreateConfiguration ("Release"));
            config.DebugMode = false;
            config.OutputFormat = GrammarTableFormat.CompiledGrammarTable;
            config.GrammarTableName = info.ProjectName;
            config.OutputDirectory = info.BinPath;
            Configurations.Add(config);
        }
Exemplo n.º 19
0
        public CucumberProject(ProjectCreateInformation info,
			XmlElement projectOptions)
        {
            if (info != null) {
                Name = info.ProjectName;
            }

            CucumberProjectConfiguration configuration =
                (CucumberProjectConfiguration)CreateConfiguration ("Default");

            Configurations.Add (configuration);
        }
        public Project CreateSingleFileProject(string sourceFile)
        {
            var info = new ProjectCreateInformation () {
                ProjectName = Path.GetFileNameWithoutExtension (sourceFile),
                SolutionPath = Path.GetDirectoryName (sourceFile),
                ProjectBasePath = Path.GetDirectoryName (sourceFile),
            };

            Project project = new CucumberProject (info, null);
            project.Files.Add (new ProjectFile (sourceFile));
            return project;
        }
		ProjectCreateInformation CreateProjectCreateInformation (NewProjectConfiguration config, SolutionFolder parentFolder)
		{
			ProjectCreateInformation cinfo = new ProjectCreateInformation ();
			cinfo.SolutionPath = new FilePath (config.SolutionLocation).ResolveLinks ();
			cinfo.ProjectBasePath = new FilePath (config.ProjectLocation).ResolveLinks ();
			cinfo.ProjectName = config.ProjectName;
			cinfo.SolutionName = config.SolutionName;
			cinfo.ParentFolder = parentFolder;
			cinfo.ActiveConfiguration = IdeApp.Workspace.ActiveConfiguration;
			cinfo.Parameters = config.Parameters;
			return cinfo;
		}
        public PythonProject(string languageName, ProjectCreateInformation info, XmlElement projectOptions)
        {
            if (!String.Equals (languageName, ProjectTypeName))
                throw new ArgumentException ("Not an IronPython project: " + languageName);

            if (info != null) {
                Name = info.ProjectName;
            }

            CreateDefaultConfigurations ();
            foreach (PythonConfiguration configuration in Configurations)
                configuration.OutputDirectory = info.ProjectBasePath;
        }
		public Project CreateSingleFileProject (string file)
		{
			IDotNetLanguageBinding binding = LanguageBindingService.GetBindingPerFileName (file) as IDotNetLanguageBinding;
			if (binding != null) {
				ProjectCreateInformation info = new ProjectCreateInformation ();
				info.ProjectName = Path.GetFileNameWithoutExtension (file);
				info.SolutionPath = Path.GetDirectoryName (file);
				info.ProjectBasePath = Path.GetDirectoryName (file);
				Project project = CreateProject (binding.Language, info, null);
				project.Files.Add (new ProjectFile (file));
				return project;
			}
			return null;
		}
Exemplo n.º 24
0
		public Project CreateSingleFileProject (string file)
		{
			//TODO: get page language
			string language = "C#";
			
			var info = new ProjectCreateInformation () {
				ProjectName = Path.GetFileNameWithoutExtension (file),
				SolutionPath = Path.GetDirectoryName (file),
				ProjectBasePath = Path.GetDirectoryName (file),
			};
			var project = CreateProject (language, info, null);
			project.Files.Add (new ProjectFile (file));
			return project;
		}
Exemplo n.º 25
0
        public Project CreateSingleFileProject(string sourceFile)
        {
            ProjectCreateInformation info = new ProjectCreateInformation();
            info.ProjectName = Path.GetFileNameWithoutExtension(sourceFile);
            //info.CombinePath = Path.GetDirectoryName(sourceFile);
            info.SolutionPath = Path.GetDirectoryName(sourceFile);
            info.ProjectBasePath = Path.GetDirectoryName(sourceFile);

            Project project = null;
            project = new HaxeProject(info, null, "Haxe");
            project.Files.Add(new ProjectFile(sourceFile));

            return project;
        }
Exemplo n.º 26
0
        public Project CreateSingleFileProject(string sourceFile)
        {
            // Create project information using sourceFile's path
            var info = new ProjectCreateInformation()
            {
                ProjectName = Path.GetFileNameWithoutExtension(sourceFile),
                SolutionPath = Path.GetDirectoryName(sourceFile),
                ProjectBasePath = Path.GetDirectoryName(sourceFile),
            };

            var prj = CreateProject(info, null);
            prj.AddFile(sourceFile);
            return prj;
        }
Exemplo n.º 27
0
        public PHPProject(ProjectCreateInformation info, XmlElement projectOptions, string language)
        {
            if (info != null) {
                Name = info.ProjectName;
            }

            ProjectConfiguration configuration = new ProjectConfiguration ();
            configuration.Name = "Debug";
            this.Configurations.Add (configuration);

            configuration = new ProjectConfiguration();
            configuration.Name = "Release";
            this.Configurations.Add (configuration);
        }
        public MonobjcProject(string languageName, ProjectCreateInformation info, XmlElement projectOptions)
            : base(languageName, info, projectOptions)
        {
            var tags = new [,] { { "ProjectName", info.ProjectName } };

            bundleIdentifier = projectOptions.SelectSingleNode("BundleIdentifier").InnerText;
            bundleIdentifier = StringParserService.Parse(bundleIdentifier, tags);

            bundleDisplayName = projectOptions.SelectSingleNode("BundleDisplayName").InnerText;
            bundleDisplayName = StringParserService.Parse(bundleDisplayName, tags);

            bundleDevelopmentRegion = projectOptions.SelectSingleNode("BundleDevelopmentRegion").InnerText;

            bundleVersion = projectOptions.SelectSingleNode("BundleVersion").InnerText;
        }
Exemplo n.º 29
0
		public Project CreateProject (string language, ProjectCreateInformation info, XmlElement projectOptions)
		{
			
			XnaProject project = new XnaProject(language, info, projectOptions);
			
			ProjectCreateInformation contentInfo = new ProjectCreateInformation();
			contentInfo.SolutionName = info.SolutionName;
			contentInfo.SolutionPath = info.SolutionPath;
			contentInfo.ProjectBasePath = info.ProjectBasePath.Combine("Content");
			contentInfo.ProjectName = "Content";
			
			ContentProject contentProject = (ContentProject)Services.ProjectService.CreateProject("ContentProject", contentInfo, projectOptions);
			FilePath includePath = FilePath.Empty.Combine("Content").Combine(contentProject.FileName);
			NestedContentProject nestedContent = new NestedContentProject(contentProject, includePath);
			project.NestedContentProjects.Add(nestedContent);
			
			return project;
		}
Exemplo n.º 30
0
        public TypeScriptProject(ProjectCreateInformation info, XmlElement projectOptions)
            : this()
        {
            if (projectOptions.Attributes ["TargetJavaScriptFile"] != null)
                TargetJavaScriptFile = GetOptionAttribute (info, projectOptions, "TargetJavaScriptFile");

            if (projectOptions.Attributes ["AdditionalArguments"] != null)
                AdditionalArguments = GetOptionAttribute (info, projectOptions, "AdditionalArguments");

            TypeScriptProjectConfiguration configuration;

            configuration = (TypeScriptProjectConfiguration) CreateConfiguration ("Debug");
            configuration.DebugMode = true;
            Configurations.Add (configuration);

            configuration = (TypeScriptProjectConfiguration) CreateConfiguration ("Release");
            configuration.DebugMode = false;
            Configurations.Add (configuration);
        }
Exemplo n.º 31
0
 public Project CreateProject(string typeAlias, ProjectCreateInformation info, XmlElement projectOptions, params string[] flavorGuids)
 {
     return(MSBuildProjectService.CreateProject(typeAlias, info, projectOptions, flavorGuids));
 }
        public Project CreateProject(ProjectCreateInformation info, XmlElement projectOptions)
        {
            string lang = projectOptions.GetAttribute("language");

            return(CreateProject(lang, info, projectOptions));
        }
 public PortableDotNetProject(string languageName, ProjectCreateInformation projectCreateInfo, XmlElement projectOptions)
     : base(languageName, projectCreateInfo, projectOptions)
 {
 }
Exemplo n.º 34
0
 protected virtual string GetDefaultTargetPlatform(ProjectCreateInformation projectCreateInfo)
 {
     return(string.Empty);
 }
Exemplo n.º 35
0
        public DotNetProject(string languageName, ProjectCreateInformation projectCreateInfo, XmlElement projectOptions) : this(languageName)
        {
            if ((projectOptions != null) && (projectOptions.Attributes["Target"] != null))
            {
                CompileTarget = (CompileTarget)Enum.Parse(typeof(CompileTarget), projectOptions.Attributes["Target"].Value);
            }
            else if (IsLibraryBasedProjectType)
            {
                CompileTarget = CompileTarget.Library;
            }

            if (this.LanguageBinding != null)
            {
                LanguageParameters = languageBinding.CreateProjectParameters(projectOptions);

                bool externalConsole = false;

                string platform = null;
                if (projectOptions != null)
                {
                    projectOptions.SetAttribute("DefineDebug", "True");
                    if (!projectOptions.HasAttribute("Platform"))
                    {
                        // Clone the element since we are going to change it
                        platform       = GetDefaultTargetPlatform(projectCreateInfo);
                        projectOptions = (XmlElement)projectOptions.CloneNode(true);
                        projectOptions.SetAttribute("Platform", platform);
                    }
                    else
                    {
                        platform = projectOptions.GetAttribute("Platform");
                    }
                    if (projectOptions.GetAttribute("ExternalConsole") == "True")
                    {
                        externalConsole = true;
                    }
                }
                string platformSuffix = string.IsNullOrEmpty(platform) ? string.Empty : "|" + platform;
                DotNetProjectConfiguration configDebug = CreateConfiguration("Debug" + platformSuffix) as DotNetProjectConfiguration;
                configDebug.CompilationParameters = languageBinding.CreateCompilationParameters(projectOptions);
                configDebug.DebugMode             = true;
                configDebug.ExternalConsole       = externalConsole;
                configDebug.PauseConsoleOutput    = externalConsole;
                Configurations.Add(configDebug);

                DotNetProjectConfiguration configRelease = CreateConfiguration("Release" + platformSuffix) as DotNetProjectConfiguration;
                if (projectOptions != null)
                {
                    projectOptions.SetAttribute("DefineDebug", "False");
                }
                configRelease.CompilationParameters = languageBinding.CreateCompilationParameters(projectOptions);
                configRelease.DebugMode             = false;
                configRelease.ExternalConsole       = externalConsole;
                configRelease.PauseConsoleOutput    = externalConsole;
                Configurations.Add(configRelease);
            }

            if ((projectOptions != null) && (projectOptions.Attributes["TargetFrameworkVersion"] != null))
            {
                targetFrameworkVersion = projectOptions.Attributes["TargetFrameworkVersion"].Value;
            }

            string binPath;
            if (projectCreateInfo != null)
            {
                Name             = projectCreateInfo.ProjectName;
                binPath          = projectCreateInfo.BinPath;
                defaultNamespace = SanitisePotentialNamespace(projectCreateInfo.ProjectName);
            }
            else
            {
                binPath = ".";
            }

            foreach (DotNetProjectConfiguration dotNetProjectConfig in Configurations)
            {
                dotNetProjectConfig.OutputDirectory = Path.Combine(binPath, dotNetProjectConfig.Name);

                if ((projectOptions != null) && (projectOptions.Attributes["PauseConsoleOutput"] != null))
                {
                    dotNetProjectConfig.PauseConsoleOutput = Boolean.Parse(projectOptions.Attributes["PauseConsoleOutput"].Value);
                }

                if (projectCreateInfo != null)
                {
                    dotNetProjectConfig.OutputAssembly = projectCreateInfo.ProjectName;
                }
            }
        }
Exemplo n.º 36
0
 public GenericProject(ProjectCreateInformation info, XmlElement projectOptions)
 {
     Configurations.Add(CreateConfiguration("Default"));
 }
Exemplo n.º 37
0
 internal protected virtual void OnInitializeFromTemplate(ProjectCreateInformation projectCreateInfo, XmlElement template)
 {
     next.OnInitializeFromTemplate(projectCreateInfo, template);
 }
 public DotNetAssemblyProject(string languageName, ProjectCreateInformation projectCreateInfo, XmlElement projectOptions) :
     base(languageName, projectCreateInfo, projectOptions)
 {
 }
Exemplo n.º 39
0
 public Project CreateProject(ProjectCreateInformation info, XmlElement projectOptions)
 {
     return(new GenericProject(info, projectOptions));
 }
 protected virtual DotNetProject CreateProject(string languageName, ProjectCreateInformation info, XmlElement projectOptions)
 {
     return(new DotNetAssemblyProject(languageName, info, projectOptions));
 }
Exemplo n.º 41
0
 public bool CanCreateSolutionItem(string typeAlias, ProjectCreateInformation info, XmlElement projectOptions)
 {
     return(MSBuildProjectService.CanCreateSolutionItem(typeAlias, info, projectOptions));
 }
 internal protected virtual string OnGetDefaultTargetPlatform(ProjectCreateInformation projectCreateInfo)
 {
     return(next.OnGetDefaultTargetPlatform(projectCreateInfo));
 }
Exemplo n.º 43
0
 protected override void OnInitializeFromTemplate(ProjectCreateInformation projectCreateInfo, XmlElement template)
 {
     Configurations.Add(CreateConfiguration("Default"));
 }