Esempio n. 1
0
        public override SolutionItemConfiguration CreateConfiguration(string name)
        {
            DotNetProjectConfiguration conf = new DotNetProjectConfiguration(name);
            string dir;

            if (conf.Platform.Length == 0)
            {
                dir = Path.Combine("bin", conf.Name);
            }
            else
            {
                dir = Path.Combine(Path.Combine("bin", conf.Platform), conf.Name);
            }

            conf.OutputDirectory = String.IsNullOrEmpty(BaseDirectory) ? dir : Path.Combine(BaseDirectory, dir);
            conf.OutputAssembly  = Name;
            if (LanguageBinding != null)
            {
                XmlElement xconf = null;
                if (!string.IsNullOrEmpty(conf.Platform))
                {
                    XmlDocument doc = new XmlDocument();
                    xconf = doc.CreateElement("Options");
                    xconf.SetAttribute("Platform", conf.Platform);
                }
                conf.CompilationParameters = LanguageBinding.CreateCompilationParameters(xconf);
            }
            return(conf);
        }
Esempio n. 2
0
 public override bool IsCompileable(string fileName)
 {
     if (LanguageBinding == null)
     {
         return(false);
     }
     return(LanguageBinding.IsSourceCodeFile(fileName));
 }
Esempio n. 3
0
 public virtual bool SupportsFramework(TargetFramework framework)
 {
     if (LanguageBinding == null)
     {
         return(false);
     }
     ClrVersion[] versions = LanguageBinding.GetSupportedClrVersions();
     if (versions != null && versions.Length > 0 && framework != null)
     {
         foreach (ClrVersion v in versions)
         {
             if (v == framework.ClrVersion)
             {
                 return(true);
             }
         }
     }
     return(false);
 }