public static GetFrameworkType ( string projectPath ) : string | ||
projectPath | string | |
리턴 | string |
void Configure(ConfigureWindowModel model, Project project) { var directoryInfo = fullPathResolver.GetFullPath(model.ToolsDirectory, project); var targetFile = new FileInfo(Path.Combine(directoryInfo.FullName, "NotifyPropertyWeaverMsBuildTask.dll")); if (!targetFile.Exists || VersionChecker.IsVersionNewer(targetFile)) { if (!fileExporter.ExportTask(directoryInfo)) { taskFileReplacer.AddFile(directoryInfo); } } if (model.IncludeAttributeAssembly) { var frameworkType = FrameworkTypeReader.GetFrameworkType(project.FullName); fileExporter.ExportAttribute(fullPathResolver.GetFullPath(model.DependenciesDirectory, project), frameworkType); } var defaulter = new Defaulter(); var projectInjector = new NotifyPropertyWeaverProjectInjector { ProjectFile = project.FullName }; defaulter.FromModel(projectInjector, model); projectInjector.Execute(); }
public void ProcessAttributeFile(Project project) { var dependenciesDirectory = ProjectReader.GetDependenciesDirectory(project.FullName); if (dependenciesDirectory == null) { return; } var directoryInfo = fullPathResolver.GetFullPath(dependenciesDirectory, project); var targetFile = new FileInfo(Path.Combine(directoryInfo.FullName, "NotifyPropertyWeaver.dll")); if (!targetFile.Exists) { return; } if (VersionChecker.IsVersionNewer(targetFile)) { var frameworkType = FrameworkTypeReader.GetFrameworkType(project.FullName); fileExporter.ExportAttribute(directoryInfo, frameworkType); } }
public void GetFrameworkType() { Assert.AreEqual("DotNetStandard", FrameworkTypeReader.GetFrameworkType(@"TestProjects\ProjectDotNet.csproj")); Assert.AreEqual("Silverlight", FrameworkTypeReader.GetFrameworkType(@"TestProjects\ProjectSilverlight.csproj")); Assert.AreEqual("Phone", FrameworkTypeReader.GetFrameworkType(@"TestProjects\ProjectPhone.csproj")); }
public void DotNet35() { Assert.AreEqual("DotNet_35", FrameworkTypeReader.GetFrameworkType(@"TestProjects\ProjectDotNet.csproj")); }
public void PCL() { Assert.AreEqual("PCL", FrameworkTypeReader.GetFrameworkType(@"TestProjects\ProjectPCL.csproj")); }
public void Silverlight() { Assert.AreEqual("PCL", FrameworkTypeReader.GetFrameworkType(@"TestProjects\ProjectSilverlight.csproj")); }