#250 AssemblyFolderKey prefixes

0.85
closed-fixed
Core (183)
5
2004-12-18
2004-12-02
No

In short: there are at least 4 prefixes for
AssemblyFolderKey item in .vbproj which are (from
http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/dv_vstechart/html/vstch_multivercomponent.asp ):

hkcu\<keyname>
hklm\<keyname>
hkcu\dn\<keyname>
hklm\dn\<keyname>

But NAnt does not expect "\dn\" prefix and it fails when
founds one of them.

Proposed fix:

In NAnt.VSNet\AssemblyReference.cs, abuot line 411,
replace

RegistryKey assemblyFolderRegistryKey =
assemblyFolderRegistryRoot.OpenSubKey
(assemblyFolderKey.Substring(5));

with:

RegistryKey assemblyFolderRegistryKey = null;
if (assemblyFolderKey.Substring(5).StartsWith("dn\\")) {
assemblyFolderRegistryKey =
assemblyFolderRegistryRoot.OpenSubKey
(assemblyFolderKey.Substring(8));
} else {
assemblyFolderRegistryKey =
assemblyFolderRegistryRoot.OpenSubKey
(assemblyFolderKey.Substring(5));
}

Tested with 0.85-rc1 source. The proposed fix makes
the project buildable again.

Discussion

  • Fernando P. Nájera Cano

    Logged In: YES
    user_id=869400

    Gert Driesen adds more information on this:

    Found some information here:

    http://weblogs.asp.net/jdanforth/archive/2003/12/16/43841.a
    spx

    I also attached a great document I got from MS a while ago,
    which provides a
    lot of details on how assemblies are resolved in VS.NET.

    It will take quite some effort to implement this, though.

     
  • Gert Driesen

    Gert Driesen - 2004-12-17

    Logged In: YES
    user_id=707851

    Fernando,

    The latest nightly build should fix this issue, but I need to
    perform some more testing.

    Can you verify whether it fixes the problems you had ?

     
  • Gert Driesen

    Gert Driesen - 2004-12-18
    • assigned_to: nobody --> drieseng
    • status: open --> closed-fixed
     
  • Gert Driesen

    Gert Driesen - 2004-12-18

    Logged In: YES
    user_id=707851

    Don't hesitate to reopen this bug report if you notice any
    issues.

     
  • Fernando P. Nájera Cano

    Logged In: YES
    user_id=869400

    It works as expected. Thank you!

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks