Reputation: 2437
The type or namespace name 'OwinStartupAttribute' could not be found
The type or namespace name 'OwinStartup' could not be found
using Microsoft.Owin;
using Owin;
[assembly: OwinStartup(typeof(Employee.Web.Models.Startup))]
namespace Employee.Web.Models.Startup
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.MapSignalR();
}
}
}
Any help would be appreciated.
Using:
Installed singlar after Referencing Microsoft.Owin using the command Install-Package Microsoft.AspNet.SignalR -Version 1.1.3
UPDATE:
I removed [assembly:..
and also added this in web.config:
<add key="owin:AppStartup" value="Employee.Web.Models.Startup" />
The error now says
'Owin.IAppBuilder' does not contain a definition for 'MapSignalR' and no extension method 'MapSignalR' accepting a first argument of type 'Owin.IAppBuilder' could be found
Upvotes: 4
Views: 7222
Reputation: 14535
bin/
folderUpvotes: 1
Reputation: 3649
To fix that:
Microsoft.Owin
is installed add item
and search for "startup"Startup.cs
class. click on OWIN Startup
class
and just add it under Startup1.cs
then the error will be
gone. Delete
the added Startup1.cs
finally, rebuild
.
Hope that helps!
Upvotes: 2
Reputation: 1794
Create One Class With Name Startup this will help you..
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.MapSignalR();
}
}
In addition to this, if your startup class is somehow not in your default name space, add a web config line to the area like:
<add key="owin:AppStartup" value="[NameSpace].Startup" />
Here is more explenation.
Upvotes: 1