예제 #1
0
        /// <param name="solutionFile">Full path to solution file (.sln)</param>
        /// <param name="properties">Solution properties / global properties for all project collection</param>
        public IsolatedEnv(string solutionFile, TProp properties)
        {
            SolutionFile        = solutionFile;
            SolutionPath        = Path.GetDirectoryName(SolutionFile);
            SolutionFileName    = Path.GetFileNameWithoutExtension(SolutionFile);

            _sln = (new Sln.Parser()).parse(SolutionFile);

            if(String.IsNullOrEmpty(StartupProjectString)) {
                updateStartupProject(null);
            }
            IsOpenedSolution = true;

            slnProperties = propertiesByDefault(properties);
            foreach(KeyValuePair<string, string> property in properties) {
                ProjectCollection.GlobalProjectCollection.SetGlobalProperty(property.Key, property.Value);
            }
        }
        /// <param name="solutionFile">Full path to solution file (.sln)</param>
        /// <param name="properties">Solution properties / global properties for all project collection</param>
        public IsolatedEnv(string solutionFile, TProp properties)
        {
            SolutionFile     = solutionFile;
            SolutionPath     = Path.GetDirectoryName(SolutionFile);
            SolutionFileName = Path.GetFileNameWithoutExtension(SolutionFile);

            _sln = (new Sln.Parser()).parse(SolutionFile);

            if (String.IsNullOrEmpty(StartupProjectString))
            {
                updateStartupProject(null);
            }
            IsOpenedSolution = true;

            slnProperties = propertiesByDefault(properties);
            foreach (KeyValuePair <string, string> property in properties)
            {
                ProjectCollection.GlobalProjectCollection.SetGlobalProperty(property.Key, property.Value);
            }
        }