.NET Framework Bookmark and Share   
 index > Building Development and Diagnostic Tools for .Net > Import statements fail in Studio 2008 but not in Studio 2005
 

Import statements fail in Studio 2008 but not in Studio 2005

I am a DBA who is learning vb.net and Studio.

I have an SSIS script task (vb.net) which works in SSIS 2005 but not in SSIS 2008. SS2005 is installed on my desktop, and SS 2008 toolsare installed along side it. I believe that all the dll's implied by the Import statements have to be in the c:\Windows\Assembly directory in order for them to be found by the .Net run-time and they appear to be there. But I am not really certain of the reasons. Versions 10 and 9 are in the directory.

Example:

Imports

Microsoft.SqlServer.SqlEnum

Warning1Namespace or type specified in the Imports 'Microsoft.SqlServer.SqlEnum' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.C:\Documents and Settings\mine\Local Settings\Temp\SSIS\1e1cce68c3dc4155b081649a9d299728\ScriptMain.vb99scripttask_729e731450b54855913556e611e5b918


I added the dll's as Resources to the Project and the errors persist. I don't know what else to do. I posted this on the sql server SSIS forum but no one there has ventured a response so I thought this forum might attract more knowledgeable developers.

Thanks,

Michael

SillyMS

Why do you need to import SqlEnum namespace? Which type would you like to use from it?
I cannot find any documentation for this namespace on internet, so I guess it really doesn't have any public members (as the warning says). Therefore there is nothing you can use from it and you should not import it. If you just need to use some other type from different namespace in Microsoft.SqlServer.SqlEnum.dll, then you don't need to add it into Imports. You just need to add that DLL into your project references.

Did you try just delete that import line?
Also note that this is just warning, it is not an error, so you should be fine with 'just' ignoring the warning.

BTW: This questionseems tobe VB.NET question as there is nothing SSIS specific - please use VB.NET forums for similar questions. This forum is dedicated for building tools for .NET developers like profilers, debuggers, compilers, etc. (see sticky post of this forum).

-Karel

All Replies

  • Monday, June 22, 2009 4:54 PMKarel ZikmundMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Why do you need to import SqlEnum namespace? Which type would you like to use from it?
    I cannot find any documentation for this namespace on internet, so I guess it really doesn't have any public members (as the warning says). Therefore there is nothing you can use from it and you should not import it. If you just need to use some other type from different namespace in Microsoft.SqlServer.SqlEnum.dll, then you don't need to add it into Imports. You just need to add that DLL into your project references.

    Did you try just delete that import line?
    Also note that this is just warning, it is not an error, so you should be fine with 'just' ignoring the warning.

    BTW: This questionseems tobe VB.NET question as there is nothing SSIS specific - please use VB.NET forums for similar questions. This forum is dedicated for building tools for .NET developers like profilers, debuggers, compilers, etc. (see sticky post of this forum).

    -Karel

  • Monday, June 22, 2009 7:17 PMSillyMS Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Sorry to have bothered you.
Karel Zikmund

You can use google to search for other answers

Custom Search

More Threads

• XML Documentation for Reflecion Emit
• How to make CustomEvalEventHandler work ?
• Referencing App_GlobalResources from a compiled assembly
• DoStackSnapshot cuts off early?
• Stacktrace Monitoring
• IMetaDataEmit.DefineTypeRefByName for generic types?
• ILAsm syntax
• Break All , Threads
• How to filter Calltree in CLR profiler to show calls from only my DLLs and Exe?
• How do I resolve managed symbol names using the unmanged profiling API In-process?