Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have created a Models folder and added a class to it.
Inside the class file, it says namespace teatertest.Models.
namespace teatertest.Models
So I try @using teatertest.Models in my template, but the response is
@using teatertest.Models
CS0246: The type or namespace name 'teatertest' could not be found (are you missing a using directive or an assembly reference?)
Hi Jan
Are you using website or web application in visual studio?
If website - all classes should be inside App_Code folder
If web application - you have to build project.
Thanks
Alex
I do have an App.Code folder in the file system. But it is not visible in Solution Explorer Does that mean I use website?
Website or web application, that is a choice I made (but can't remember) when I installed Umbraco?
Anyway, rebuilding is something I can live with.
One more question: I don't have my production site connected to Visual Studio. Does Republish Entire Site from Umbraco's web interface do a rebuild?
Republish Entire Site
Website - The project icon will be a World
Web App - The project icon will be a Folder/Form Icon, with a little world inside
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Using my own C# class
I have created a Models folder and added a class to it.
Inside the class file, it says
namespace teatertest.Models
.So I try
@using teatertest.Models
in my template, but the response isHi Jan
Are you using website or web application in visual studio?
If website - all classes should be inside App_Code folder
If web application - you have to build project.
Thanks
Alex
I do have an App.Code folder in the file system. But it is not visible in Solution Explorer Does that mean I use website?
Website or web application, that is a choice I made (but can't remember) when I installed Umbraco?
Anyway, rebuilding is something I can live with.
One more question: I don't have my production site connected to Visual Studio. Does
Republish Entire Site
from Umbraco's web interface do a rebuild?Website - The project icon will be a World
Web App - The project icon will be a Folder/Form Icon, with a little world inside
is working on a reply...