private string CreateProjectFile(AnalysisConfig config, string projectSnippet) { var projectDirectory = TestUtils.CreateTestSpecificFolderWithSubPaths(TestContext); var targetTestUtils = new TargetsTestsUtils(TestContext); var projectTemplate = targetTestUtils.GetProjectTemplate(config, projectDirectory, null, projectSnippet, null); return(targetTestUtils.CreateProjectFile(projectDirectory, projectTemplate)); }
private BuildLog CreateProjectAndLoad(string projectSnippet) { projectSnippet += @"<Target Name=""DoNothing"" />"; var projectDirectory = TestUtils.CreateTestSpecificFolderWithSubPaths(TestContext); var targetTestUtils = new TargetsTestsUtils(TestContext); var projectTemplate = targetTestUtils.GetProjectTemplate(null, projectDirectory, null, projectSnippet); var projectFile = targetTestUtils.CreateProjectFile(projectDirectory, projectTemplate); return(BuildRunner.BuildTargets(TestContext, projectFile, "DoNothing")); }
private string CreateProjectFile(AnalysisConfig config, string projectSnippet) { var afterTargets = string.Join(";", TargetConstants.SetRoslynResultsTarget, TargetConstants.OverrideRoslynAnalysisTarget, TargetConstants.SetRoslynAnalysisPropertiesTarget ); var projectDirectory = TestUtils.CreateTestSpecificFolderWithSubPaths(TestContext); var targetTestUtils = new TargetsTestsUtils(TestContext); var projectTemplate = targetTestUtils.GetProjectTemplate(config, projectDirectory, TestSpecificProperties, projectSnippet, TestSpecificImport); targetTestUtils.CreateCaptureDataTargetsFile(projectDirectory, afterTargets); return(targetTestUtils.CreateProjectFile(projectDirectory, projectTemplate)); }