I'm moving some code from my asp.net application into a vb.net library so it
can be reused easily elsewhere. I have a vb class in my asp.net application
and I just took a copy of that file and made it a new class in a new VS.net
class library.
Now when I look at my new class in my new library, several of the imports
statements are being flagged by intellisense as invalid (that work fine in
the asp.net app). It looks to be any system.web namespace. The first being
system.web.HttpContext. Are these namespaces available in a Class Library?
Do I need to handle my imports differently? Not sure where to go from here
to make this code portable. Thanks!
Imports are just shortcuts, so you type less. You are missing some assembly
references in your project - probably like System.Web, etc. ASP.NET apps
have templates that include some of these assemblies as references by
default, where as a library would not have them there by default.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.