diff --git a/src/UpdateAssemblyDescription/App.config b/src/UpdateAssemblyDescription/App.config
new file mode 100644
index 000000000..8e1564635
--- /dev/null
+++ b/src/UpdateAssemblyDescription/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/UpdateAssemblyDescription/CommandLineRunner.cs b/src/UpdateAssemblyDescription/CommandLineRunner.cs
new file mode 100644
index 000000000..f50a3c30a
--- /dev/null
+++ b/src/UpdateAssemblyDescription/CommandLineRunner.cs
@@ -0,0 +1,43 @@
+using System.Diagnostics;
+
+namespace UpdateAssemblyDescription
+{
+ public class CommandLineRunner
+ {
+ public string Result { get; set; }
+
+ public bool RunCommandAndGetOutput(string command, string arguments, string workingFolder)
+ {
+ var p = new Process();
+ p.StartInfo.FileName = command;
+ p.StartInfo.Arguments = arguments;
+ p.StartInfo.WorkingDirectory = workingFolder;
+ p.StartInfo.UseShellExecute = false;
+ p.StartInfo.RedirectStandardInput = true;
+ p.StartInfo.RedirectStandardOutput = true;
+ p.StartInfo.CreateNoWindow = true;
+ p.OutputDataReceived += _mplayer_OutputDataReceived;
+
+ try
+ {
+ p.Start();
+ }
+ catch
+ {
+ return false;
+ }
+ p.BeginOutputReadLine(); // Async reading of output to prevent deadlock
+ if (p.WaitForExit(9000))
+ {
+ return true;
+ }
+ return false;
+ }
+
+ void _mplayer_OutputDataReceived(object sender, DataReceivedEventArgs e)
+ {
+ if (e != null && e.Data != null)
+ Result = e.Data;
+ }
+ }
+}
diff --git a/src/UpdateAssemblyDescription/Program.cs b/src/UpdateAssemblyDescription/Program.cs
new file mode 100644
index 000000000..dd11a681d
--- /dev/null
+++ b/src/UpdateAssemblyDescription/Program.cs
@@ -0,0 +1,86 @@
+using System;
+using System.IO;
+
+namespace UpdateAssemblyDescription
+{
+ class Program
+ {
+
+ private static string GetGitPath()
+ {
+ string p = Path.Combine(Environment.GetEnvironmentVariable("ProgramFiles"), @"Git\bin\git.exe");
+ if (File.Exists(p))
+ return p;
+
+ p = Path.Combine(Environment.GetEnvironmentVariable("ProgramFiles(x86)"), @"Git\bin\git.exe");
+ if (File.Exists(p))
+ return p;
+
+ p = @"C:\Program Files\Git\bin\git.exe";
+ if (File.Exists(p))
+ return p;
+
+ p = @"C:\Program Files (x86)\Git\bin\git.exe";
+ if (File.Exists(p))
+ return p;
+
+ p = @"C:\Git\bin\git.exe";
+ if (File.Exists(p))
+ return p;
+
+ return "git";
+ }
+
+ private static void DoUpdateAssemblyDescription(string gitHash, string template, string target)
+ {
+ string templateData = File.ReadAllText(template);
+ string fixedData = templateData.Replace("[GITHASH]", gitHash);
+ File.WriteAllText(target, fixedData);
+ }
+
+ static int Main(string[] args)
+ {
+ string errorFileName = System.Reflection.Assembly.GetEntryAssembly().Location.Replace(".exe", "_error.txt");
+
+ if (args.Length != 2)
+ {
+ Console.WriteLine("UpdateAssemblyDescription 0.9");
+ Console.WriteLine("UpdateAssemblyDescription ");
+ File.WriteAllText(errorFileName, "Wrong number of arguments: " + args.Length);
+ return 1;
+ }
+
+ string workingFolder = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location);
+ string template = args[0];
+ string target = args[1];
+
+ var clr = new CommandLineRunner();
+ var rc = clr.RunCommandAndGetOutput(GetGitPath(), "rev-parse --verify HEAD", workingFolder);
+ if (rc)
+ {
+ try
+ {
+ DoUpdateAssemblyDescription(clr.Result, template, target);
+ return 0;
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e.Message);
+ File.WriteAllText(errorFileName, e.Message);
+ }
+ }
+ else
+ {
+ Console.WriteLine("Error running Git");
+ Console.WriteLine(" - git folder: " + workingFolder);
+ Console.WriteLine(" - template: " + template);
+ Console.WriteLine(" - target: " + target);
+ File.WriteAllText(errorFileName, " - git folder: " + workingFolder + Environment.NewLine +
+ " - template: " + template + Environment.NewLine +
+ " - target: " + target);
+ }
+ return 1;
+ }
+
+ }
+}
diff --git a/src/UpdateAssemblyDescription/Properties/AssemblyInfo.cs b/src/UpdateAssemblyDescription/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..4aac439cc
--- /dev/null
+++ b/src/UpdateAssemblyDescription/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("UpdateAssemblyDescription")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("UpdateAssemblyDescription")]
+[assembly: AssemblyCopyright("Copyright © 2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("07219928-b0da-484d-a7de-b3d9470e2e57")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/UpdateAssemblyDescription/UpdateAssemblyDescription.csproj b/src/UpdateAssemblyDescription/UpdateAssemblyDescription.csproj
new file mode 100644
index 000000000..d9d106e4f
--- /dev/null
+++ b/src/UpdateAssemblyDescription/UpdateAssemblyDescription.csproj
@@ -0,0 +1,59 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {DBD4656C-5F40-4067-A70B-C4460DE20F77}
+ Exe
+ Properties
+ UpdateAssemblyDescription
+ UpdateAssemblyDescription
+ v4.5
+ 512
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file