private void CopyRuntime() { var runtimePath = Path.Combine(_sdkPath, RuntimeConfiguration.ToLower()); foreach (var sourceFile in Directory.EnumerateFiles(runtimePath)) { var dest = Path.Combine(_distPath, Path.GetFileName(sourceFile)); Log.LogMessage($"Runtime {sourceFile} -> {dest}"); File.Copy(sourceFile, dest, true); } File.Copy(Path.Combine(_sdkPath, "server.py"), Path.Combine(_distPath, "server.py"), true); }
private void CopyContent() { if (Assets != null) { var runtimePath = Path.Combine(_sdkPath, RuntimeConfiguration.ToLower()); foreach (var sourceFile in Assets) { (string fullPath, string relativePath) GetFilePaths() { if (sourceFile.GetMetadata("Link") is string link && !string.IsNullOrEmpty(link)) { // This case is mainly for shared projects return(sourceFile.ItemSpec, link); } else if (sourceFile.GetMetadata("FullPath") is string fullPath && File.Exists(fullPath)) { // This is fore files added explicitly through other targets (e.g. Microsoft.TypeScript.MSBuild) return(fullPath, sourceFile.ToString()); }