none
using Microsoft.SqlServer.Smo.dll in VS2008 RRS feed

  • Question

  • The Microsoft.SqlServer.Smo.dll has two versions registered in the GAC. 9.0.242.0 and 10.0.

    When adding a reference to this dll within VS2008 – only the new version appears in the list After referencing v10.0 and instantiating the Microsoft.SqlServer.Smo.Managment.Server object – the project is not compiling

    The error message is:

    The type 'Microsoft.SqlServer.Management.Sdk.Sfc.ISfcPropertyProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.SqlServer.Management.Sdk.Sfc, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. e:\Program Files\Microsoft SQL Server\100\SDK\Assemblies\Microsoft.SqlServer.Smo.dll: (Related file) The MSDN however indicates that this assebly should not be referenced directly (http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.sdk.sfc.aspx)

    When I manually modifiyied the project file to reference the previous version of Microsoft.SqlServer.Smo.dll problem solved.

    Is was also solved when I simply added reference to microsoft.sqlserver.management.sdk.sfc

    The questions:

    1. Why the previous version of Microsoft.SqlServer.Smo.dll does not appear in the VS reference list although is it installed in the GAC?

    2. Is it OK to reference 'Microsoft.SqlServer.Management.Sdk.Sfc’ despite what is written in MSDN?

    Tx

    Oren

    Wednesday, December 15, 2010 3:58 PM

Answers

  • 1 because visual studio requires a folder to be registered (in registry) before files in the folder can be displayed in the reference dialog. I guess SQL Server 10 either added or replaced the registration

    2 Visit the forums under the SQL Server category. I have no idea what it is for and why you need it, this is certainly outside the scope of the CLR forum.



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    • Marked as answer by eryang Wednesday, December 22, 2010 5:01 AM
    Wednesday, December 15, 2010 4:23 PM
  •  

    Hi Oren,

     

    For your information, you can find SQL Server forums from http://social.msdn.microsoft.com/Forums/en-US/category/sqlserver, the .NET Framework inside SQL Server forum maybe the better place for your question.

     

    Please feel free to let us know if you have any concern.


    Eric Yang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by eryang Wednesday, December 22, 2010 5:01 AM
    Thursday, December 16, 2010 2:33 AM

All replies

  • 1 because visual studio requires a folder to be registered (in registry) before files in the folder can be displayed in the reference dialog. I guess SQL Server 10 either added or replaced the registration

    2 Visit the forums under the SQL Server category. I have no idea what it is for and why you need it, this is certainly outside the scope of the CLR forum.



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    • Marked as answer by eryang Wednesday, December 22, 2010 5:01 AM
    Wednesday, December 15, 2010 4:23 PM
  • The SQL server is installed on this machine. This is a development machine with VS2008 SP1 - so it can not be that SQL server setup made unavailable

     

    Anyway - i will post it in the SQL server forum as you have suggested.

     

    tx

     

    Oren

     

    Wednesday, December 15, 2010 4:41 PM
  •  

    Hi Oren,

     

    For your information, you can find SQL Server forums from http://social.msdn.microsoft.com/Forums/en-US/category/sqlserver, the .NET Framework inside SQL Server forum maybe the better place for your question.

     

    Please feel free to let us know if you have any concern.


    Eric Yang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by eryang Wednesday, December 22, 2010 5:01 AM
    Thursday, December 16, 2010 2:33 AM