| Author |
Message |
cbiggerstaff
Joined: 11 Jan 2007 Posts: 3
|
Posted: Wed Nov 09, 2011 9:48 pm Post subject: Allow embedding any assembly |
|
|
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. |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6369 Location: Red Gate Software
|
Posted: Fri Nov 11, 2011 10:47 am Post subject: |
|
|
Hello,
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:
| Code: |
var ps = new DevExpress.XtraPrinting.PrintingSystem();
ps.PageSettings.PaperKind = PaperKind.Letter; |
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. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
nkilian
Joined: 10 Dec 2009 Posts: 11 Location: South Africa
|
Posted: Tue Feb 21, 2012 10:54 am Post subject: |
|
|
| I'm having the same problem hee, but with Reactive Extensions: System.CoreEx and System.Reactive. Instantiating and using classes from either DLL in my main project doesn't help, SA still doesn't see them as dependencies. Is this something to do with the fact they they're in the System namespace? |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6369 Location: Red Gate Software
|
Posted: Tue Feb 21, 2012 11:10 am Post subject: |
|
|
I have to say I honestly don't know - where can we get these "reactive" components or can you provide us with a sample application? _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
nkilian
Joined: 10 Dec 2009 Posts: 11 Location: South Africa
|
Posted: Tue Feb 21, 2012 11:25 am Post subject: |
|
|
They're an MS Labs library all the cool guys are using: http://msdn.microsoft.com/en-us/data/gg577609
IObserver<T> and IObservable<T> are probably the most common uses, I specifically use IEvent<T> in this case. |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6369 Location: Red Gate Software
|
Posted: Tue Feb 21, 2012 12:08 pm Post subject: |
|
|
The output of a .NET Console project referencing System.CoreX and System.Interactive can be successfully processed by SmartAssembly 6.6.
Maybe your dependencies have moved-have you tried setting MandatoryPath to the Reactive Extensions folder?
http://www.red-gate.com/supportcenter/Content/SmartAssembly/help/6.6/SA_SearchingForDependencies _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
nkilian
Joined: 10 Dec 2009 Posts: 11 Location: South Africa
|
Posted: Tue Feb 21, 2012 12:17 pm Post subject: Re: |
|
|
| Brian Donahue wrote: |
| The output of a .NET Console project referencing System.CoreX and System.Interactive can be successfully processed by SmartAssembly 6.6. |
But can they be embedded or merged? |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6369 Location: Red Gate Software
|
Posted: Tue Feb 21, 2012 12:25 pm Post subject: |
|
|
Sorry, yeah effectively SmartAssembly can mess up dependencies in two different ways, you can get an error that it can't find the assembly during the analysis, and then if that passes you may also just end up with the dependency missing from the list of assemblies you can merge or embed.
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. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
nkilian
Joined: 10 Dec 2009 Posts: 11 Location: South Africa
|
Posted: Tue Feb 21, 2012 12:51 pm Post subject: |
|
|
| Thanks. Tried the DWORD in both HKLM and HKCU with no luck even after a reboot. Will attempt the ILDSAM route next. |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6369 Location: Red Gate Software
|
Posted: Wed Feb 22, 2012 1:25 pm Post subject: |
|
|
What is the version of SA you are using? _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
nkilian
Joined: 10 Dec 2009 Posts: 11 Location: South Africa
|
Posted: Thu Feb 23, 2012 4:07 pm Post subject: |
|
|
| Version 6.6.2.35 |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6369 Location: Red Gate Software
|
Posted: Thu Feb 23, 2012 5:25 pm Post subject: |
|
|
The old trick of reassembling the assembly doesn't seem to work. Maybe the problem is that all of the namespaces in the CoreEx DLL extend the System namespace. I tried turning on logging in SmartAssembly and it didn't print out any messages at all about this DLL, so I'll have to go through the SmartAssembly source code and see what the problem is.
But I'm pretty sure SA is just not liking the System namespace they use in that DLL. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
nkilian
Joined: 10 Dec 2009 Posts: 11 Location: South Africa
|
Posted: Mon Mar 05, 2012 4:15 pm Post subject: |
|
|
| Thanks Brian, any idea when there'll be a viable workaround or built-in solution? |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6369 Location: Red Gate Software
|
Posted: Mon Mar 05, 2012 4:46 pm Post subject: |
|
|
You can *try* adding the SupportsMergingFramework registry key, which is supposed to allow you to merge/embed System anmespaces but it didn't work in my reproduction.
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Red Gate\SmartAssembly 6\SupportsMergingFramework should be a DWORD and have the value set to 1. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
nkilian
Joined: 10 Dec 2009 Posts: 11 Location: South Africa
|
Posted: Thu Mar 15, 2012 12:35 pm Post subject: |
|
|
| Yup, tried that, no success either. |
|
| Back to top |
|
 |
|