Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Create Nuget Package compatible with x86 and x64

$
0
0

I have a third party library whitch consist on

  • Reference Library (different for x86 and x64)
  • Native Library (also different for x86 and x64)

I have extended this library and I want to create a nugget package whitch automatically copies all libraries corresponding to the current architecture, including also my aditional development.

I get this working well using in csproj the following structure

<ItemGroup Condition=" '$(platform)' == 'x64'"><Reference Include="Intel.RealSense"><HintPath>lib\x64\Intel.Real.Sense.dll</HintPath></Reference><ContentWithTargetPath Include="lib\x64\realsense2.dll"><CopyToOutputDirectory>Always</CopyToOutputDirectory><TargetPath>realsense2.dll</TargetPath></ContentWithTargetPath></ItemGroup>

I want to do a nugget package with same functionality as this. As I have been reading I have to use ref/netstandard2.0\x86 and ref/netstandard2.0\x86 folder structure, but I don't know how to configure platform conditions and file copy to build directory depending on platform.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>