$(MSBuildProjectDirectory) $([System.IO.Path]::Combine($(SolutionDir), ".nuget")) $(NuGetToolsPath)\nuget.exe $([System.IO.Path]::Combine($(ProjectDir), "packages.config")) $([System.IO.Path]::Combine($(SolutionDir), "packages")) $(TargetDir.Trim('\\')) "" false false "$(NuGetExePath)" install "$(PackagesConfig)" -source $(PackageSources) -o "$(PackagesDir)" "$(NuGetExePath)" pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols RestorePackages; $(BuildDependsOn); $(BuildDependsOn); BuildPackage; p.Uri.ToString().ToLowerInvariant() == "/tools/nuget.exe").Single(); using (Stream inputStream = exePart.GetStream(FileMode.Open, FileAccess.Read)) using (Stream outputStream = File.Create(exeTempPath)) { byte[] buffer = new byte[16384]; while (true) { int read = inputStream.Read(buffer, 0, buffer.Length); if (read == 0) { break; } outputStream.Write(buffer, 0, read); } } } if (!File.Exists(OutputFilename)) { File.Copy(exeTempPath, OutputFilename); } return true; } catch (Exception ex) { Log.LogErrorFromException(ex); return false; } finally { if (exeTempPath != null) File.Delete(exeTempPath); if (zipTempPath != null) File.Delete(zipTempPath); } ]]>