 |
| ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

May 26th, 2004, 02:26 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Add reference to Global Assemblies
Please let me know how I can add reference to Global assemblies using Visual Studio .Net
_________________________
-Vijay G
 Strive for Perfection 
__________________
- Vijay G
|
|

May 26th, 2004, 02:34 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
Right-Click on the project, click "Add Reference...". On the .Net tab, all assemblies that are in the GAC will show up in the list.
|
|

May 26th, 2004, 02:38 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Does it show even if I have 2 or more versions of same assembly and let me choose any of the versions I need?
_________________________
-Vijay G
 Strive for Perfection 
|
|

May 26th, 2004, 03:54 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
Yes. It will show all versions that have been put in the GAC. For example: if you install two version of the framework, you'll see System.Web.dll in there with both the 1.0 and 1.1 versions.
|
|

May 26th, 2004, 03:58 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Thanks a lot for your replies.
Can you please let me know, how do I do that using CODE, than adding reference from Menu? Is that possible, if so how?
Thanks again for the help.
Cheers!
_________________________
-Vijay G
 Strive for Perfection 
|
|

May 26th, 2004, 04:04 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
I'm not sure what you mean? How do you do what in code? Adding an assembly reference is a design-time operation. (Or a compile-time operation if you are using the command line compiler.)
|
|

May 26th, 2004, 04:07 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Sorry for not being clear on that.
When I add reference using VS.net UI, this should add some referencing code to my project. Can I do the same by coding at DESIGN-TIME rather doing "Add reference" from the menu.
Just got to think too much.;)
Cheers!
_________________________
-Vijay G
 Strive for Perfection 
|
|

May 26th, 2004, 04:15 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
You can't "code" a reference. References are used when the code is compiled. When you add a reference to something in VS, you are telling the project about the desired reference. You end up with an entry in the project file that looks like this:
<Reference
Name = "System"
AssemblyName = "System"
HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.432 2\System.dll"
/>
This allows VS to apply that reference when it compiles the code.
What's the problem with just using the "Add Reference..." feature in VS?
|
|

May 26th, 2004, 04:27 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Thanks for the Reply.
No there isn't any problem in adding that using Add Reference.
As I could see that the reference is added to the project seeing the entry there, I just out of curiosity wanted to know if I can write that on my own instead of adding from menu.
Cheers!
_________________________
-Vijay G
 Strive for Perfection 
|
|

May 26th, 2004, 07:53 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
Well, I guess you could write something that modified the project XML file externally, and added a reference node to the file. Then you'd get a prompt in VS that the file has been changed externally, would you like to reload.
|
|
 |