From f3aafa276adf48d4f968a025303cbf6a876f69f5 Mon Sep 17 00:00:00 2001 From: icedream Date: Sun, 4 Jan 2015 14:05:46 +0100 Subject: [PATCH] Use Costura.Fody to merge all libraries into one assembly. --- src/updater/CitizenMP Server Updater.csproj | 59 ++++++++++++++++++++- src/updater/FodyWeavers.xml | 4 ++ src/updater/packages.config | 2 + 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 src/updater/FodyWeavers.xml diff --git a/src/updater/CitizenMP Server Updater.csproj b/src/updater/CitizenMP Server Updater.csproj index 4c7f551..c478491 100644 --- a/src/updater/CitizenMP Server Updater.csproj +++ b/src/updater/CitizenMP Server Updater.csproj @@ -12,7 +12,7 @@ citimp_upd v4.0 512 - 4fcb3eee + d8335321 @@ -79,12 +79,69 @@ + + + costura64/%(RecursiveDir)%(Filename)%(Extension) + PreserveNewest + + + costura64/%(RecursiveDir)%(Filename)%(Extension) + PreserveNewest + + + costura32/%(RecursiveDir)%(Filename)%(Extension) + PreserveNewest + + + costura32/%(RecursiveDir)%(Filename)%(Extension) + PreserveNewest + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + + + + + + + (); +var attribute = config.Attribute("ExcludeAssemblies"); +if (attribute != null) + foreach (var item in attribute.Value.Split('|').Select(x => x.Trim()).Where(x => x != string.Empty)) + excludedAssemblies.Add(item); +var element = config.Element("ExcludeAssemblies"); +if (element != null) + foreach (var item in element.Value.Split(new[] { "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries).Select(x => x.Trim()).Where(x => x != string.Empty)) + excludedAssemblies.Add(item); + +var filesToCleanup = Files.Select(f => f.ItemSpec).Where(f => !excludedAssemblies.Contains(Path.GetFileNameWithoutExtension(f), StringComparer.InvariantCultureIgnoreCase)); + +foreach (var item in filesToCleanup) + File.Delete(item); +]]> + + + +