Click here to Skip to main content
15,892,005 members

dll reference for ASP.NET website project not working

robroysd asked:

Open original thread
I have created a console application in C# to access databases.
Later, I changed the output type to Class Library.
the framework is set to .NET framework 4.

I have crated a ASP.NET Empty Website project.
I want to add my dll reference to this.

Things I've tried:
1. Right click project and add reference --> browse to C# project location --> add .dll file from bin/debug folder

--The above does not work

2. I've tried to add the .dll file from original location directly in root project folder of ASP.NET website, and then add a reference to this copy of the .dll file.
-- What this does is creates a copy under Bin folder
--This also doesn't work.

When I say it doesn't work, I'm trying to add a Using reference in the ASP.NET website. The default.aspx.cs page, does not have any namespace (by default).
Also, I've checked that .NET framework for ASP.NET website is set to .NET 4 (not .NET 4 client).

Can anyone please suggest what might be going wrong? your help and ideas will be greatly appreciated.

P.S. The .pdb file, which gets added when you add the .dll file in Bin folder, has a RedDot on the icon. Suggesting it might be some sort of an error. When i complied the original .cs file, of the class library, no errors were found. Also, no main class exists in original C# project, since it is a class library.
Tags: ASP.NET

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900