clrzmq4
clrzmq4 copied to clipboard
Nuget package with version that supports netstandard2.0
Hi,
Are there any plans for releasing nuget package with clrzmq4 that contains library targeting netstandard2.0? As I'm aware of, the process of porting to netstandard2.0 is finished but currently released nuget only contains version for net40.
Any news on that? thanks
No reply for a year? Is this project still maintained?
For anybody else looking for a workaround, here's what I did to get set up with a usable NuGet package for .NET Standard 2.0 on x64 (ignoring all other platforms, which accidentally has the nice benefit of making builds a good deal smaller):
- In
ZeroMQ.netcore.csproj, define aPackageIdofSomePrefix.ZeroMQ(to avoid naming conflicts with the existing package) and an appropriate version number (I just used 4.1.0.31 for consistency). - In
ZeroMQ.nuspec, change theidproperty toSomePrefix.ZeroMQ, and change thefilessection to the following:
<file src="ZeroMQ.targets" target="build\netstandard2.0\SomePrefix.ZeroMQ.targets" />
<file src="bin\Release\netstandard2.0\ZeroMQ.dll" target="lib\netstandard2.0" />
<file src="libzmq.dll" target="build\libzmq.dll" />
- Include
amd64/libzmq.dllfrom the existing NuGet package in the root of the repository (cf. the finalfileabove). - Change
ZeroMQ.targetsto the following, to ensure thatlibzmq.dllends up in the right place after building (cf. #180).
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="AfterBuild">
<Copy
SourceFiles="$(MSBuildThisFileDirectory)..\libzmq.dll"
DestinationFolder="$(TargetDir)"
/>
</Target>
</Project>
- Then, the NuGet package can be built through
dotnet build ZeroMQ.netcore.csproj -c Release
nuget pack ZeroMQ.nuspec
This should be fixed together with #206 to ensure that the runtime identifier folders are used to distribute the native binaries, as per the .NET RID Catalog.