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 tools are 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
Warning 1 Namespace 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.vb 9 9 scripttask_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
Risposte
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 question seems to be 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- Contrassegnato come rispostaZhi-Xin YeMSFT, Moderatorevenerdì 26 giugno 2009 11.56
Tutte le risposte
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 question seems to be 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- Contrassegnato come rispostaZhi-Xin YeMSFT, Moderatorevenerdì 26 giugno 2009 11.56
- Sorry to have bothered you.

