void CreateProject() { fakeMSBuildProject = ProjectHelper.CreateTestProject(); fakeMSBuildProject.SetProperty("TargetFrameworkIdentifier", null); fakeMSBuildProject.SetProperty("TargetFrameworkVersion", "v4.0"); fakeMSBuildProject.SetProperty("TargetFrameworkProfile", null); CreateProject(fakeMSBuildProject); }
void CreateMSBuildProject(string fileName) { msbuildProject = ProjectHelper.CreateTestProject(); msbuildProject.FileName = new FileName(fileName); msbuildProject.SetProperty("ProjectTypeGuids", null); }
public void TargetFramework_TargetFrameworkVersion40DefinedInProject_ReturnsFullDotNetFramework40() { fakeMSBuildProject = ProjectHelper.CreateTestProject(); fakeMSBuildProject.SetProperty("TargetFrameworkIdentifier", null); fakeMSBuildProject.SetProperty("TargetFrameworkVersion", "v4.0"); fakeMSBuildProject.SetProperty("TargetFrameworkProfile", null); CreateProject(fakeMSBuildProject); var expectedName = new FrameworkName(".NETFramework, Version=v4.0"); FrameworkName targetFramework = project.TargetFramework; Assert.AreEqual(expectedName, targetFramework); }