From a88a413571f0f114e6eb47bf7438fb3ffcf15b72 Mon Sep 17 00:00:00 2001
From: Siegfried Pammer <siegfriedpammer@gmail.com>
Date: Sun, 3 Apr 2022 17:34:39 +0200
Subject: [PATCH] Fix DecompilerVersionInfoDependency in ILSpy.Installer.csproj

---
 BuildTools/update-assemblyinfo.ps1     | 3 +--
 ILSpy.Installer/AppPackage.cs          | 9 +++++++++
 ILSpy.Installer/AppPackage.cs.template | 9 ---------
 ILSpy.Installer/ILSpy.Installer.csproj | 1 +
 4 files changed, 11 insertions(+), 11 deletions(-)
 create mode 100644 ILSpy.Installer/AppPackage.cs
 delete mode 100644 ILSpy.Installer/AppPackage.cs.template

diff --git a/BuildTools/update-assemblyinfo.ps1 b/BuildTools/update-assemblyinfo.ps1
index 008c17551..0b5985a34 100644
--- a/BuildTools/update-assemblyinfo.ps1
+++ b/BuildTools/update-assemblyinfo.ps1
@@ -81,8 +81,7 @@ function gitBranch() {
 $templateFiles = (
     @{Input=$decompilerVersionInfoTemplateFile; Output="ICSharpCode.Decompiler/Properties/DecompilerVersionInfo.cs"},
     @{Input="ILSpy.AddIn/source.extension.vsixmanifest.template"; Output = "ILSpy.AddIn/source.extension.vsixmanifest"},
-    @{Input="ILSpy.AddIn.VS2022/source.extension.vsixmanifest.template"; Output = "ILSpy.AddIn.VS2022/source.extension.vsixmanifest"},
-    @{Input="ILSpy.Installer/AppPackage.cs.template"; Output = "ILSpy.Installer/AppPackage.cs"}
+    @{Input="ILSpy.AddIn.VS2022/source.extension.vsixmanifest.template"; Output = "ILSpy.AddIn.VS2022/source.extension.vsixmanifest"}
 );
 
 [string]$mutexId = "ILSpyUpdateAssemblyInfo" + (Get-Location).ToString().GetHashCode();
diff --git a/ILSpy.Installer/AppPackage.cs b/ILSpy.Installer/AppPackage.cs
new file mode 100644
index 000000000..5689aa148
--- /dev/null
+++ b/ILSpy.Installer/AppPackage.cs
@@ -0,0 +1,9 @@
+using System;
+
+namespace ILSpy.Installer
+{
+	internal static class AppPackage
+	{
+		public static Version Version = new Version(DecompilerVersionInfo.Major + "." + DecompilerVersionInfo.Minor + "." + DecompilerVersionInfo.Build + "." + DecompilerVersionInfo.Revision);
+	}
+}
diff --git a/ILSpy.Installer/AppPackage.cs.template b/ILSpy.Installer/AppPackage.cs.template
deleted file mode 100644
index 72ee86765..000000000
--- a/ILSpy.Installer/AppPackage.cs.template
+++ /dev/null
@@ -1,9 +0,0 @@
-using System;
-
-namespace ILSpy.Installer
-{
-	internal static class AppPackage
-	{
-		public static Version Version = new Version("$INSERTVERSION$");
-	}
-}
\ No newline at end of file
diff --git a/ILSpy.Installer/ILSpy.Installer.csproj b/ILSpy.Installer/ILSpy.Installer.csproj
index a6b8353dd..ea84c7c1d 100644
--- a/ILSpy.Installer/ILSpy.Installer.csproj
+++ b/ILSpy.Installer/ILSpy.Installer.csproj
@@ -12,6 +12,7 @@
   </ItemGroup>
 
   <ItemGroup>
+    <ProjectReference Include="..\ICSharpCode.Decompiler\ICSharpCode.Decompiler.csproj" />
     <ProjectReference Include="..\ILSpy\ILSpy.csproj">
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
       <SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>