net...
I'm making a simple MVC project with the help of tutorial in given link:
http://www.codeproject.com/Articles/486161/Creating-a-simple-application-using-MVC
I'm getting error at this particular stage.
Now let’s apply validations on the fields:
Error 2 The type or namespace name 'DisplayName' could not be found (are you missing a using directive or an assembly reference?)
C:\Users\sword\Documents\Visual Studio 2012\Projects\MyCalculatorSrevice\MyMvc1\MyMvc1\Models\UserModels.cs
I searched for it, but couldn't find anything to remove this error.
help me out
thanx
Make sure :
You've referenced System.ComponentModel assembly
You have import the annotation by using System.ComponentModel; in your UserModel.cs file.
Hope it will help u,
you are actually missing reference to DataAnnotations. Try adding following line at among references, and it will start working.
using System.ComponentModel.DataAnnotations;
Related
I've come across an issue in Umbraco where I was (once upon a time) able to use the Umbraco.Forms.Core.Enums namespace however, since I've checked my current code in and done a build ready for production, the compiler is failing to recognize it exists any more!
it's giving the standard error of
The type or namespace name 'Enums' does not exist in the namespace 'Umbraco.Forms.Core' (are you missing an assembly reference?)
Could anyone point me in the right direction with this? I've tried updating Umbraco.core, umbraco itself and searching in the namespace to try and find this Enums type but I just can't find it!
Thanks everyone :)
I am using .NET 4.5/4.6 and C#.
I am trying to follow the following sites Generic DAL and Entity Framework with my winforms application. I was able to implement link 2, however after implementing part of link 1 (specifically after moving my model Text Template, I have errors stating that The type or namespace name 'ObservableListSource<>' could not be found (are you missing a using directive or an assembly reference?)
What namespace do I need to reference at the project level to fix this for my solution or what reference do I need to include with my text template in order for the entities to contain no errors?
Assuming you're using this ObservableListSource the proper namespace would be System.Data.Entity
Found it. the answer is at the beginning of Databinding with winforms. Its a section of code that was overlooked several times and not a c# keyword.
In my view for my Editable Grid i'm getting errors about: "The name 'GridButtonTupe' does not exist in the current context" and "The type of namespace could not be found (are you missing a using directive or an assembly reference?)" I have included all reference files, do you know what may be the problem?
Without seeing the code, it seems that you need to be accessing 'GridButtonTupe' via FindControl("GridButtonTupe") in the code behind.
See this, for example: http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx (take a look at the default.aspx.cs example)
A code example of the issue would be helpful if this is not the answer.
The type or namespace name 'XmlConfigurator' could not be found (are you missing a using directive or an assembly reference?)
Am I missing a namespace???
You have to add log4net.dll to your project and the using log4net.Config; namespace
Your missing dll. Right click on your project and Add Reference... point to correct dll.
There is the possibility that you have not added the dll. This would require right clicking your project and adding the reference DLL. There is one other step that wasn't mentioned in the previous answers that I found relevant.
There is the possibility that you are not using the correct runtime. I found that log4net requires a full profile. For instance the client profile for .NET 4 will generate this error but if you use the full profile you will not experience this.
Afternoon all,
I really need your help as this is a Nightmare!
I was earlier having a problem with referencing a 3rd Party Dll (Here) but have overcome this problem and am now having a problem referencing my own classes!
Everything seems fine at build with no errors at all but when I go to run the application it comes up with the following Compilation Error:
Compiler Error Message: CS0234: The type or namespace name 'Secure' does not exist in the namespace 'source_extranet' (are you missing an assembly reference?)
The line that the Error points to this line in the class:
source_extranet.Secure.BackendCustomData newdata =
new source_extranet.Secure.BackendCustomData();
This line of code points to a class in the same folder as the calling code class.
I have scoured Google looking for an answer and haven't found anything that points me to an answer to my problem.
Any help would be AMAZING!
Check that your class Secure also uses the source_extranet namespace. And if its a partial class make sure the partials also have the right namespace.
This has all been going wrong because a colleague was attempting to add in additional functionality and was clearly very unsuccessful!
Upon reverting his changes it is now working perfectly.