Re: Using addins compiled against 2.4.2.0 on 2.4.5.0

"Charlie Poole" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <00b201c83ce9$f5aab0f0$6401a8c0@FERRARI>
Hi Joe,

The config file is being ignored. There are two config files
that are relevant here. One is the config for nunit.exe, which
is loaded by .NET. Since addins are first loaded by the exe,
you would have to add your entry to that config.

The other config file is that for the test. It is also loaded
by .NET, with prompting from NUnit. Since the addin is /also/
loaded in the test domain, you would have to add your entry
to that config as well.

This is only good as an experiment. It's obviously too messy
to have to specify addins in the test config for every test
assembly.

There are things we could do to work around this, but I don't
think it's a good use of time, since we are already designing
the new addin/plugin structure for NUnit 3.0. This is exactly
the sort of problem I want to solve with that release and
it's probably best to put our efforts there.

Charlie

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf 
> Of Joe Davidson
> Sent: Wednesday, December 12, 2007 9:46 AM
> To: [email protected]
> Subject: [Nunit-users] Using addins compiled against 2.4.2.0 
> on 2.4.5.0
> 
> So I went against recommendations and made an addin that 
> references nunit.core (2.4.2.0).
> 
> When I drop it in NUnit 2.4.5's bin/addins directory, it 
> doesn't show up at all in the addins window.
> 
> I tracked it down to AddinManager.Register().
> assembly.GetExportedTypes() is throwing FileLoadException 
> because it's looking for nunit.core 2.4.2.0.
> 
> I made a .config file for the addin's assembly:
> <configuration>
>  <runtime>
>    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
>      <dependentAssembly>
>        <assemblyIdentity name="nunit.core"
> publicKeyToken="96d09a1eb7f44a77" culture="neutral"/>
>        <bindingRedirect oldVersion="2.4.2.0" newVersion="2.4.5.0"/>
>      </dependentAssembly>
>    </assemblyBinding>
>  </runtime>
> </configuration>
> 
> but it's either being ignored or I have it in the wrong place 
> (right next to the addin assembly in bin/addins).
> 
> Of course rebuilding the addin with a reference to the new 
> nunit.core fixes the problem, but I'd like to fix it without 
> doing a rebuild.
> 
> --------------------------------------------------------------
> -----------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for just about 
> anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.n
> et/marketplace
> _______________________________________________
> Nunit-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/nunit-users
> 



-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.