2
Vote

Error reference ExceptionMessageBox

description

Hello,

there are some issues about the reference "Microsoft.ExceptionMessageBox".

I try run the binary in Windows 8.1 but I can't. Where I can find this component?

To resolve, I did this change do project:

1- Download de source

2- Open solution in Visual Studio 2013

3- Force load all projects (rigth click / load)

4- Remove the reference "Microsoft.SqlServer.MessageBox" from project "SQLAzureMV"

5- Remove all references to namespace from this assembly: "using Microsoft.SqlServer.MessageBox"

6- In file: SQLAzureMigration\SQLAzureMWUtils\Dependencies\Dependencies.xml
remove the element: <Dependency> from assembly: Microsoft.ExceptionMessageBox

7- \SQLAzureMigration\SQLAzureMW\ErrorHelper.cs

Change the lines:
ExceptionMessageBox emb = new ExceptionMessageBox(ex);
emb.Show(owner);

to:
MessageBox.Show(owner, ex.Message, "Erro", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

8- Compile and run the application.


Can you consider change this in the official release?

comments

ghuey wrote Mar 11 at 4:11 PM

Hi,

The Microsoft.ExceptionmessageBox.dll assembly is part of SQL Server install. If you don't have it, then one of the check boxes was not selected that needed to be selected. The dll is found here on my machine:

C:\Program Files (x86)\Microsoft SQL Server\110\SDK\Assemblies\Microsoft.ExceptionMessageBox.dll

That said, I will think on this. I love the SQL ExceptionMessageBox. I might just have to write my own. Anyway, I will think on this and see if I can figure out which check box installs ExceptionMessageBox.

Thanks for your suggestion,
George

educoutinho wrote Mar 11 at 7:56 PM

My computer also has the dll in the path indicated (C:\Program Files (x86)\Microsoft SQL Server\110\SDK\Assemblies\Microsoft.ExceptionMessageBox.dll), although this is not automatic referenced in program. Consider include information about how to find this dll in project home.

Using the version without this reference I could copy a database from Amazon EC2 to Amazon RDS instance and the program worked well, so thank you for develop and publish the programan.

HockeyJustin wrote Mar 31 at 8:01 PM

Was using Windows 8.1 and having trouble with the missing .dll. Got me up and running in no time. Excellent tool too.

BrandonHaynes wrote Jun 14 at 8:05 PM

I happened to have an older version of SQL Server installed (2008 R2). For anyone with this problem, you can just use a binding redirect by adding the following to the .config:

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
        <assemblyIdentity name="Microsoft.ExceptionMessageBox" publicKeyToken="89845dcd8080cc91"/>
        <bindingRedirect oldVersion="11.0.0.0" newVersion="10.0.0.0"/>
    </dependentAssembly>
</assemblyBinding>
</runtime>

Substitute whatever newVersion is appropriate for the assembly that you happen to have installed. (This may not work for all previous version of SQL Server.)

brianunikey wrote Sep 5 at 7:27 PM

I have SQL Server 2014 and I had to change the Version to 12.0.0.0 in Dependencies.xml

ghuey wrote Sep 5 at 8:10 PM

Hi,

Try running SQLAzureMW v5.10. I removed all dependencies of Microsoft.ExceptionMessageBox and removed it from the Dependencies.xml file.

Let me know if you are still having problems after running v5.10 and I will be happy to work with you.

Thanks,
George

brianunikey wrote Sep 5 at 9:14 PM

Thanks George! I have SQL Server 2014 and wasn't using v5.10