libsodium.dll runtimes folder was not found

265 views Asked by At

I'm using libsodium 0.10.0.0 package to implement password hashing.

After installing the nuget package the entries are created in package.config and project file as below:

 <Reference Include="Sodium, Version=0.10.0.0, Culture=neutral, processorArchitecture=MSIL">
      <HintPath>..\packages\libsodium-net.0.10.0\lib\Net40\Sodium.dll</HintPath>
  </Reference>   

The following Error occur after the build:

Severity    Code    Description Project File    Line    Suppression State
Error       Could not copy the file "C:\Projects\GIT\EP2\ep2-api.git\Applications\AMS\packages\runtimes\win-x86\native\libsodium.dll" because it was not found. Ace.Ams.Web     

In order to fix the above error I'm manually adding the below configuration settings in csproj file but still it's not working, and then I tried to manually copy the "runtimes" folder from the libsodium package path to above path and it's working in my local build but my bamboo auto build fails.

<ItemGroup> 
    <None Include="runtimes\win7-x86\native\**\*">
      <PackagePath>runtimes/win7-x86/native/</PackagePath>
      <Pack>true</Pack>
    </None>
    <None Include="runtimes\win7-x64\native\**\*">
      <PackagePath>runtimes/win7-x64/native/</PackagePath>
      <Pack>true</Pack>
    </None>
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFramework)' != 'net461'">
    <None Include="runtimes\osx-x64\native\**\*">
      <PackagePath>runtimes/osx-x64/native/</PackagePath>
      <Pack>true</Pack>
    </None>
    <None Include="runtimes\linux-x64\native\**\*">
      <PackagePath>runtimes/linux-x64/native/</PackagePath>
      <Pack>true</Pack>
    </None>
  </ItemGroup>
0

There are 0 answers