Visual Studio :: Can't Find New Classes In Namespace
May 1, 2010Can't find new classes in namespace
View 3 RepliesCan't find new classes in namespace
View 3 RepliesI am new to LINQ. when we drag tables we get a dbml file and designer file.
For example DataClasses1.dbml and DataClasses1.designer.cs.
Once we have them then we can start using our LINQ Queries.
In my company project I do not see this designer files and instead there are .tt files which were used as templates to greate ABC.generated.cs files. Is this same as designer class?
Even though I when I create a linqtosql class I mark C# as the language it was always shows up as a Visual Basic file in the App Code file. I can't get it to stop doing that. ????? What is going on?
View 5 Repliessometimes when i am writing my code, i am write the class name but without write "using ClassNameSpace..." in the top of the page, when i am clicking on that class name a small "red" rectangle appear at the bottom right of that class name word, when i am clicking again on that rectangle a popup appear in the place told me to include the name space for that class, so i can choose either to put the class name with "using ...." or to put the name space directly on the same line and before the class name.
any one know how to make that from the keybaord shortcuts (without clicking many times using mouse) .
I'm using VS 2010. I got the references to the classes from my project, now I need the .dll files but I can't seem to find them. How do you add the .dll's?
View 1 RepliesI have an asp.net web site. The reason I'm using web site instead of web application is that my project uses Sitefinity CMS system which uses the web site model.
I have several web user controls (ascx and code behind). I need a reference in the code behind of one control to another. I'm using the following code:
[Code]....
SilverlightShowHeader is the name of the class (the second control) which I need to reference. I haven't set any namespaces for both controls.
When I try to build the web site it shows the following error:
The type or namespace name 'SilverlightShowHeader' could not be found (are you missing a using directive or an assembly reference?)
Is that normal and how can I avoid it?
I have existing ASP.NET 3.5 project I migrated to Visual Studio 2010. I didn't migrate it to .NET 4.0. Every time I try to edit .aspx page, it alters the .designer.cs class to point to System.Web.UI.WebControls.WebParts.UpdatePanel class instead of
System.Web.UI.UpdatePanel
class and then the build of course produces an error. The project properties says ".NET3.5".Also the "design" tab produces just one box saying "unknown server tag asp:UpdatePanel". It seems like it is looking at .NET4.0 to generate the desgn view, not 3.5
Is there a setting somewhere I need to change?
I've searched but not found much that helps, could be using wrong search terms.Anyway, currently using Visual Studio 2005 and VB, but just got Visual Studio 2010 and trying to use C# and am having problems using classes, I think I'm missing something simple here.
In both 2005 & 2010 I create a new website and a Default.aspx, in 2005 using VB, C# in 2010.
Right-click the project -> Add New Item -> Class, and leave it as Class1.vb/Class1.cs
Both 2005 & 2010 prompt to place it in the App_Code folder, so choose yes.
Here are the class files, I've not changed anything apart from create a very simple function:
Class1.vb code: [Code]....
Class1.cs code: [Code]....
In my VB project Default.aspx.vb: [Code]....
No errors, and debugging shows that a = "hello"
My Default.aspx.cs: [Code]....
This gives an error:Error 1 The name 'tester' does not exist in the current context D:Visual Studio 2010WebSite11Default.aspx.cs
How do I reference the tester function within Class1 in my C# project?
VWD 2010 Express.
We have shared CSharp classes put into a shared folders for re-use. Now I want to add those classes into my project by creating a new folder:
1) Right click the solution,
Add -> New Folder
Give it a new, eg. SharedClasses
2) Right click the new folder "SharedClasses"
Add- > Existing Item...
Browse to the "Shared Folder", include those shared classes. But those files are added physically into the folder "SharedClasses" rather than a reference. How do I just add a link to those shared files? Since these files might be modified from time to time, I don't want to delete and add those file frequently.
I've build a Class Library, in the same project i put a web project. But its impossible to access the classes from the dll generated by the class library. Whats wrong? JumpTide XML uses the namespace like:
namespace JumpTideClassLib
{
public class jumptidexml
{
public class MetaTags
{
Image:
My class names are this annoyingly bright-blue color and I can't figure out which display item class names would fall into under the fonts and colors option.
View 2 RepliesHow can I prevent Visual Studio from naming the classes for new pages that are in folders from being named with the folder name? Does this method not set "right" with anyone else?
View 1 RepliesI am fairly new to ASP.net and web page development. I normally create Windows Apps, but the move is on to web pages. I have read and tried a number of posts on this matter, but none of them resolved the problem I am having. I have created a web site (I'm positive it is a web site) and added a class. Visual Studio automatically created and added the class to the App_Code folder. Accordingly, I added the get/set methods to the class and made them public. When ever I try to access the class from a code behind for any page, I get the class name, but nothing more. Intellisense shows only Equals and EqualsReference - no variables. I'm used to using classes in windows forms application and this would make life so much easier if it worked like it is supposed to work.
View 2 RepliesI started an app in VS2008. I did it as a web site. I installed VS 2010 (yay) today. I wanted to start over as a web project. I made a Master Page. I made content pages. One of my content pages has a form on it. Super simple text boxes and submit.
I added a folder called App_Code and placed my class files there by doing Add New Item and pasting the code into the new class. I have person and persons. The persons collection class references person. In the same folder, the persons class finds the person class. Up one level in a page's code behind, I am gettingthe error
The type or namespace name 'person' could not be found (are you missing a using directive or an assembly reference?)
For giggle, I move person.cs up a folder. Still cannot find the person. Persons collection class still CAN find person. My code behind cannot find it.
A little reading tells me I have to set that folder as an app folder in IIS. I am running Windows 7 ersonal... I cannot find IIS. If not there, I ask myself what they heck is my app running under?
for being such a noob. Anyone know what is going on here?
i suddenly started getting this error.
Error 13 The type or namespace name 'DisplayTrackingController' could not be found (are you missing a using directive or an assembly reference?) c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files emp773b35cbe8ac7005App_Web_wzekhp-n.0.cs 190 People
Although I have deleted this file from my project. why I am getting this error? and what is this file
App_Web_wzekhp-n.0.cs
I am trying to write a macro that accesses an XML file external to the editor.
For some reason, I am getting error messages on everything within the System.XML namespace
'Type XmlDocument is not defined'
'Type XmlTextWriter is not defined'
'Type XmlElement is not defined'
( etc... etc... etc... )
I've imported the namespace at the top of the editing context within the macro IDE:
Imports System.XML
I have also tried to reference the namespace members with a complete namespace reference:
System.XML.XmlDocument
It didn't work. It is still being indicated as undefined.
I've tested the code from within a stand-alone console app, and it works fine.
From this, am I to conclude that the System.XML namespace is not accessible from the macro facility?
Is there another option?
I am trying to run a sample code for MVP, where I face above compile time error in VS 2008.Currently I am using :Framework version 3.5 OS : Windows XP Professional SP 3
View 3 Repliesi m developing an application in which i need to capture image via webcam and storing in db.
but i found Error the type or namespace name 'CaptureSource' could be found(are you missing a using directive assembly reference ) ,when i want to use it.i got this code and video from silverlight website
i try both visual studio 2010 and blend 3 still same error
When using VS2008 and C# I choose File - New - Web Site.I use namespaces in the aspx files in the same folder.The problem is that the aspx files in one folder can not access the aspx files in other folders even though the files in each of the other folders use the same namespace followed by the folder name.
In fact, if I am in one folder and type the namespaces followed by a period, the other folder names are not displayed in intellisense, only the name of the folder name of the aspx file in which it resides is displayed on the intellisense.
How can I get the other folder names to show in intellisense from any other folder that I am working in when coding in the code behind? fyi, in the html inherit I point to the namespace, the folder name and the code behind file then in the code behind file I code the namespace, the folder name the aspx file is in and the class is the name of the code behind file.
i've converted a asp.net website to a web-application.
in the website i have some custom classes (folder App_Code) which where encapsulated in a namespace.
when i try to build the web-application i get the compiler error type or namespace not found for my own classes.
e.g.
my class in App_Code/helper/ui/UIHelpers.cs:
[Code]....
at compile time i get the error-message type or namespace 'MYAPP' not found..
Using System.Linq; namespace does not supportted in VS2005 version 2.00.
View 1 Repliesmy solution in VS 2008, consisting of a dozen projects, does not compile because it gives me errors on constructors of a couple of classes, telling me that lacks the constructor that takes one parameter, which lacks the parameterless constructor, and so on.Actually I have all the correct constructors, and other times I compile without problems.I'm not understand why I have these random problems, that it is practically impossible to replicate.
View 2 Repliesim facing problem to access classes out side my project folders. for example if i want to use some methods from store.vb file inside my project i get error : Name Space is not defiend, i have tried all ways such as import sdf.ITracjer.Data
[Code]....
i can't fetch the Store Class Methods or Function because its out of project directory, as its showin in image.
I can't believe I'm having so much trouble finding this information. I'm endeavouring to learn about creating model classes with Linq to SQL. By default VS2010 wants to use SQL Express, but our organisation has several database servers for development so I'd rather use one of those. PLEASE can somebody tell me how I can configure VS2010 to do that, as all I get is 'A network-related or instance-specific error occurred while establishing a connection to SQL Server ... Verify that the instance name is correct'. Yeah, thanks Microsoft. Actually telling me how to verify the instance name would be a really good move here.
View 1 RepliesHow do I display the Toolbox? I've looked under every menu item and just don't see it.
View 1 Replies