Skip to content

Commit

Permalink
Fixed wrong SharpZipLib package version for net472 build.
Browse files Browse the repository at this point in the history
  • Loading branch information
genemars committed Dec 26, 2022
1 parent ebbe901 commit 786c35f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions MIG.HomeAutomation/MIG.HomeAutomation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
<TargetFrameworks>net472;net6.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<PackageReference Include="SharpZipLib" Version="1.3.1" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="CM19Lib" Version="1.2.1" />
<PackageReference Include="MIG" Version="1.2.3" />
Expand Down
5 changes: 5 additions & 0 deletions MIG.HomeAutomation/ZWave/Pepper1Db.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Xml.Linq;
using System.Xml.XPath;
using ICSharpCode.SharpZipLib.Core;
Expand Down Expand Up @@ -149,7 +150,11 @@ private static void ExtractZipFile(string archiveFilenameIn, string password, st
{
FileStream fs = File.OpenRead(archiveFilenameIn);
zf = new ZipFile(fs);
#if !NETCOREAPP
ZipStrings.CodePage = Encoding.UTF8.CodePage;
#else
zf.StringCodec = StringCodec.FromCodePage(System.Text.Encoding.UTF8.CodePage);
#endif
if (!String.IsNullOrEmpty(password))
{
zf.Password = password; // AES encrypted entries are handled automatically
Expand Down
2 changes: 1 addition & 1 deletion MIG.HomeAutomation/nuget_pack.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if (-not ([string]::IsNullOrEmpty($versionStr))) {

$content | Out-File $root\$project\$project.csproj

& dotnet pack $root\$project -o .
& dotnet pack -c release $root\$project -o .
}
else {
Write-Host "Version string is empty, possibly dry run or APPVEYOR_REPO_TAG_NAME environment variable is not set"
Expand Down

0 comments on commit 786c35f

Please sign in to comment.