Browse Source

Fix #283 - Crash when adding new folder/file to project

pull/297/head
Daniel Grunwald 12 years ago
parent
commit
58824cba01
  1. 2
      src/AddIns/Misc/PackageManagement/Project/Src/RestorePackagesCommand.cs
  2. 8
      src/AddIns/VersionControl/GitAddIn/Src/Git.cs
  3. 4
      src/Main/Base/Project/Templates/ProjectTemplate.cs

2
src/AddIns/Misc/PackageManagement/Project/Src/RestorePackagesCommand.cs

@ -56,7 +56,7 @@ namespace ICSharpCode.PackageManagement @@ -56,7 +56,7 @@ namespace ICSharpCode.PackageManagement
var runner = new ProcessRunner();
runner.WorkingDirectory = Path.GetDirectoryName(solution.FileName);
runner.RunInOutputPadAsync(outputMessagesView.OutputCategory, commandLine.Command, commandLine.Arguments);
runner.RunInOutputPadAsync(outputMessagesView.OutputCategory, commandLine.Command, commandLine.Arguments).FireAndForget();
}
}
}

8
src/AddIns/VersionControl/GitAddIn/Src/Git.cs

@ -66,9 +66,12 @@ namespace ICSharpCode.GitAddIn @@ -66,9 +66,12 @@ namespace ICSharpCode.GitAddIn
public static Task<int> RunGitAsync(string workingDir, params string[] arguments)
{
string git = FindGit();
if (git == null)
return Task.FromResult(9009);
ProcessRunner p = new ProcessRunner();
p.WorkingDirectory = workingDir;
return p.RunInOutputPadAsync(GitMessageView.Category, "git", arguments);
return p.RunInOutputPadAsync(GitMessageView.Category, git, arguments);
}
/// <summary>
@ -92,7 +95,8 @@ namespace ICSharpCode.GitAddIn @@ -92,7 +95,8 @@ namespace ICSharpCode.GitAddIn
// ignore invalid entries in PATH
}
}
string gitExe = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86, Environment.SpecialFolderOption.DoNotVerify), "bin\\git.exe");
string programFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86, Environment.SpecialFolderOption.DoNotVerify);
string gitExe = Path.Combine(programFiles, @"git\bin\git.exe");
if (File.Exists(gitExe))
return gitExe;
return null;

4
src/Main/Base/Project/Templates/ProjectTemplate.cs

@ -30,9 +30,9 @@ namespace ICSharpCode.SharpDevelop.Templates @@ -30,9 +30,9 @@ namespace ICSharpCode.SharpDevelop.Templates
/// <summary>
/// Creates projects from the template; and adds them to the solution specified in the parameter object.
/// </summary>
/// <param name="options">Paramter object used to pass options for the template creation.</param>
/// <param name="options">Parameter object used to pass options for the template creation.</param>
/// <returns>
/// Returns a result object that describes the project that were created;
/// Returns a result object that describes the projects that were created;
/// or null if the operation was aborted.
/// </returns>
/// <exception cref="IOException">Error writing the projects to disk</exception>

Loading…
Cancel
Save