Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuget package with version that supports netstandard2.0 #182

Open
cezarypiatekGC opened this issue Jul 22, 2019 · 4 comments
Open

Nuget package with version that supports netstandard2.0 #182

cezarypiatekGC opened this issue Jul 22, 2019 · 4 comments

Comments

@cezarypiatekGC
Copy link
Contributor

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.

@cezarypiatekGC cezarypiatekGC changed the title Nuget package with version that support netstandard2.0 Nuget package with version that supports netstandard2.0 Jul 22, 2019
@mkermit
Copy link

mkermit commented Oct 9, 2019

Any news on that? thanks

@kwinz
Copy link

kwinz commented Nov 1, 2020

No reply for a year? Is this project still maintained?

@fuglede
Copy link

fuglede commented Mar 3, 2021

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):

  1. In ZeroMQ.netcore.csproj, define a PackageId of SomePrefix.ZeroMQ (to avoid naming conflicts with the existing package) and an appropriate version number (I just used 4.1.0.31 for consistency).
  2. In ZeroMQ.nuspec, change the id property to SomePrefix.ZeroMQ, and change the files section 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" />
  1. Include amd64/libzmq.dll from the existing NuGet package in the root of the repository (cf. the final file above).
  2. Change ZeroMQ.targets to the following, to ensure that libzmq.dll ends up in the right place after building (cf. Shared library issues with DotNet Core 2.1 under Linux #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>
  1. Then, the NuGet package can be built through
dotnet build ZeroMQ.netcore.csproj -c Release
nuget pack ZeroMQ.nuspec

@glopesdev
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants