예제 #1
0
        public ProjectGeneratorWrap Prepare(string testDir1, string TestProject1, string output)
        {
            this.OutputDir = output;
            Paths.SolutionDestinationFolder = this.OutputDir;

            var gen = new ProjectGenerator(testDir1, output);
            ProjectGenerator = gen;

            gen.SetProjectFilePath(TestProject1);
            gen.SetSolutionGenerator(new SolutionGenerator(TestProject1, output));
            Assert.IsTrue(File.Exists(gen.ProjectFilePath));
            Assert.IsTrue(File.Exists(gen.SolutionGenerator.ProjectFilePath));

            Projects.Add(TestProject1);

            // the latest set of environment variables.
            var projectCollection = new ProjectCollection();
            this.msbuildProject = new Project(
                gen.ProjectFilePath,
                null,
                null,
                projectCollection,
                ProjectLoadSettings.IgnoreMissingImports);

            this.msbuildSupport = new MSBuildSupport(gen);

            Title = Path.GetFileNameWithoutExtension(gen.ProjectFilePath);
            DestinationFileName = Path.Combine(gen.ProjectDestinationFolder, Title) + ".html";
            return this;
        }