I am trying to create an ASP.NET MVC site that uses the underlying database infrastructure.
I use creating a new MVC 5 site in Visual Studio Professional 2013 Update 3 , then adding the ADO.NET Entity Data Model , from which I select EF Designer from the database .
After that, I create a connection string, select the tables to create the framework, and everything is fine.
However, when I compile it, I get this error
'MyModel.GlobalConfiguration' does not contain a definition for 'Settings'
These are Global.asax.cs and errors here
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); }
GlobalConfiguration automatically created with the added frame structure for MyModel . It certainly does not have the Configure method.
public partial class GlobalConfiguration { public int ID { get; set; } public long CurrentUSN { get; set; } public string DBVersion { get; set; } public long CurrentFile { get; set; } }
I followed all the answers here GlobalConfiguration.Configure () was not present after porting Web API 2 and .NET 4.5.1 , but no one worked. This is a slightly different situation, as this is not an update, but just a clean project.
All NuGet extensions and packages have been updated. I even deleted the generated object and reinstalled all the NuGet packages to make sure it helped, but no luck.
Any suggestions?