/// <summary> /// Gets a list of files required to use the project output /// </summary> /// <returns> /// A list of files. /// </returns> /// <param name='configuration'> /// Build configuration for which get the list /// </param> /// <remarks> /// Returns a list of all files that are required to use the project output binary, for example: data files with /// the Copy to Output option, debug information files, generated resource files, etc. /// </remarks> public FileCopySet GetSupportFileList(ConfigurationSelector configuration) { FileCopySet list = new FileCopySet(); Services.ProjectService.GetExtensionChain(this).PopulateSupportFileList(this, list, configuration); return(list); }
/// <summary> /// Gets a list of files required to use the project output /// </summary> /// <returns> /// A list of files. /// </returns> /// <param name='configuration'> /// Build configuration for which get the list /// </param> /// <remarks> /// Returns a list of all files that are required to use the project output binary, for example: data files with /// the Copy to Output option, debug information files, generated resource files, etc. /// </remarks> public FileCopySet GetSupportFileList(ConfigurationSelector configuration) { var list = new FileCopySet(); PopulateSupportFileList(list, configuration); return(list); }
//taken from monodevelop.aspnet.mvc protected override void PopulateSupportFileList(MonoDevelop.Projects.FileCopySet list, ConfigurationSelector solutionConfiguration) { base.PopulateSupportFileList(list, solutionConfiguration); //HACK: workaround for MD not local-copying package references foreach (var projectReference in References) { if (projectReference.Package != null && projectReference.Package.Name == "monomac") { if (projectReference.ReferenceType == ReferenceType.Gac) { foreach (var assem in projectReference.Package.Assemblies) { list.Add(assem.Location); var cfg = (MonoMacProjectConfiguration)solutionConfiguration.GetConfiguration(this); if (cfg.DebugMode) { var mdbFile = TargetRuntime.GetAssemblyDebugInfoFile(assem.Location); if (File.Exists(mdbFile)) { list.Add(mdbFile); } } } } break; } } }
/// <summary> /// Gets a list of files required to use the project output /// </summary> /// <param name='list'> /// List where to add the support files. /// </param> /// <param name='configuration'> /// Build configuration for which get the list /// </param> /// <remarks> /// Returns a list of all files that are required to use the project output binary, for example: data files with /// the Copy to Output option, debug information files, generated resource files, etc. /// </remarks> internal protected virtual void PopulateSupportFileList(FileCopySet list, ConfigurationSelector configuration) { foreach (ProjectFile pf in Files) { if (pf.CopyToOutputDirectory == FileCopyMode.None) { continue; } list.Add(pf.FilePath, pf.CopyToOutputDirectory == FileCopyMode.PreserveNewest, pf.ProjectVirtualPath); } }
protected override void PopulateSupportFileList (MonoDevelop.Projects.FileCopySet list, ConfigurationSelector solutionConfiguration) { base.PopulateSupportFileList (list, solutionConfiguration); //HACK: workaround for MD not local-copying package references foreach (ProjectReference projectReference in References) { if (projectReference.Package != null && projectReference.Package.Name == "system.web.mvc") { if (projectReference.ReferenceType == ReferenceType.Package) foreach (MonoDevelop.Core.Assemblies.SystemAssembly assem in projectReference.Package.Assemblies) list.Add (assem.Location); break; } } }
internal protected virtual void OnPopulateSupportFileList(FileCopySet list, ConfigurationSelector configuration) { next.OnPopulateSupportFileList(list, configuration); }
public override void PopulateSupportFileList(Project project, FileCopySet list, ConfigurationSelector configuration) { project.PopulateSupportFileList(list, configuration); }
public virtual void PopulateSupportFileList(Project project, FileCopySet list, ConfigurationSelector configuration) { GetNext(project).PopulateSupportFileList(project, list, configuration); }
void PopulateSupportFileList(FileCopySet list, ConfigurationSelector configuration, int referenceDistance) { if (referenceDistance < 2) { base.PopulateSupportFileList(list, configuration); } //rename the app.config file FileCopySet.Item appConfig = list.Remove("app.config"); if (appConfig == null) { appConfig = list.Remove("App.config"); } if (appConfig != null) { string output = Path.GetFileName(GetOutputFileName(configuration)); list.Add(appConfig.Src, appConfig.CopyOnlyIfNewer, output + ".config"); } //collect all the "local copy" references and their attendant files foreach (ProjectReference projectReference in References) { if (!projectReference.LocalCopy || ParentSolution == null) { continue; } if (projectReference.ReferenceType == ReferenceType.Project) { DotNetProject p = ParentSolution.FindProjectByName(projectReference.Reference) as DotNetProject; if (p == null) { LoggingService.LogWarning("Project '{0}' referenced from '{1}' could not be found", projectReference.Reference, this.Name); continue; } string refOutput = p.GetOutputFileName(configuration); if (string.IsNullOrEmpty(refOutput)) { LoggingService.LogWarning("Project '{0}' referenced from '{1}' has an empty output filename", p.Name, this.Name); continue; } list.Add(refOutput); //VS COMPAT: recursively copy references's "local copy" files //but only copy the "copy to output" files from the immediate references p.PopulateSupportFileList(list, configuration, referenceDistance + 1); DotNetProjectConfiguration refConfig = p.GetConfiguration(configuration) as DotNetProjectConfiguration; if (refConfig != null && refConfig.DebugMode) { string mdbFile = TargetRuntime.GetAssemblyDebugInfoFile(refOutput); if (File.Exists(mdbFile)) { list.Add(mdbFile); } } } else if (projectReference.ReferenceType == ReferenceType.Assembly) { // VS COMPAT: Copy the assembly, but also all other assemblies referenced by it // that are located in the same folder foreach (string file in GetAssemblyRefsRec(projectReference.Reference, new HashSet <string> ())) { list.Add(file); if (File.Exists(file + ".config")) { list.Add(file + ".config"); } string mdbFile = TargetRuntime.GetAssemblyDebugInfoFile(file); if (File.Exists(mdbFile)) { list.Add(mdbFile); } } } else if (projectReference.ReferenceType == ReferenceType.Custom) { foreach (string refFile in projectReference.GetReferencedFileNames(configuration)) { list.Add(refFile); } } } }
protected override void PopulateSupportFileList(FileCopySet list, ConfigurationSelector configuration) { PopulateSupportFileList(list, configuration, 0); }