I am currently trying to integrate an ASP.NET Core WebApi project into an WPF application (latest ASP.NET Core, latest .NET Framework). The idea is to provide a REST API for the user to control the application remotely. However, I was not able to integrate it into the WPF application and as soon as I reference the web project in the WPF project I am faced with a compilation error:
"Unknown build error, 'Cannot resolve dependency to assembly 'Microsoft.AspNetCore.Mvc.Core, Version=2.1.2.0, Culture=neutral PublicKeyToken=adb9793829ddae60' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event."
Any ideas how to solve that problem?
This is an example VS2017 solution that contains a WPF project and an ASP.NET Core project and I just added a reference to the ASP.NET Core project in the WPF project.
UPDATE: The ASP.NET Core project is set up to target the full .NET framework and is not using .NET Core.