public Executable(ProjectContext context, OutputPaths outputPaths, LibraryExporter exporter) { _context = context; _outputPaths = outputPaths; _runtimeOutputPath = outputPaths.RuntimeOutputPath; _intermediateOutputPath = outputPaths.IntermediateOutputDirectoryPath; _exporter = exporter; }
public Executable(ProjectContext context, OutputPaths outputPaths, LibraryExporter exporter, string configuration) { _context = context; _outputPaths = outputPaths; _runtimeOutputPath = outputPaths.RuntimeOutputPath; _intermediateOutputPath = outputPaths.IntermediateOutputDirectoryPath; _exporter = exporter; _compilerOptions = _context.ProjectFile.GetCompilerOptions(_context.TargetFramework, configuration); }
private void CopyCompilationOutput(OutputPaths outputPaths) { var dest = outputPaths.RuntimeOutputPath; var source = outputPaths.CompilationOutputPath; foreach (var file in outputPaths.CompilationFiles.All()) { var destFileName = file.Replace(source, dest); var directoryName = Path.GetDirectoryName(destFileName); if (!Directory.Exists(directoryName)) { Directory.CreateDirectory(directoryName); } File.Copy(file, destFileName, true); } }
public Executable(ProjectContext context, OutputPaths outputPaths, LibraryExporter exporter) { _context = context; _outputPaths = outputPaths; _exporter = exporter; }
private void CopyCompilationOutput(OutputPaths outputPaths) { var dest = outputPaths.RuntimeOutputPath; var source = outputPaths.CompilationOutputPath; // No need to copy if dest and source are the same if(string.Equals(dest, source, StringComparison.OrdinalIgnoreCase)) { return; } foreach (var file in outputPaths.CompilationFiles.All()) { var destFileName = file.Replace(source, dest); var directoryName = Path.GetDirectoryName(destFileName); if (!Directory.Exists(directoryName)) { Directory.CreateDirectory(directoryName); } File.Copy(file, destFileName, true); } }
/// <summary> /// Filters which export's RuntimeAssets should get copied to the output path. /// </summary> /// <returns> /// True if the asset should be copied to the output path; otherwise, false. /// </returns> private static bool ShouldCopyExportRuntimeAsset(ProjectContext context, OutputPaths buildOutputPaths, LibraryExport export, LibraryAsset asset) { // The current project has the host .exe in its runtime assets, but it shouldn't be copied // to the output path during publish. The host will come from the export that has the real host in it. if (context.RootProject.Identity == export.Library.Identity) { if (asset.ResolvedPath == buildOutputPaths.RuntimeFiles.Executable) { return false; } } return true; }
public Executable(ProjectContext context, OutputPaths outputPaths, LibraryExporter exporter, string configuration) : this(context, outputPaths, outputPaths.RuntimeOutputPath, outputPaths.IntermediateOutputDirectoryPath, exporter, configuration) { }