Merge assemblies together to single .exe

This commit is contained in:
JustArchi 2015-10-31 06:59:55 +01:00
parent 3ba90e5d6d
commit fed3ac3404
3 changed files with 13 additions and 2 deletions

View file

@ -110,7 +110,18 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>(ROBOCOPY $(ProjectDir)config $(TargetDir)config /S /E) ^&amp; IF %25ERRORLEVEL%25 LEQ 1 exit 0</PostBuildEvent>
<PostBuildEvent>(robocopy $(ProjectDir)config $(TargetDir)config /S /E) ^&amp; IF %25ERRORLEVEL%25 GEQ 2 exit 0
if $(ConfigurationName) == Release (
mkdir "$(TargetDir)out" "$(TargetDir)out\config"
copy "$(TargetDir)config\example.xml" "$(TargetDir)out\config"
"$(SolutionDir)tools\ILMerge.exe" /out:"$(TargetDir)out\ASF.exe" "$(TargetDir)$(TargetName).exe" "$(TargetDir)*.dll" /target:exe /targetplatform:v4,C:\Windows\Microsoft.NET\Framework64\v4.0.30319 /wildcards
DEL "$(TargetDir)out\ASF.pdb"
)</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View file

@ -47,7 +47,7 @@ namespace ArchiSteamFarm {
private static readonly ManualResetEvent ShutdownResetEvent = new ManualResetEvent(false);
private static readonly AssemblyName AssemblyName = Assembly.GetExecutingAssembly().GetName();
private static readonly string ExeName = AssemblyName.Name + ".exe";
private static readonly string Version = AssemblyName.Version.ToString();
private static readonly string Version = AssemblyName.Version.ToString();
private static async Task CheckForUpdate() {
JObject response = await Utilities.UrlToJObject(LatestGithubReleaseURL).ConfigureAwait(false);

BIN
tools/ILMerge.exe Normal file

Binary file not shown.