public NuGetProject CreateNuGetProject(DotNetProject project, INuGetProjectContext context) { Runtime.AssertMainThread(); var projectSystem = new MonoDevelopMSBuildNuGetProjectSystem(project, context); string projectJsonPath = ProjectJsonPathUtilities.GetProjectConfigPath(project.BaseDirectory, project.Name); if (File.Exists(projectJsonPath)) { return(new BuildIntegratedProjectSystem( projectJsonPath, project.FileName, project, projectSystem, project.Name, settings)); } string baseDirectory = GetBaseDirectory(project); string folderNuGetProjectFullPath = PackagesFolderPathUtility.GetPackagesFolderPath(baseDirectory, settings); string packagesConfigFolderPath = project.BaseDirectory; return(new MSBuildNuGetProject( projectSystem, folderNuGetProjectFullPath, packagesConfigFolderPath)); }
public MonoDevelopMSBuildNuGetProject( MonoDevelopMSBuildNuGetProjectSystem projectSystem, string folderNuGetProjectFullPath, string packagesConfigFolderPath) : base(projectSystem, folderNuGetProjectFullPath, packagesConfigFolderPath) { this.projectSystem = projectSystem; }
public NuGetProject CreateNuGetProject(DotNetProject project, INuGetProjectContext context) { Runtime.AssertMainThread(); var nugetAwareProject = project as INuGetAwareProject; if (nugetAwareProject != null) { return(nugetAwareProject.CreateNuGetProject()); } NuGetProject dotNetCoreProject = DotNetCoreNuGetProject.Create(project); if (dotNetCoreProject != null) { return(dotNetCoreProject); } NuGetProject packageReferenceProject = PackageReferenceNuGetProject.Create(project); if (packageReferenceProject != null) { return(packageReferenceProject); } var projectSystem = new MonoDevelopMSBuildNuGetProjectSystem(project, context); string projectJsonPath = ProjectJsonPathUtilities.GetProjectConfigPath(project.BaseDirectory, project.Name); if (File.Exists(projectJsonPath)) { return(new ProjectJsonBuildIntegratedNuGetProject( projectJsonPath, project.FileName, project, settings)); } string baseDirectory = GetBaseDirectory(project); string folderNuGetProjectFullPath = PackagesFolderPathUtility.GetPackagesFolderPath(baseDirectory, settings); string packagesConfigFolderPath = project.BaseDirectory; return(new MonoDevelopMSBuildNuGetProject( projectSystem, folderNuGetProjectFullPath, packagesConfigFolderPath)); }