data = (IDictionary)new JavaScriptSerializer().DeserializeObject(json); IDictionary version = (IDictionary)data["Version"]; // Store our version numbers for ease of use int major = (int)version["MajorVersion"]; int minor = (int)version["MinorVersion"]; int patch = (int)version["PatchVersion"]; string fileName = String.Format("{0}-{1}.{2}.{3}.zip", ModName, major, minor, patch); // clear old zip file if present string zipPath = Path.Combine(OutputFolderPath, fileName); if (File.Exists(zipPath)) File.Delete(zipPath); // create zip file using (Stream zipStream = new FileStream(zipPath, FileMode.Create, FileAccess.Write)) using (ZipArchive archive = new ZipArchive(zipStream, ZipArchiveMode.Create)) { foreach (ITaskItem file in Files) { // get file info string filePath = file.ItemSpec; string entryName = ModName + '/' + file.GetMetadata("RecursiveDir") + file.GetMetadata("Filename") + file.GetMetadata("Extension"); if (new FileInfo(filePath).Directory.Name.Equals("i18n", StringComparison.InvariantCultureIgnoreCase)) entryName = Path.Combine("i18n", entryName); // add to zip using (Stream fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read)) using (Stream fileStreamInZip = archive.CreateEntry(entryName).Open()) { fileStream.CopyTo(fileStreamInZip); } } } return true; } catch (Exception ex) { Log.LogErrorFromException(ex); return false; } ]]> $(HOME)/GOG Games/Stardew Valley/game $(HOME)/.local/share/Steam/steamapps/common/Stardew Valley /Applications/Stardew Valley.app/Contents/MacOS $(HOME)/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\GOG.com\Games\1453375253', 'PATH', null, RegistryView.Registry32)) $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 413150', 'InstallLocation', null, RegistryView.Registry64, RegistryView.Registry32)) false false false false $(GamePath)\Stardew Valley.exe false $(GamePath)\StardewModdingAPI.exe false $(GamePath)\xTile.dll false False Program $(GamePath)\StardewModdingAPI.exe $(GamePath) $(GamePath)\MonoGame.Framework.dll false False $(GamePath)\StardewValley.exe false $(GamePath)\StardewModdingAPI.exe false $(GamePath)\xTile.dll false $(GamePath)\Mods\$(DeployModFolderName)