Visual Studio - Reference A Class Library In App Code Of Website?

Jan 13, 2011

I have an website with a reference to a class library. I can reference the class library in the aspx pages but how do I configure my site so that I can also reference the class library from a .cs file in app code?

View 1 Replies

Similar Messages:

Visual Studio :: Code Behind Page Not Recognizing Class Library Project?

Jun 11, 2010

I've got an ASP.NET 4 web forms application I'm building in Studio 2010. The solution has two projects. A web forms application and a class library. I have added a reference to the class libraryr project in the web forms project, but when I go a code behind page in the web forms project, it does not recognize the class from the class library and throws the "type or namespace <class> could not be found ...." error. Adding a using <class library projec> does not work either as it does not recognize that.

What am I missing?

View 8 Replies

Visual Studio :: Can't Run Or Debug Class Library

May 17, 2010

I'm developing a class library for a standalone software tool. The example class library I'm using as a template, which worked in VS2008, does not in VS2010. It compiles alright, but the external program does not get past the splashscreen when launched from VS2010 in release or debug mode. The project uses .NET 2.0 and I'm on WinXP.

I'd rather fix this than go back to VS2008...

View 2 Replies

Visual Studio :: Class Diagram And Show Reference Id Of Other Class?

Jul 12, 2010

am using class diagram of visual studio 2008as you can see the image i need show to user that the period and calendar classes have the idMarket property that refers to market classhow can i do this?

View 1 Replies

Visual Studio - Why Does Website Reference Assembly From GAC, When Adding Local Reference

Jan 7, 2010

When you use ASP.NET web site (instead of web application model) and add reference to an assembly from local folder, Visual Studio, it seems, understands that this local assembly is also in GAC and so does NOT copy this assembly to bin folder (as it does with non-GAC assemblies), but simply adds new record in web.config file.

Why such a behaviour? Is it possible to force copy to bin folder (I need this since .dll is not on target environment)? I can add assembly to bin folder as file and it will work, but in this case bin folder contents will be in source control, which is not good.

View 3 Replies

Visual Studio :: Reference JavaScript Library From Multiple Websites Without Copying It To Each Project Folder

May 13, 2010

I have several web sites, all of which use the same JavaScript library. How can I "reference" this library from each of my web sites? If I just import the library into my web site in Visual Studio, I get in trouble as soon as the library changes, because I then have to update it in all web sites manually. It would be much easier to place the library in an external folder and just reference it from my web sites. How can I do this with Visual Studio?

View 9 Replies

Visual Studio :: 2008 Class Library In 64 Bit Mode OS 2003?

May 4, 2010

I have a web application created on Visual Studio 2008. It has Class Library with many classes created to support application . Till now it was running in "Any CPU" mode and worked fine. But we wanted to make it run in the 64bit environment and i started getting erros for class library. System.BadImageFormatException: Could not load file or assembly or one of its dependencies. An attempt was made to load a program with an incorrect format." So i wonder if there is any incompatibility issues with class library and 64 bit mode? Any of you know if we cant use class library in this environment?

View 1 Replies

Visual Studio :: Call To The Class Library From The Windows Form Application Works Fine?

Aug 12, 2010

I have a windows service that calls a class library. The call to the Class library from the windows form application works fine. But from the service I do get the desired output. The event viewer does not report any error. The service was working fine until the recently when the server got remastered. Any suggestions what might have gone wrong?

View 2 Replies

Visual Studio :: Can't Reference Webcontrols From Code Behind

Jul 12, 2010

Iīm having a problem with Visual Studio 2010 pro. I canīt seem to reference webcontrols from code behinde and there for no intellisense. Intellisense works fine, just not for controls on the ASP page.


<asp:TextBox Width="245px" ID="txtName" runat="server"></asp:TextBox>
VB file: txtName.text = "Some text"
txtName dosent show up by intellisense.

View 1 Replies

Website Project To Reference A Signed Assembly In Visual Studio?

Mar 30, 2011

I'm aware of the following two different types of web projects in Visual Studio 2008:Website projectWeb application projectA web application project can reference a signed assembly as long as the web application's assembly is also signed with the same key. However, this doesn't work with the website project because there is no place to sign an assembly. I think this is because the assembly is compiled dynamically on the server?

Anyway, is it possible to get the website project working with this signed assembly? Or will I have to convert this website project into a web application project?Edit:The following situation has required me to ask for clarification in this matter:I have a class library that is being referenced by several other projects in my solution in Visual Studio. One of the projects is a windows application that will be deployed to specific external users. In order to make sure that the application is using the correct assembly and to also prevent others from using the assembly (I am aware of the limitations with respect to its effectiveness), all assemblies have been signed and all the classes in the library are declared as Friend (internal).

The website project doesn't seem to have a way for me to sign its assembly and I get the following message when attempting to use anything from the library: "CLASS is not assessable in this context because it is 'Friend'", which is to be expected.The following attributes are inside the AssemblyInfo.vb file in my class library project:

<Assembly: InternalsVisibleTo("OtherProject1, PublicKey=AAA...")>
<Assembly: InternalsVisibleTo("OtherProject2, PublicKey=AAA...")>

My Conclusion:Looks like the cleanest way to do this would be to convert the website into a web application but this would require a bit of time to do since our site is pretty fleshed out already and as pointed out in other discussions, can be quite a pain to do. Going forward, I think creating a web application in the first place may have been a better idea and much more flexible for future development.

View 3 Replies

Web Forms :: How To Add DLL Reference In Visual Studio 2008 Website Application

Dec 27, 2012

How to add ASPSnippets.SmsAPI refrence in MS Visual Studio 2008, becuase i tried in add reference option but it is not available.

View 1 Replies

Visual Studio :: Trying To Add A Class Library To A Solution In Vs2008 But Solution Icon Disappears?

Mar 20, 2010

I'm trying to create a .NET solution and add class libraries to it. First - in VS2008 I go to File > New > Project > Other Project Types > Visual Studio Solutions > Blank Solution. Then - after VS2008 creates the blank solution I right click on the solution and select Add > New Project > Visual C# > Class Library. However, when I add the Class Library to the solution, the solution icon disappears from Solution Explorer (although the solution name is still in the VS2008 title bar). Why does the solution icon disappear
from the Solution Explorer when I attempt to do this?

View 2 Replies

Visual Studio :: Make A Class Like A Code Behind?

May 10, 2010

I have two classes (say someclass.cs and someclass.generatedcode.cs). How do I make the someclass.generatedcode.cs inside of someclass.cs (something like a code behind) in visual studio?

View 12 Replies

C# - How To Add A Reference To A Web Application Project In An Associated Class Library

May 13, 2010

I'm working on an internet application that has been set up as a web SITE project (I know...) in Visual Studio. I need to add additional features/functionality so have added a class library to the project and referred to it in the main web site project.

The issue now arises because I need to make use of core objects which live inside the App_Code directory in the web site project but this project doesn't appear to expose its DLL like web app/ code library projects do. Because of this I can't add a reference to the web site project in the class library to leverage the common site-wide code/objects.

I can't move the stuff out of App_Code so I'm looking for a way to refer to the website project dll from the new class library.

View 3 Replies

C# - Can Use Class View For A Webpage Code Behind In Visual Studio

Dec 27, 2010

I've always just used incremental search, but have recently starting using a class browser plugin for vim and would like something of the same in Visual Studio to navigate methods, properties, etc. in a browser type window. Seems like this is what Class View is for, but when I'm on a page's code behind, it doesn't show up on the class view window.

When I search for the class, it shows up but when I click on it I get "The definition of the object is hidden.". Is there some basic setup thing I'm doing wrong or does VS not support class view for page classes? Is there an extension that does this (I'm using VS2010)?

View 1 Replies

AJAX :: Class Library Reference For The Toolkit Controls

Jun 17, 2010

Is there a class library reference for the AJAX toolkit controls. I would like to see all of the properties and methods of the Accordian control.

View 4 Replies

Unable To Add Reference To System.Web In A Class Library Project

Mar 18, 2011

Does anyone know what could be the reason I am not able to add reference to System.Web. It gives an exclamation(!) symbol in front of the dll under reference folder in VS 1020. I wand to refer to System.Web.Security.MembershipProvider class.

View 1 Replies

Visual Studio :: Class Methods And Code Behind Events Diagram?

Jun 23, 2010

is there any tools within VS2008 or Free 3rd Party tools where i can generate a Diagram of Class Methods and Code Behind events. think of the Table Diagram of SQL, it will show all fields, Primary Keys and to what table it is connected via foreign keys, etc.That is what i wish to make, in a much faster way, where it will show all class and within it is all the methods then linking them are the Code behinds and the event where the class is called.

View 3 Replies

Visual Studio :: Reverse Engineering The Code And Create Class Diagram?

May 25, 2010

reverse engineer the code and create class diagram in visual Studio 2008 frim visio 2003.dont want to use any external tool.

View 4 Replies

Visual Studio :: Some Of The Seleced Types Cannot Be Added To The Class Diagram.Checks The Code For Errors?

Mar 26, 2010

This is the error i'm getting while try to view class diagram,any suggestion.Some of the seleced types cannot be added to the class diagram.Checks the code for errors and ensure that all required assemblies are referenced.

View 1 Replies

Visual Studio :: A Website Adds Dll Under BIN And A Web Project Adds Dll Under Reference Folder?

Jul 21, 2010

Just to test, I created a blank website and a blank web site project.

When I added a referece to web site by doing right click and add reference it added the dll inside a BIN folder but on ther other hand when I did the same for a web site project it created a reference folder for me and then added the dll under the reference folder.

View 2 Replies

Visual Studio :: Publish Website Online - Only Displays Code

Oct 1, 2010

i have been trying to pusblish my website online. When i did this, the website only displayed the code from the source rather than a functioning page.

View 2 Replies

Visual Studio :: Reassociating A Code Behind File With .aspx In 2008 Website Solution

Feb 12, 2010

I can't get my .aspx page to recognize control events in it's codebehind.


which is fine, but I don't want to use inline script.


View 6 Replies

Configuration :: Link Website To The Class Library?

Jun 25, 2010

I have moved to a new computer.. and I forgot how I setup the following within Visual Studio 2008...

on my previous computer:

[1]I have a MY_SITE solution

within that solution I have:


[3]I have MY_SITEClassLibrary (which actually is just a reference to a folder that contains a lot of .cs files - that is within the T:MySiteFolderTheClassLibrary)

... then... if I have USING MY_SITEClassLibrary in any aspx.cs file, I can reference the various classes..

when I move to a NEW computer and a new visual studio 2008 installation... if I open the T:MySiteFolder website... it just opens as a normal website without the MY_SITEClassLibrary as a primary object......

so, can anyone remind me how to again setup this relationship within my new visual studio installation/computer?

View 3 Replies

Page Code In Class Library

Dec 21, 2010

i create a class library and i want my code behind the page be there. in my page like login.aspx is a login control and i want to write some code for that but i got some error i don't know what i'm doing rong. the code behind in class library is:


and the codes in login.aspx page is:


after i buld the project the code behind doesn't find the MainLogin control

View 3 Replies

Copyrights 2005-15, All rights reserved