Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

Commit 8fcc027

Browse files
Update Nuget packages
Switched to DllExport to set up dllexport since the old DllExport didn't compile
1 parent 22bb461 commit 8fcc027

11 files changed

Lines changed: 107 additions & 138 deletions

NppGZipFileViewer/Main.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,13 @@ internal static void CommandMenuInit()
299299
{
300300
Preferences = Preferences.Deserialize(iniFilePath);
301301
if (Preferences.ShowDepcrecatedWarning)
302-
_ = MessageBox.Show("This plugin is deprecated, please switch to CompressedFileViewer", "Deprecated");
302+
Preferences.ShowDepcrecatedWarning = DialogResult.Yes == MessageBox.Show("The plugin NppGZipFileViewer is deprecated, please switch to CompressedFileViewer.\nShow this message again next time?", "Deprecated", MessageBoxButtons.YesNo);
303303

304304
}
305305
catch
306306
{
307307
Preferences = Preferences.Default;
308-
_ = MessageBox.Show("This plugin is deprecated, please switch to CompressedFileViewer", "Deprecated");
308+
Preferences.ShowDepcrecatedWarning = DialogResult.Yes == MessageBox.Show("The plugin NppGZipFileViewer is deprecated, please switch to CompressedFileViewer.\nShow this message again next time?", "Deprecated", MessageBoxButtons.YesNo);
309309
}
310310

311311

@@ -318,7 +318,7 @@ internal static void CommandMenuInit()
318318
PluginBase.SetCommand(6, "About", OpenAbout);
319319
PluginBase.SetCommand(7, "Credits", OpenCredits);
320320
PluginBase.SetCommand(8, "---", null);
321-
PluginBase.SetCommand(9, "Deprecated", () => MessageBox.Show("This plugin is deprecated, please switch to CompressedFileViewer", "Deprecated"));
321+
PluginBase.SetCommand(9, "Deprecated", () => Preferences.ShowDepcrecatedWarning = DialogResult.Yes == MessageBox.Show("The plugin NppGZipFileViewer is deprecated, please switch to CompressedFileViewer.\nShow this message again next time?", "Deprecated", MessageBoxButtons.YesNo));
322322
PluginBase.SetCommand(10, "---", null);
323323
SetCompressionCommands(11);
324324
SetToolBarIcon();

NppGZipFileViewer/NppGZipFileViewer.csproj

Lines changed: 82 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
<DefineConstants>DEBUG;TRACE</DefineConstants>
7474
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
7575
<DebugType>full</DebugType>
76-
<PlatformTarget>AnyCPU</PlatformTarget>
7776
<LangVersion>latest</LangVersion>
7877
<ErrorReport>prompt</ErrorReport>
7978
<Prefer32Bit>false</Prefer32Bit>
@@ -112,63 +111,80 @@
112111
<LangVersion>latest</LangVersion>
113112
<ErrorReport>prompt</ErrorReport>
114113
</PropertyGroup>
114+
<PropertyGroup>
115+
<DllExportIdent>E148BDFD-44E4-4464-81A0-1CFB9BBD7645</DllExportIdent>
116+
<DllExportMetaLibName>DllExport.dll</DllExportMetaLibName>
117+
<DllExportNamespace>System.Runtime.InteropServices</DllExportNamespace>
118+
<DllExportDDNSCecil>true</DllExportDDNSCecil>
119+
<PlatformTarget>x86</PlatformTarget>
120+
<DllExportOrdinalsBase>1</DllExportOrdinalsBase>
121+
<DllExportGenExpLib>false</DllExportGenExpLib>
122+
<DllExportOurILAsm>false</DllExportOurILAsm>
123+
<DllExportSysObjRebase>false</DllExportSysObjRebase>
124+
<DllExportLeaveIntermediateFiles>false</DllExportLeaveIntermediateFiles>
125+
<DllExportTimeout>30000</DllExportTimeout>
126+
<DllExportPeCheck>6</DllExportPeCheck>
127+
<DllExportPatches>0</DllExportPatches>
128+
<DllExportRefreshObj>true</DllExportRefreshObj>
129+
<DllExportILAsmExternAsm />
130+
<DllExportILAsmTypeRef />
131+
<DllExportTypeRefOptions>0</DllExportTypeRefOptions>
132+
<DllExportRefPackages />
133+
<DllExportPreProcType>0</DllExportPreProcType>
134+
<DllExportPostProcType>0</DllExportPostProcType>
135+
<DllExportDir>$(MSBuildProjectDirectory)\..\</DllExportDir>
136+
</PropertyGroup>
115137
<ItemGroup>
116138
<Reference Include="ICSharpCode.SharpZipLib, Version=1.4.2.13, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
117139
<HintPath>..\packages\SharpZipLib.1.4.2\lib\netstandard2.0\ICSharpCode.SharpZipLib.dll</HintPath>
118140
<Private>False</Private>
119141
</Reference>
120-
<Reference Include="Joveler.Compression.XZ, Version=4.3.0.0, Culture=neutral, processorArchitecture=MSIL">
121-
<HintPath>..\packages\Joveler.Compression.XZ.4.3.0\lib\net46\Joveler.Compression.XZ.dll</HintPath>
142+
<Reference Include="Joveler.Compression.XZ, Version=5.0.2.0, Culture=neutral, processorArchitecture=MSIL">
143+
<HintPath>..\packages\Joveler.Compression.XZ.5.0.2\lib\net462\Joveler.Compression.XZ.dll</HintPath>
122144
</Reference>
123-
<Reference Include="Joveler.DynLoader, Version=2.3.0.0, Culture=neutral, processorArchitecture=MSIL">
124-
<HintPath>..\packages\Joveler.DynLoader.2.3.0\lib\net46\Joveler.DynLoader.dll</HintPath>
145+
<Reference Include="Joveler.DynLoader, Version=2.3.1.0, Culture=neutral, processorArchitecture=MSIL">
146+
<HintPath>..\packages\Joveler.DynLoader.2.3.1\lib\net46\Joveler.DynLoader.dll</HintPath>
125147
</Reference>
126-
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
127-
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
148+
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=10.0.0.8, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
149+
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.10.0.8\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
128150
</Reference>
129-
<Reference Include="SharpCompress, Version=0.34.2.0, Culture=neutral, PublicKeyToken=afb0a02973931d96, processorArchitecture=MSIL">
130-
<HintPath>..\packages\SharpCompress.0.34.2\lib\net462\SharpCompress.dll</HintPath>
151+
<Reference Include="SharpCompress, Version=0.49.0.0, Culture=neutral, PublicKeyToken=afb0a02973931d96, processorArchitecture=MSIL">
152+
<HintPath>..\packages\SharpCompress.0.49.0\lib\net48\SharpCompress.dll</HintPath>
131153
</Reference>
132154
<Reference Include="System" />
133-
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
134-
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
135-
<Private>True</Private>
136-
<EmbedInteropTypes>False</EmbedInteropTypes>
155+
<Reference Include="System.Buffers, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
156+
<HintPath>..\packages\System.Buffers.4.6.1\lib\net462\System.Buffers.dll</HintPath>
137157
</Reference>
138158
<Reference Include="System.Data" />
139159
<Reference Include="System.Drawing" />
140-
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
141-
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
142-
<Private>True</Private>
160+
<Reference Include="System.Memory, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
161+
<HintPath>..\packages\System.Memory.4.6.3\lib\net462\System.Memory.dll</HintPath>
143162
</Reference>
144163
<Reference Include="System.Numerics">
145164
<Private>True</Private>
146165
</Reference>
147-
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
148-
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
149-
<Private>True</Private>
166+
<Reference Include="System.Numerics.Vectors, Version=4.1.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
167+
<HintPath>..\packages\System.Numerics.Vectors.4.6.1\lib\net462\System.Numerics.Vectors.dll</HintPath>
150168
</Reference>
151-
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
152-
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
153-
<Private>True</Private>
154-
<EmbedInteropTypes>False</EmbedInteropTypes>
169+
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
170+
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
155171
</Reference>
156172
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
157173
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
158174
<Private>True</Private>
159175
<Private>True</Private>
160176
</Reference>
161-
<Reference Include="System.Text.Encoding.CodePages, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
162-
<HintPath>..\packages\System.Text.Encoding.CodePages.8.0.0\lib\net462\System.Text.Encoding.CodePages.dll</HintPath>
177+
<Reference Include="System.Text.Encoding.CodePages, Version=10.0.0.8, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
178+
<HintPath>..\packages\System.Text.Encoding.CodePages.10.0.8\lib\net462\System.Text.Encoding.CodePages.dll</HintPath>
163179
</Reference>
164-
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
165-
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
166-
<Private>True</Private>
180+
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
181+
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll</HintPath>
167182
</Reference>
183+
<Reference Include="System.ValueTuple" />
168184
<Reference Include="System.Windows.Forms" />
169185
<Reference Include="System.Xml" />
170-
<Reference Include="ZstdSharp, Version=0.7.4.0, Culture=neutral, PublicKeyToken=8d151af33a4ad5cf, processorArchitecture=MSIL">
171-
<HintPath>..\packages\ZstdSharp.Port.0.7.4\lib\net462\ZstdSharp.dll</HintPath>
186+
<Reference Include="ZstdSharp, Version=0.8.8.0, Culture=neutral, PublicKeyToken=8d151af33a4ad5cf, processorArchitecture=MSIL">
187+
<HintPath>..\packages\ZstdSharp.Port.0.8.8\lib\net462\ZstdSharp.dll</HintPath>
172188
</Reference>
173189
</ItemGroup>
174190
<ItemGroup>
@@ -232,7 +248,6 @@
232248
<Compile Include="Settings\GZipSettings.cs" />
233249
<Compile Include="NppGZipFileViewerHelper.cs" />
234250
<Compile Include="PluginInfrastructure\ClikeStringArray.cs" />
235-
<Compile Include="PluginInfrastructure\DllExport\DllExportAttribute.cs" />
236251
<Compile Include="FileTracker.cs" />
237252
<Compile Include="PluginInfrastructure\Win32.cs" />
238253
<Compile Include="Main.cs" />
@@ -298,7 +313,6 @@
298313
<None Include="app.config" />
299314
<None Include="icons\gzip.png" />
300315
<None Include="packages.config" />
301-
<None Include="PluginInfrastructure\DllExport\NppPlugin.DllExport.targets" />
302316
<None Include="README.md" />
303317
</ItemGroup>
304318
<ItemGroup>
@@ -314,21 +328,48 @@
314328
<EmbeddedResource Include="dll\ICSharpCode.SharpZipLib.dll" />
315329
<Content Include="gzip.ico" />
316330
</ItemGroup>
317-
<ItemGroup />
331+
<ItemGroup>
332+
<PackageReference Include="DllExport">
333+
<Version>1.8.1</Version>
334+
<Visible>false</Visible>
335+
<Wz>1</Wz>
336+
</PackageReference>
337+
</ItemGroup>
318338
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
319-
<Import Project="$(MSBuildProjectDirectory)\PluginInfrastructure\DllExport\NppPlugin.DllExport.targets" />
320-
<Import Project="..\packages\Joveler.Compression.XZ.4.3.0\build\net46\Joveler.Compression.XZ.targets" Condition="Exists('..\packages\Joveler.Compression.XZ.4.3.0\build\net46\Joveler.Compression.XZ.targets')" />
321-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
322-
<PropertyGroup>
323-
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
324-
</PropertyGroup>
325-
<Error Condition="!Exists('..\packages\Joveler.Compression.XZ.4.3.0\build\net46\Joveler.Compression.XZ.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Joveler.Compression.XZ.4.3.0\build\net46\Joveler.Compression.XZ.targets'))" />
326-
</Target>
327339
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
328340
Other similar extension points exist, see Microsoft.Common.targets.
329341
<Target Name="BeforeBuild">
330342
</Target>
331343
<Target Name="AfterBuild">
332344
</Target>
333345
-->
346+
<Import Project="..\packages\Joveler.Compression.XZ.5.0.2\build\net462\Joveler.Compression.XZ.targets" Condition="Exists('..\packages\Joveler.Compression.XZ.5.0.2\build\net462\Joveler.Compression.XZ.targets')" />
347+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
348+
<PropertyGroup>
349+
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlende(n) Datei(en) herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
350+
</PropertyGroup>
351+
<Error Condition="!Exists('..\packages\Joveler.Compression.XZ.5.0.2\build\net462\Joveler.Compression.XZ.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Joveler.Compression.XZ.5.0.2\build\net462\Joveler.Compression.XZ.targets'))" />
352+
<Error Condition="!Exists('..\packages\System.ValueTuple.4.6.2\build\net471\System.ValueTuple.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.ValueTuple.4.6.2\build\net471\System.ValueTuple.targets'))" />
353+
</Target>
354+
<Import Project="..\packages\System.ValueTuple.4.6.2\build\net471\System.ValueTuple.targets" Condition="Exists('..\packages\System.ValueTuple.4.6.2\build\net471\System.ValueTuple.targets')" />
355+
<ImportGroup Label=".NET DllExport">
356+
<Import Project="$(DllExportDir)packages\DllExport.1.8.1\tools\net.r_eg.DllExport.targets" Condition="Exists($([MSBuild]::Escape('$(DllExportDir)packages\DllExport.1.8.1\tools\net.r_eg.DllExport.targets')))" Label="8337224c9ad9e356" />
357+
</ImportGroup>
358+
<Target Name="DllExportRestorePkg" BeforeTargets="PrepareForBuild">
359+
<Error Condition="'$(DllExportNoRestore)'!='true' And !Exists('$(DllExportDir)DllExport.bat')" Text="DllExport.bat was not found in $(DllExportDir); https://github.com/3F/DllExport" />
360+
<Exec Condition="'$(DllExportNoRestore)'!='true' And ('$(DllExportModImported)'!='true' Or !Exists('$(DllExportDir)packages\DllExport.1.8.1\tools\net.r_eg.DllExport.targets') Or !Exists('$(DllExportDir)packages\DllExport.1.8.1\gcache')) And Exists('$(DllExportDir)DllExport.bat')" Command=".\DllExport.bat -action Restore" WorkingDirectory="$(DllExportDir)" />
361+
<MSBuild Condition="'$(DllExportModImported)'!='true'" Projects="$(DllExportDir)packages\DllExport.1.8.1\tools\net.r_eg.DllExport.targets" Targets="DllExportMetaXBaseTarget" Properties="TargetFramework=$(TargetFramework)">
362+
<Output TaskParameter="TargetOutputs" PropertyName="DllExportMetaXBase" />
363+
</MSBuild>
364+
<ItemGroup>
365+
<Reference Include="DllExport, PublicKeyToken=8337224c9ad9e356">
366+
<HintPath>$(DllExportDir)packages\DllExport.1.8.1\gcache\$(DllExportMetaXBase)\$(DllExportNamespace)\$(DllExportMetaLibName)</HintPath>
367+
<Private>False</Private>
368+
<SpecificVersion>False</SpecificVersion>
369+
</Reference>
370+
</ItemGroup>
371+
</Target>
372+
<Target Name="DllExportRPkgDynamicImport" BeforeTargets="PostBuildEvent" DependsOnTargets="GetFrameworkPaths" Condition="'$(DllExportModImported)'!='true' And '$(DllExportRPkgDyn)'!='false'">
373+
<MSBuild BuildInParallel="true" UseResultsCache="true" Projects="$(MSBuildProjectFullPath)" Properties="Configuration=$(Configuration);DllExportRPkgDyn=true" Targets="Build" />
374+
</Target>
334375
</Project>

NppGZipFileViewer/PluginInfrastructure/DllExport/DllExportAttribute.cs

Lines changed: 0 additions & 28 deletions
This file was deleted.
-270 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

NppGZipFileViewer/PluginInfrastructure/DllExport/NppPlugin.DllExport.targets

Lines changed: 0 additions & 49 deletions
This file was deleted.

NppGZipFileViewer/PluginInfrastructure/UnmanagedExports.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc.
22
using Kbg.NppPluginNET.PluginInfrastructure;
3-
using NppPlugin.DllExport;
43
using System;
54
using System.Runtime.InteropServices;
65

NppGZipFileViewer/Preferences.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public static Preferences Default
111111
}
112112
}
113113

114-
public bool ShowDepcrecatedWarning { get; set; } = false;
114+
public bool ShowDepcrecatedWarning { get; set; } = true;
115115

116116
public IEnumerable<CompressionSettings> EnumerateCompressions() => GetType().GetProperties().Where(m => m.PropertyType.IsSubclassOf(typeof(CompressionSettings)))
117117
.Select(m => m.GetValue(this) as CompressionSettings);

0 commit comments

Comments
 (0)