I've created a new project using a clean install of VS 2015 Enterprise RC1, and I'm trying to add a Nuget package for Mandrill which is built against .NET 4.
When I build the project i get an error from DNX Core 5.0 that the namespace cannot be found:
All packages are already installed and there is nothing to restore.
NuGet package restore finished.
1>------ Build started: Project: WebApplication3, Configuration: Debug Any CPU ------
1>C:\Projects\WebApplication3\src\WebApplication3\MessageServices.cs(5,7,5,15): DNX Core 5.0 error CS0246: The type or namespace name 'Mandrill' could not be found (are you missing a using directive or an assembly reference?)
1>
1> Build failed.
1> 0 Warning(s).
1> 1 Error(s).
1>
1> Time elapsed 00:00:00.1404086
1>
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
Rather than add as a global dependency, I've tried to add it just to the dnx451 framework within project.json
, with the same result.
"frameworks": {
"dnx451": {
"dependencies": {
"Mandrill": "1.3.1"
}
},
"dnxcore50": { }
},
Is it even possible to use .NET 4 packages with ASP.NET 5? If so, what's required?
Probably the Mandrill
package doesn't support CoreCLR. You have two options:
dnxcore50
section in project.json
Mandrill
api. Example: #if DXNCORE50 ...
or #if DNX451
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With