DotNetZip.Semverd icon indicating copy to clipboard operation
DotNetZip.Semverd copied to clipboard

NuGet package compatible with C++/CLI

Open joseangelmt opened this issue 7 years ago • 1 comments

Some of my assemblies are developed in C++/CLI. If I try to install the NuGet package, the installation fails with the next message:

Could not install package 'DotNetZip 1.11.0'. You are trying to install this package into a project that targets 'native,Version=v0.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Analyzing the package with NuGet Package Explorer I realized the NuGet package is including only the lib\net20 folders.

It's really easy to create a NuGet package compatible with both: pure .NET projects and C++/CLI projects, you only have to add the next folders and files the NuGet package:

build\native\DotNetZip.props
build\native\bin\DotNetZip.dll
lib\net20\DotNetZip.dll
lib\net20\DotNetZip.xml

The file DotNetZip.props has the next content:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
   <Reference Include="DotNetZip">
      <HintPath>$(MSBuildThisFileDirectory)bin\DotNetZip.dll</HintPath>
    </Reference>
  </ItemGroup>
</Project>

joseangelmt avatar Sep 17 '18 10:09 joseangelmt

Thanks for reporting this bug/problem, and sorry about the delay in getting back to you. This is a self-service repository, where I merge PRs and where the merging of PRs causes nugets to be pushed automatically (if you bump the version number in your PR). I'll leave this issue open until someone (or yourself) fixes it.@joseangelmt Please PR, if possible.

haf avatar Nov 13 '18 07:11 haf