What are the challenges you face when working across database platforms? Take the survey
Options

Encountered some issues when using Smart Assembly 6.11.2.609 trial

Hi Redgate support,

We are evaluating and we have built several exes and dlls using Smartassembly 6.11.2.609 trial version

We are using VS2010/vb.net for our development

While testing SmartAssembly we encountered the following issues:

1. We weren’t able to build a certain dll, let’s call it Y.dll

Y.dll references Microsoft.Office.Interop.Excel.dll version 14.0.0.0 runtime version 2.0.50727 from C:\Program Files (x86)\Microsoft Visual Studio 10.0\Visual Studio Tools for Office\PIA\Office14\Microsoft.Office.Interop.Excel.dll

Y.dll also references another one of our dlls, X.dll

X.dll also references the same Microsoft.Office.Interop.Excel.dll version 14.0.0.0 runtime version 2.0.50727 from the same location

We could build X.dll, but not Y.dll that references X.dll

Error message:
“SmartAssembly encountered an invalid symbol:
[X.dll]
X.someclassname::SetWorksheet instance System.Int32(class [Y] Microsoft.Office.Interop.Excel.Worksheet, class[Y] Microsoft.Office.Interop.Excel.Application)

The most likely cause is that SmartAssembly has used a different version of a dependency from the version used by Y.dll

If the details below are wrong, please use MandatoryPath attribute in the .saproj file to ensure the correct version of the dependency is found.

Assemby that should contain the missing symbol is X.dll”

In X.someclassname we have this function declaration:
Public Function SetWorksheet(ByRef xlSheet As Excel.Worksheet, ByRef xlApp As Excel.Application) As Integer

Where Excel is the same Assembly Microsoft.Office.Interop.Excel
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Visual Studio Tools for Office\PIA\Office14\Microsoft.Office.Interop.Excel.dll

In Y.dll we are calling that SetWorksheet function

I have edited. saproj file of Y.dll adding
<Assembly AssemblyName="Microsoft.Office.Interop.Excel" MandatoryPath="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Visual Studio Tools for Office\PIA\Office14\Microsoft.Office.Interop.Excel.dll">
<Merging />
</Assembly>

Didn’t seem to make any difference, build of Y.dll still failed


2. When we run one of the Smartassembly build exes we encountered an exception
“Unable to cast object of type 'Telerik.WinControls.UI.Docking.HostWindow' to type '' . '.”
We were able to track the line of code raising the exception:

DirectCast(RadDock1.DockWindows.ToolWindows(0), frmX).callamethod

where frmX is a class that inherits from Telerik.WinControls.UI.Docking.ToolWindow

I’m afraid I am not able to supply the actual dlls for analysis
Any help would be appreciated
Sign In or Register to comment.