Skip to content

Commit

Permalink
ILMerge into a single .exe file
Browse files Browse the repository at this point in the history
  • Loading branch information
mbdavid committed Sep 25, 2019
1 parent a9214c8 commit 5587238
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 2 deletions.
Binary file added LiteDB.Studio.exe
Binary file not shown.
3 changes: 3 additions & 0 deletions LiteDB.Studio/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public MainForm(string filename)
this.Disconnect();
}
};

// set assembly version on window title
this.Text += $" (v.{typeof(MainForm).Assembly.GetName().Version.ToString()})";
}

private async Task<LiteDatabase> AsyncConnect(ConnectionString connectionString)
Expand Down
16 changes: 16 additions & 0 deletions LiteDB.Studio/LiteDB.Studio.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -335,4 +338,17 @@
<Content Include="LiteDB.Studio.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<UsingTask TaskName="ILMerge.MSBuild.Tasks.ILMerge" AssemblyFile="$(SolutionDir)\packages\ILMerge.MSBuild.Tasks.1.0.0.3\tools\ILMerge.MSBuild.Tasks.dll" />
<Target Name="AfterBuild">
<ItemGroup>
<MergeAsm Include="$(OutputPath)$(TargetFileName)" />
<MergeAsm Include="$(OutputPath)LiteDB.dll" />
</ItemGroup>
<PropertyGroup>
<MergedAssembly>$(SolutionDir)LiteDB.Studio.exe</MergedAssembly>
</PropertyGroup>
<Message Text="ILMerge @(MergeAsm) -&gt; $(MergedAssembly)" Importance="high" />
<ILMerge InputAssemblies="@(MergeAsm)" OutputFile="$(MergedAssembly)" TargetKind="SameAsPrimaryAssembly" />
</Target>

</Project>
Binary file added LiteDB.Studio/LiteDB.Studio.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions LiteDB.Studio/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("0002e0ff-c91f-4b8b-b29b-2a477e184408")]
[assembly: AssemblyVersion("0.5.0.0")]
[assembly: AssemblyFileVersion("0.5.0.0")]
[assembly: AssemblyVersion("0.5.1.0")]
[assembly: AssemblyFileVersion("0.5.1.0")]
2 changes: 2 additions & 0 deletions LiteDB.Studio/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ILMerge" version="2.13.0307" targetFramework="net461" />
<package id="ILMerge.MSBuild.Tasks" version="1.0.0.3" targetFramework="net461" />
<package id="LiteDB" version="5.0.0-alpha2" targetFramework="net461" />
</packages>

0 comments on commit 5587238

Please sign in to comment.