i followed the ASP.NET WebForms tutorial but it still shows me this message and i don’t know what to do with it
|Error|CS0234|The type or namespace name ‘Models’ does not exist in the namespace ‘SchedulerNetAsp’ (are you missing an assembly reference?)
if anyone could help that would be great
Hi,
Can you please give me a link to a tutorial you referring to?
Do you use dhtmlxScheduler for ASP.NET (http://scheduler-net.com) or the javascript scheduler (https://docs.dhtmlx.com/scheduler/howtostart_guides.html
)?
Most likely it’s down to the definition of your model classes. The code of your page assumes they are declared under SchedulerNetAsp.Models namespace and there is using SchedulerNetAsp.Models;
command somewhere.
This namespace appears not to be declared in your app hence the error. You’ll need to check the definitions of model classes to see in which namespace they are actually declared.
They may be declared in the common project namespaces (SchedulerNetAsp), so the error may be fixed by simply removing using SchedulerNetAsp.Models;
from your code.
If nothing helps - please share some code or a complete sample project where the error can be reproduced
Hello,
I apologize for such a late response.
I’ve checked the project and looks like you have two dbml
files there:
One is located in the project root directory and another is in Models
directory:
The one from the Models
folder doesn’t seem to be included in the project and I believe it’s not compiled because of that.
So I think you need to
- Delete Scheduler.dbml and related files (Scheduler.dbml.layout, Scheduler.designer.cs) located on the project root Screenshot by Lightshot
- Included files from the
Model
folder into the project Screenshot by Lightshot
Once I’ve done this and ran the project (be sure you have “LINQ to SQL tools” for your Visual Studio installed, it can be found in VS Installer under the “Code Tools”), everything is compiled correctly.
Also please note, web.config and dbml files on your google drive contain database connection credentials that look realistic - please be sure it’s not something that can be used to gain access to your database