I'm trying to build a RavenApiController with the new ASP.NET 5.0 (aka Asp.Net vNext) stuff and can't seem to get the RavenDB.Client references to work at all.
The error I get is
Error CS0246 The type or namespace name 'Raven' could not be found (are you missing a using directive or an assembly reference?) SharedIO.ASP.NET Core 5.0 RavenApiController.cs 3
My project.json is as follows
{
"webroot": "wwwroot",
"version": "1.0.0-*",
"exclude": [
"wwwroot"
],
"packExclude": [
"**.kproj",
"**.user",
"**.vspscc"
],
"dependencies": {
"Microsoft.AspNet.Server.IIS": "1.0.0-beta2",
"Microsoft.AspNet.Diagnostics": "1.0.0-beta2",
"Microsoft.AspNet.Mvc": "6.0.0-beta2",
"RavenDB.Client": "3.0.3599",
"SharedIOModel": "1.0.0-*"
},
"frameworks": {
"aspnet50": {},
"aspnetcore50": {}
}
}
The code for RavenApiController.cs which fails to build on the third line begins as:
using System;
using Microsoft.AspNet.Mvc;
using Raven.Client;
using Raven.Client.Document;;
namespace SharedIO.Controllers
{
[RequireHttps]
public abstract class RavenAPIController : Controller
{
public IDocumentStore Store
{
get { return LazyDocStore.Value; }
}
Totally stumped.
For what it's worth intellisense seems to be able to find the reference just fine and I don't get an error until I actually 'build solution.
Also Intellisense shows me that (for example) Raven.Client.Document.IDocumentStore is 'Available' in ASP.NET 5.0 but 'Not Available' in 'ASP.NET Core 5.0'.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…