Microsoft.ExceptionMessageBox not being “found”

前端 未结 2 2060
天命终不由人
天命终不由人 2021-01-07 00:21

I have a winform solution that I deploy through clickOnce. There is the Main Project and then a Project called psWinForms. That project has a Reference to

2条回答
  •  难免孤独
    2021-01-07 01:08

    You can't copy and deploy the assembly yourself, it has to be installed as part of the SQL client components. There are different client components for SQL 2008 and SQL 2005, your application has to reference the proper one. So you'll have to ship two different applications, one compiled for SQL 2005 and one for SQL 2008 and your users will have to install the proper one. From Deploying an Exception Message Box Application:

    The exception message box is installed by Microsoft SQL Server and is supported for use in your custom Windows applications to improve exception handling. Because the exception message box is installed by all editions of SQL Server except SQL Server Compact 3.5 SP1, you can use it with no additional configuration on any computer on which SQL Server client components, including the SDK, have been installed.

    While technically is probably possible to deploy the assembly and add it to the GAC yourself is a bad practice as your dll will not be part of the normal chain of service packs and cummulative upgrade patches.

    Also you better clear up with an MS representative whether deploying this dll standalone is OK with the SQL client usage license or not. Every component that can be redistributed under the license has an install msi available for developers to distribute. If this dll does not is a strong indicator that is not allowed to be redistributed by 3rd parties (you).

    Update

    There is actually a distributable msi (SQLServer2005_EMB.msi, SQLServer2005_EMB_x64.msi) for the ExceptionMessageBox component:

    In SQL Server 2005 SP1 and later releases, the exception message box is also provided as a redistributable installation program that you can distribute and deploy with your application... The redistributable installation program for exception message box is available online as part of the Feature Pack for SQL Server 2005 SP1.

提交回复
热议问题