|
|
#81 |
|
Member
Join Date: Aug 2008
Location: Denmark
Posts: 54
|
SlyW: Sorry for the delay. I honestly don't know why .NET Framework SP1 makes things work, but your findings sound resonable.
|
|
|
|
|
|
#82 |
|
Junior Member
Join Date: Aug 2009
Posts: 2
|
Dependency Assemblies
This may be old news, but I believe I have found a fix for the dependent assemblies problem using the AssemblyResolve event. I hope it will be of use to you.
My managed C++ skills are not the greatest, but please find attached my modified source file. Thank you for creating the CLR NSIS plug in. It has proven very valuable - we use it often. Best Regards, David |
|
|
|
|
|
#83 |
|
Member
Join Date: Aug 2008
Location: Denmark
Posts: 54
|
Re: Dependency Assemblies
David, that looks interesting! That is really something I want to fix in the plugin. I will take a look at your code. I don't think this is old news, at least not for me, because I still had no solution to it. If I understand it right, will it then be possible to place the dependant assemblies anywhere and not necessarily in the same folder hierachy as the calling exe/dll?
|
|
|
|
|
|
#84 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
What are the requirements for building this plug-in? Can I build it using VC6?
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#85 |
|
Member
Join Date: Aug 2008
Location: Denmark
Posts: 54
|
No. It has to be at least Visual Studio 2005 as .NET 2.0 must be supported.
|
|
|
|
|
|
#86 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
Too bad... Will just have to wait for the day I finally switch to 2008 I guess. But keep 'em coming. It's a useful plug-in.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#87 |
|
Member
Join Date: Aug 2008
Location: Denmark
Posts: 54
|
The free express editions of VS works too, and can be installed alongside with VC6. Anyway, I will most likely implement Davids modification in the CLR.dll, so the dependant assembly problem will be solved for everyone, without having to recompile the source.
|
|
|
|
|
|
#88 |
|
Junior Member
Join Date: Aug 2009
Posts: 2
|
Hi Claes,
The default assembly resolution mechanism should be called first, so assemblies registered in the GAC should still work. However, if the default assembly resolution fails it will attempt to load the assembly from the directory containing the assembly that was explicitly executed using CallCLR. I suppose it could be modified without a great deal of effort to accept a Java-like class path of directories to search for dependency assemblies. Again, thank you for creating this plug in. We used it to replace a very clunky XML-driven solution that we used to use for performing install tasks from .NET DLLs. Best Regards, David |
|
|
|
|
|
#89 |
|
Junior Member
Join Date: Jun 2010
Posts: 1
|
I notice it has been quite some time since talk of changing the way dependent assemblies are located. Is this no longer likely to happen?
Also, is there any particular reason why the plugin requires the assembly being called to have a .dll extension? I tried making calls to an exe (eg. foo.exe) and received a message indicating that the file (eg. foo.exe.dll) could not be found. |
|
|
|
|
|
#90 |
|
Junior Member
Join Date: Jun 2007
Location: san diego, ca
Posts: 13
|
Has anyone tested with Windows 7? I am trying to recompile my NSIS installer that was built on XP but now it will not work on Windows 7.
I have .NET 2.0 SP1 framework installed and download the newest CLR.zip form http://nsis.sourceforge.net/Call_.NE...ethods_plug-in nsi file PHP Code:
PHP Code:
|
|
|
|
|
|
#91 | |
|
Junior Member
Join Date: Jun 2007
Location: san diego, ca
Posts: 13
|
Quote:
|
|
|
|
|
|
|
#92 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,203
|
Firstly you don't need to extract plug-in DLL's to use them. NSIS handles that itself. Also, if NSIS says a plug-in call is an invalid command then that means your plug-in DLL isn't in the NSIS Plugins folder.
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#93 | |
|
Junior Member
Join Date: Jun 2007
Location: san diego, ca
Posts: 13
|
Quote:
I put the CLR.dll in the \Program Files\NSIS\Plugins\ folder. Just like the second sentence of the CLR wiki says to do. Next time I will RTFM |
|
|
|
|
|
|
#94 |
|
Junior Member
Join Date: Nov 2010
Posts: 7
|
Unicode support
I got stuck for a couple of days when trying to move my installation to a Unicode-based NSIS. All my calls just stopped working. After a vain search for a similar dll, but supporting unicode, I downloaded the original source and upgraded it.
Now this was my first ever experience with c++, so I'm really not sure if I just didn't screw something up, but it worked in a couple of tests I did. I posted the link to the updated code on the Viki page. I moved all the more or less complex functionality to a .net dll now, because all other means of calling dlls (like System::Call) stopped working in the Unicode release of NSIS. |
|
|
|
|
|
#95 |
|
Junior Member
Join Date: May 2006
Posts: 15
|
Is anyone capable of recompiling this to add 4.0 support? It'll execute 4.0 assemblies, but will fail if you use any 3.5+ features (like simple Linq statements).
|
|
|
|
|
|
#96 | |
|
Junior Member
Join Date: Aug 2012
Posts: 2
|
Hi Claes,
I have already problems on setting/getting Properties. Quote:
It seems that on every call will generated a new object instance of the dll. Did you already hav fixed this problem? Or have a solution? Best Regards, Michael |
|
|
|
|
|
|
#97 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,203
|
To avoid incompatibility issues which can occur with different .NET versions I would put your .NET code into a command-line executable and run it using ExecDos.
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#98 |
|
Junior Member
Join Date: Aug 2012
Posts: 2
|
Hi Stu, thanks for the suggestion.
Well, when i do a simple call it works fine with an exe or the dll as well. But when i need to do multiple calls, i think i will have a problem with an exe. (ex. i have to do some database related work and in OLEDB-PLUGIN script files are limited to 60k, so i wrote a .net dll ) Best regards Michael Last edited by mfiedlerwd; 20th August 2012 at 09:36. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|