Allow embedding any assembly
cbiggerstaff
Posts: 5
SA doesn't always detect all the assemblies needed which basically forces me to use an installer on projects I wouldn't want to otherwise or include dlls along with exe versus having the single exe solution that I really appreciate SA can usually create.
In particular here's some dlls (needed) it doesn't detect (Devexpress suite and Entity Spaces):
DevExpress.XtraBars.v11.1.dll
DevExpress.XtraPrinting.v11.1.dll
DevExpress.XtraTreeList.v11.1.dll
EntitySpaces.DebuggerVisualizer.dll
To work around this (and added extra functionality) I'd love to see SA add option to browse for an assembly and add it to the embedded assembly list.
In particular here's some dlls (needed) it doesn't detect (Devexpress suite and Entity Spaces):
DevExpress.XtraBars.v11.1.dll
DevExpress.XtraPrinting.v11.1.dll
DevExpress.XtraTreeList.v11.1.dll
EntitySpaces.DebuggerVisualizer.dll
To work around this (and added extra functionality) I'd love to see SA add option to browse for an assembly and add it to the embedded assembly list.
Comments
SmartAssembly has had numerous problems merging/embedding DevExpress components. Some are explicitly ignored by SA (for reasons that are completely undocumented) but sometimes it seems you can get the dependency recognized by creating an instance of the devexpress object somewhere in the code. For instance: That has been proven to work for XtraPrinting.dll. You can try instantiating some classes in one of the other DLLs and see if that works.
IObserver<T> and IObservable<T> are probably the most common uses, I specifically use IEvent<T> in this case.
Maybe your dependencies have moved-have you tried setting MandatoryPath to the Reactive Extensions folder?
http://www.red-gate.com/supportcenter/C ... pendencies
In the latter case, it's probably because the assemblies are signed with Microsoft's public key so it thinks they're part of the .NET Framework.
There is a secret registry key you can try setting, but I can't make any guarantee it will work or won't have any other ill effects: create a new DWORD HKEY_LOCAL_MACHINE\SOFTWARE\Red Gate\SmartAssembly 6\SupportsMergingFramework and set the value to 1
The other possible workaround is to ILDASM Microsoft's assembly and re-link and sign it using your own public key.
But I'm pretty sure SA is just not liking the System namespace they use in that DLL.
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Red Gate\SmartAssembly 6\SupportsMergingFramework should be a DWORD and have the value set to 1.
Also trying to Embed System.Reactive extensions
Tried the Registry key fix.
Have also tried updating the saproj file with the following, to no avail.
<Assembly AssemblyName="System.CoreEx, Culture=neutral, PublicKeyToken=31bf3856ad364e35" MandatoryPath="_lib\System.Reactive\System.CoreEx.dll">
<Embedding Embed="1" />
<Merging />
</Assembly>
I have the same issue.
Sorry about the double post. Original was supposed to be replying to this post..
Also trying to Embed System.Reactive extensions
Tried the Registry key fix.
Have also tried updating the saproj file with the following, to no avail.
<Assembly AssemblyName="System.CoreEx, Culture=neutral, PublicKeyToken=31bf3856ad364e35" MandatoryPath="_lib\System.Reactive\System.CoreEx.dll">
<Embedding Embed="1" />
<Merging />
</Assembly>
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Red Gate\SmartAssembly 6\SupportsMergingFramework
should be a String Value (reg_sz) set to 1.