예제 #1
0
 public void RefreshProject()
 {
     if (File.Exists(PathToProjectFile))
     {
         try
         {
             _pf = new ProjectFile(PathToProjectFile, Logs.MainLog)
             {
                 Configuration    = "Release",
                 PlatformTarget   = "x86",
                 ReferencesPath   = Directories.CoreDirectory,
                 UpdateReferences = true,
                 PostbuildEvent   = true,
                 PrebuildEvent    = true,
                 ResetOutputPath  = true
             };
             _pf.Change();
             _project = _pf.Project;
         }
         catch (Exception e)
         {
             Utility.Log(LogStatus.Error, "Builder", "Error: " + e, Logs.MainLog);
         }
     }
 }
        public Project GetProject()
        {
            if (File.Exists(this.PathToProjectFile))
            {
                try
                {
                    var pf = new ProjectFile(this.PathToProjectFile, Logs.MainLog)
                    {
                        Configuration  = Config.Instance.EnableDebug ? "Debug" : "Release",
                        PlatformTarget = "x86",
                        ReferencesPath = Directories.CoreDirectory
                    };
                    pf.Change();

                    return(pf.Project);
                }
                catch (Exception e)
                {
                    Utility.Log(LogStatus.Error, "Builder", "Error: " + e, Logs.MainLog);
                }
            }
            return(null);
        }
        public Project GetProject()
        {
            if (File.Exists(PathToProjectFile))
            {
                try
                {
                    var pf = new ProjectFile(PathToProjectFile, Logs.MainLog)
                    {
                        Configuration    = "Release",
                        PlatformTarget   = "x86",
                        ReferencesPath   = Directories.CoreDirectory,
                        UpdateReferences = true,
                        PostbuildEvent   = true,
                        PrebuildEvent    = true,
                        ResetOutputPath  = true
                    };
                    pf.Change();

                    /* _pathToBinary =
                     *   Path.Combine(
                     *       (Type == AssemblyType.Library ? Directories.CoreDirectory : Directories.AssembliesDir),
                     *       (Type == AssemblyType.Library ? "" : PathToProjectFile.GetHashCode().ToString("X")) +
                     *       Path.GetFileName(Compiler.GetOutputFilePath(pf.Project)));
                     *
                     * _type = pf.Project.GetPropertyValue("OutputType").ToLower().Contains("exe")
                     *   ? AssemblyType.Executable
                     *   : AssemblyType.Library;*/

                    return(pf.Project);
                }
                catch (Exception e)
                {
                    Utility.Log(LogStatus.Error, "Builder", "Error: " + e, Logs.MainLog);
                }
            }
            return(null);
        }
        public Project GetProject()
        {
            if (File.Exists(this.PathToProjectFile))
            {
                try
                {
                    var pf = new ProjectFile(this.PathToProjectFile, Logs.MainLog)
                        {
                            Configuration = "Release",
                            PlatformTarget = "x86",
                            ReferencesPath = Directories.CoreDirectory,
                            UpdateReferences = true,
                            PostbuildEvent = true,
                            PrebuildEvent = true,
                            ResetOutputPath = true
                        };
                    pf.Change();

                    /* _pathToBinary =
                        Path.Combine(
                            (Type == AssemblyType.Library ? Directories.CoreDirectory : Directories.AssembliesDir),
                            (Type == AssemblyType.Library ? "" : PathToProjectFile.GetHashCode().ToString("X")) +
                            Path.GetFileName(Compiler.GetOutputFilePath(pf.Project)));

                    _type = pf.Project.GetPropertyValue("OutputType").ToLower().Contains("exe")
                        ? AssemblyType.Executable
                        : AssemblyType.Library;*/

                    return pf.Project;
                }
                catch (Exception e)
                {
                    Utility.Log(LogStatus.Error, "Builder", "Error: " + e, Logs.MainLog);
                }
            }
            return null;
        }
        public Project GetProject()
        {
            if (File.Exists(this.PathToProjectFile))
            {
                try
                {
                    var pf = new ProjectFile(this.PathToProjectFile, Logs.MainLog)
                        {
                            Configuration = Config.Instance.EnableDebug ? "Debug" : "Release",
                            PlatformTarget = "x86",
                            ReferencesPath = Directories.CoreDirectory
                        };
                    pf.Change();

                    return pf.Project;
                }
                catch (Exception e)
                {
                    Utility.Log(LogStatus.Error, "Builder", "Error: " + e, Logs.MainLog);
                }
            }
            return null;
        }