[Assembly] gives "Type 'Assembly' not defined" error

P

PKuhne

When pasting this code from the MS small Business Accounting Beta Concepts
manual:

DIM skdAssembly as [Assembly] = [Assembly].LoadFrom(installpath.ToString())

the IDE shows : "Type 'Assembly' not defined" and underlines it in its
normal error-indicating fashion.
How can I overcome this problem?
TIA
 
K

Ken Tucker [MVP]

Hi,

Add Imports System.Reflection to the top of your file.

Ken
--------------
When pasting this code from the MS small Business Accounting Beta Concepts
manual:

DIM skdAssembly as [Assembly] = [Assembly].LoadFrom(installpath.ToString())

the IDE shows : "Type 'Assembly' not defined" and underlines it in its
normal error-indicating fashion.
How can I overcome this problem?
TIA
 
H

Herfried K. Wagner [MVP]

PKuhne said:
When pasting this code from the MS small Business Accounting Beta Concepts
manual:

DIM skdAssembly as [Assembly] =
[Assembly].LoadFrom(installpath.ToString())

the IDE shows : "Type 'Assembly' not defined" and underlines it in its
normal error-indicating fashion.
How can I overcome this problem?

Either import the 'System.Reflection' namespace or fully qualify the class
name:

\\\
Imports System.Reflection
..
..
..
Dim a As [Assembly] = ...
///

- or -

\\\
Dim a As System.Reflection.Assembly = ...
///
 

Ask a Question

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.

Ask a Question

Top