diff --git a/TuesPechkin.TestFormsApp/MainForm.cs b/TuesPechkin.TestFormsApp/MainForm.cs
index 3711250..c1c1837 100644
--- a/TuesPechkin.TestFormsApp/MainForm.cs
+++ b/TuesPechkin.TestFormsApp/MainForm.cs
@@ -14,11 +14,7 @@ public partial class MainForm : Form
new StandardConverter(
new PdfToolset(
new Win64EmbeddedDeployment(
- new StaticDeployment(
- Path.Combine(
- Path.GetTempPath(),
- Guid.NewGuid().ToString(),
- "wkhtmltox.dll")))));
+ new TempFolderDeployment())));
private HtmlToPdfDocument Document = new HtmlToPdfDocument
{
diff --git a/TuesPechkin/EmbeddedDeployment.cs b/TuesPechkin/EmbeddedDeployment.cs
index 4ae55ce..434fe60 100644
--- a/TuesPechkin/EmbeddedDeployment.cs
+++ b/TuesPechkin/EmbeddedDeployment.cs
@@ -10,22 +10,20 @@ public abstract class EmbeddedDeployment : IDeployment
{
public virtual string Path
{
- get
+ get
{
- if (!deployed)
- {
- foreach (var nameAndContents in GetContents())
- {
- var filename = System.IO.Path.Combine(
- physical.Path,
- nameAndContents.Key);
+ var path = System.IO.Path.Combine(physical.Path, PathModifier ?? string.Empty);
- var path = System.IO.Path.GetDirectoryName(filename);
+ if (!deployed)
+ {
+ if (!Directory.Exists(path))
+ {
+ Directory.CreateDirectory(path);
+ }
- if (!Directory.Exists(path))
- {
- Directory.CreateDirectory(path);
- }
+ foreach (var nameAndContents in GetContents())
+ {
+ var filename = System.IO.Path.Combine(path, nameAndContents.Key);
if (!File.Exists(filename))
{
@@ -36,10 +34,20 @@ public virtual string Path
deployed = true;
}
+ // In 2.2.0 needs to return path
return physical.Path;
}
}
+ // Embedded deployments need to override this instead in 2.2.0
+ protected virtual string PathModifier
+ {
+ get
+ {
+ return this.GetType().Assembly.GetName().Version.ToString();
+ }
+ }
+
public EmbeddedDeployment(IDeployment physical)
{
if (physical == null)
diff --git a/TuesPechkin/Properties/AssemblyInfo.cs b/TuesPechkin/Properties/AssemblyInfo.cs
index ae2a9c4..bdb9f87 100644
--- a/TuesPechkin/Properties/AssemblyInfo.cs
+++ b/TuesPechkin/Properties/AssemblyInfo.cs
@@ -6,7 +6,7 @@
[assembly: AssemblyDescription(".NET wrapper for wkhtmltopdf; supports 32-bit, 64-bit, multi-threaded and IIS environments.")]
[assembly: AssemblyProduct("TuesPechkin")]
[assembly: AssemblyCopyright("Copyright 2014 Derek Gray")]
-[assembly: AssemblyVersion("2.1.0")]
+[assembly: AssemblyVersion("2.1.1")]
[assembly: ComVisible(false)]
[assembly: Guid("11f63696-7105-436d-9ec6-2fee54c40b11")]
diff --git a/TuesPechkin/TuesPechkin.csproj b/TuesPechkin/TuesPechkin.csproj
index 7ef2449..4f1505f 100644
--- a/TuesPechkin/TuesPechkin.csproj
+++ b/TuesPechkin/TuesPechkin.csproj
@@ -87,6 +87,9 @@
+
+
+