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.Http Context. 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!
Matt 3 1525
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.
"MattB" <so********@yah oo.com> wrote in message
news:2q******** ****@uni-berlin.de... 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.Http Context. 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!
Matt
Got it. Thanks!
I figured it was some kind of reference, but didn't know where to look to
add it.
Marina wrote: 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.
"MattB" <so********@yah oo.com> wrote in message news:2q******** ****@uni-berlin.de... 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.Http Context. 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!
Matt
Make sure the right References has choosen for the project.
chanmm
"MattB" <so********@yah oo.com> wrote in message
news:2q******** ****@uni-berlin.de... 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.Http Context. 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!
Matt This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: jbmeeh |
last post by:
I have an application in which I need to expose runtime moving and resizing of controls. Most of the functionality that I need is exposed by the CRectTracker class in the C++ library. Are there any code samples or tutorials for calling a managed C++ from C#? Any help would be appreciated.
|
by: Joshua Moore |
last post by:
I'm sure this is an easy question/answer, but would greatly appreciate it :)
I have a 20 mb project, and wanted to move several classes, especially
forms, to a class library. I tried adding one of the forms (cs) to the
class library as well as drag/drop from the main project to the class
library and have lost ability to "View Designer".
Please help.
Thanks.
|
by: Franck |
last post by:
Hello,
I've just moved to visual developper 2005
to do so, I also had to use the convert assistant.
what it did;
moving my file resx files that i had in a diresctory called resx
to a new directory called:
App_GlobalResources
in my code i had :
|
by: UJ |
last post by:
I have a class that makes reference to a windows form. I am trying to make
that class a class library and when I include the window file, it says that
system.windows.form.form is not defined.
How can I make a library the includes a window?
TIA.
Jeffrey.
|
by: Adam Hartshorne |
last post by:
I have just upgraded to Visual Studio 2005 and have loaded in a project
i have been working on, and the code compiles ok but fails to link
correctly, as shown below. Any suggestions about what is wrong would be
much appreciated,
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > __cdecl std::operator+<char,struct
std::char_traits<char>,class...
| |
by: axs221 |
last post by:
I am trying to move some of our large VBA Access front-end file into
ActiveX DLL files. I created two DLL files so far, one was a module
that contains code to integrate into the QuickBooks accounting
software. Another has general utilities.
I tried referencing the utilities dll, and it shows up in the object
explorer. I instantiated an instance of the class and now it shows up
all okay in the Intellisense. Whenever I try to run a simple...
|
by: b747_440 |
last post by:
Hello Newsgroup,
I try to resize and move a picturebox. However, after each operation
the picture box is being redrawn. This causes flickering. Is it
possible to suppress the first redraw and draw both operations at once
after they have been completed?
I have tried overriding OnPaint, OnBackgroundErase, etc. Double
Buffering, AllPaintingInWmPaint, etc. has been set to true.
No success so far.
Now I'm trying to catch Windows Messages like...
|
by: Diogo Alves - Software Developer |
last post by:
Greetings
I would like to knowhow can I put a sliding panel...
I've done this:
if (panel1.Width < 300)
{
while (panel1.Width < 300)
{
panel1.Width = panel1.Width + 40;
|
by: =?Utf-8?B?R1Q=?= |
last post by:
I have a Form which has a great number of events. I thought I would organize
the project by moving some of the code into multiple '.cs' files (since the
Form.cs was getting huge). When I move them, it seems that Visual Studio can
no longer find them when I open a Button object (for example) and double
click on the previously created event. On top of this, Visual Studio creates
a new event that is blank. I know the program can 'see' my moved...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |