imazen / imageflow-dotnet

The official .NET API for Imageflow, the Rust image processing and optimization engine for web servers
GNU Affero General Public License v3.0
143 stars 25 forks source link

Native DLLs not copied to output directory #12

Closed andrewdavey closed 4 years ago

andrewdavey commented 4 years ago

I created a new ASP.NET Core Web Application with the following csproj:

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <CopyRefAssembliesToPublishDirectory>false</CopyRefAssembliesToPublishDirectory>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Imageflow.NativeRuntime.win-x86_64" Version="1.3.7-rc37" />
    <PackageReference Include="Imageflow.Net" Version="0.4.4" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.3" />
  </ItemGroup>

</Project>

After building in Visual Studio, the project's bin\Debug\netcoreapp3.1 directory does not contain the native DLL.

Am I doing something wrong? Should referencing the native package work like I have it?

lilith commented 4 years ago

Could you attach a .zip of the new project you created so I can reproduce this faster?

lilith commented 4 years ago

Is your build set to AnyCPU or x64?

andrewdavey commented 4 years ago

It's an AnyCPU build.

Sorry, after checking more closely I found the native DLL nested within runtimes\win-x64\native.

lilith commented 4 years ago

Usually you'll need to set the build to x64 to get binaries to copy. Is Imageflow working for you now?

lilith commented 4 years ago

I would suggest updating to v0.5 -> https://github.com/imazen/imageflow-dotnet/releases/tag/v0.5.0

Lots of improvements and several bug fixes. This corresponds to Imageflow 1.3.8-rc38 and later.

andrewdavey commented 4 years ago

Thank you that's working now.