Hi Fernando,

Can you submit a bug report for this issue
(http://www.sourceforge.net/projects/nant) ?

I had a very quick look and apparently there seems to be another prefix :

hklm\publicassemblies

But I'm not sure yet what this refers to.

Gert 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Fernando P. N�jera Cano
> Sent: donderdag 2 december 2004 20:50
> To: [EMAIL PROTECTED]
> Subject: [nant-dev] Problem with AssemblyFolderKey and fix details
> 
> Hi,
> 
> First, hello to you all. I'm a developer from Spain and I'm
> investigatin on NAnt. I've so far created a couple of tasks, and
> through my tests I've run across a problem that I think it is simple
> to fix. I've fix it myself but I think you'll want to know.
> 
> In one of my projects we're using ODP.NET (Oracle Data Provider). In
> the .vbproj, VS.NET 2003 has added this:
> 
> <Reference
>    Name = "Oracle.DataAccess"
>    AssemblyName = "Oracle.DataAccess"
>    AssemblyFolderKey = "hklm\dn\odp.net"
> />
> 
> As you can see, the AssemblyFolderKey is "hklm\dn\" and not "hklm\" as
> you expect in NAnt.VSNet\AssemblyReference.cs. More in detail, in the
> line (line 411 in the source pre-release build)
> 
> RegistryKey assemblyFolderRegistryKey = 
> assemblyFolderRegistryRoot.OpenSubKey(assemblyFolderKey.Substring(5));
> 
> It goes to the registry to look for "dn\odp.net" and, obviously, it
> cannot find. So, my project refuses to compile, which is bad :'( :
> 
> BUILD FAILED
> 
> Message: Couldn't find referenced assembly 
> 'C:\oracle\ora92\bin\Oracle.DataAccess.dll'
> 
> In my registry, odp.net is located under
> "HKLM\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders", so I think
> the "\dn\" part is for "\.NETFramework". I think it makes sense.
> 
> BTW, this key in my system it points to 'f:\oracle\ora92\bin\'
> 
> So, the quick fix I've applied is to remove "dn\" if .Substring(5)
> starts with it. I have replaced the line above with these:
> 
> RegistryKey assemblyFolderRegistryKey = null;
> if (assemblyFolderKey.Substring(5).StartsWith("dn\\")) {
> assemblyFolderRegistryKey = 
> assemblyFolderRegistryRoot.OpenSubKey(assemblyFolderKey.Substring(8));
> } else {
> assemblyFolderRegistryKey = 
> assemblyFolderRegistryRoot.OpenSubKey(assemblyFolderKey.Substring(5));
> }
> 
> It's quite dirty but works! BUILD SUCCEEDED! I hope this helps
> somebody. I'll keep subscribed to this list for some time, as I'm
> currently very interested in developing with/for NAnt.
> 
> Best regards,
>                 
> Fernando Najera
> 
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from 
> real users.
> Discover which products truly live up to the hype. Start reading now. 
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> nant-developers mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-developers
> 
> 



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to