473,322 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

how to get visual studio to reconize a compiled component

thanks much!!!i'm working through an example that creates a component called
component.dll. This compiled ok w/o problem. I copied it to the bin directory
of my project (vs.net asp.net vb project) when i attempt to reference it in
my source it is not found. and when i compile it same thing. how do i get my
program to reconize this class.
using code behind.
here is my source:

Imports component <--- is not found how do i add it?
Imports System.Data
Imports System.Data.SqlClient
Public Class WebForm1
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

End Sub
Protected WithEvents dgrdDatagrid1 As System.Web.UI.WebControls.DataGrid

'NOTE: The following placeholder declaration is required by the Web Form
Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim simplecomponent As New Simple
Dim dataset As New DataSet
dataset = simplecomponent.loadDataSet()
dgrdDatagrid1.DataSource = dataset
dgrdDatagrid1.DataBind()

End Sub

Private Sub dgrdDatagrid1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
dgrdDatagrid1.SelectedIndexChanged

End Sub
End Class

Nov 19 '05 #1
2 1281
i think i figured it out, but don't know for sure. I added a reference in
project/reference. Do ireally need to do this ? i thought it wouold pickup
automaticly.
if this is necessary here how about on the production server? do i need to
add a reference there also?
thanks
kes

"Kurt Schroeder" wrote:
thanks much!!!i'm working through an example that creates a component called
component.dll. This compiled ok w/o problem. I copied it to the bin directory
of my project (vs.net asp.net vb project) when i attempt to reference it in
my source it is not found. and when i compile it same thing. how do i get my
program to reconize this class.
using code behind.
here is my source:

Imports component <--- is not found how do i add it?
Imports System.Data
Imports System.Data.SqlClient
Public Class WebForm1
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

End Sub
Protected WithEvents dgrdDatagrid1 As System.Web.UI.WebControls.DataGrid

'NOTE: The following placeholder declaration is required by the Web Form
Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim simplecomponent As New Simple
Dim dataset As New DataSet
dataset = simplecomponent.loadDataSet()
dgrdDatagrid1.DataSource = dataset
dgrdDatagrid1.DataBind()

End Sub

Private Sub dgrdDatagrid1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
dgrdDatagrid1.SelectedIndexChanged

End Sub
End Class

Nov 19 '05 #2
It must be added to the reference, either explicitly in the ASP.NET page or
in the Web.config file or in the list of references for that project.

The most easy way to do this, in your case, is first to add the
component.dll project to the same solution as your asp.net vb project.
Then, from the References node for the asp.net vb project, you choose from
the contextual menu (right click of the mouse) Add Reference --> Projects
(third tab) --> Double click on your component.dll project --> choose
component.dll at the bottom of the window.

The component.dll library will be added to the list of references for your
vb.project, with the property Copy Local set to True and will also be marked
as a dependency to be compiled first in the list of dependencies for asp.net
vb project (menu Project --> Project Dependencies --> ...).

The "Imports component" will not be necessary; it is simply a shortcut for
importing the namespace "component"; otherwise you have the obligation of
writing the namespace before your objects:

Dim simplecomponent As New component.Simple

instead of:
Dim simplecomponent As New Simple

but by itself, it doesn't add any reference to an external library or
module.

From there, all the rest will be done automatically by VS.NET; including
rebuilding/ relinking/ copying the component.dll library when necessary.

S. L.

"Kurt Schroeder" <Ku***********@discussions.microsoft.com> wrote in message
news:2F**********************************@microsof t.com...
thanks much!!!i'm working through an example that creates a component
called
component.dll. This compiled ok w/o problem. I copied it to the bin
directory
of my project (vs.net asp.net vb project) when i attempt to reference it
in
my source it is not found. and when i compile it same thing. how do i get
my
program to reconize this class.
using code behind.
here is my source:

Imports component <--- is not found how do i add it?
Imports System.Data
Imports System.Data.SqlClient
Public Class WebForm1
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

End Sub
Protected WithEvents dgrdDatagrid1 As
System.Web.UI.WebControls.DataGrid

'NOTE: The following placeholder declaration is required by the Web
Form
Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim simplecomponent As New Simple
Dim dataset As New DataSet
dataset = simplecomponent.loadDataSet()
dgrdDatagrid1.DataSource = dataset
dgrdDatagrid1.DataBind()

End Sub

Private Sub dgrdDatagrid1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
dgrdDatagrid1.SelectedIndexChanged

End Sub
End Class

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Corrie Meyer | last post by:
Announcement: SwiftReports standard edition 1.0 for Visual Studio ..NET 2003 released by UniSwift. We are pleased to announce the first release of a fully-managed reporting tool for the...
1
by: Novice | last post by:
Hi all, I'm afraid this is the second posting of this information as I didn't get a response on the previous post. I will try to shorten my message (i.e. be more concise) in the hopes that it will...
19
by: Alf P. Steinbach | last post by:
// As usual the error message directs one to the report the bug. // // And as usual there is absolutely no way to do so without paying for // the privilege... // // Or using three or four hours...
5
by: Somesh | last post by:
#include<map> #include<iostream> #include<string> using namespace std; int main() { map <string,int> test;
4
by: Bill Burris | last post by:
When compiling my solution which contains 15 projects (2 Window Apps, 2 Services, 11 class libraries, C#, MC++, & C++), I was receiving warnings about symbols defined in multiple places. Selecting...
0
by: Vagif Abilov | last post by:
Hello, We are setting up an envirnoment for daily builds, and there are a few things in VS.NET behaviour that makes it a bit complicated. One of them is post-build events. If you have a .NET...
0
by: innovasys | last post by:
TORQUAY, DEVON, UK - Innovasys announced the release of Document! X 5, the fifth version of the documentation solution of choice for developers using Microsoft Visual Studio or the .NET Framework....
12
by: Nathan Sokalski | last post by:
I recently upgraded to from Visual Studio .NET 2003 to Visual Studio .NET 2005. In Visual Studio .NET 2003 when I would select 'Build' it would add a *.dll with the name of the Project to a /bin/...
2
by: Cramer | last post by:
So, what is the relationship between Visual Studio and Visual Web Developer. I find a lot of documentation on MSDN that presents Visual Web Developer as it's own stand-alone product (which I'd...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.