The exception:
System.Exception: Couldn't find referenced type
library 'C:\WINDOWS\system32\Msvbvm60.dll\3'.
at NAnt.VSNet.Reference.HandleWrapperImport
(XmlElement elemReference) in D:\Program
Files\NAnt\NAnt.84\src\NAnt.VSNet\Reference.cs:line
387
at NAnt.VSNet.Reference..ctor(Solution solution,
ProjectSettings ps, XmlElement elemReference,
SolutionTask solutionTask, String outputDir) in
D:\Program Fil
es\NAnt\NAnt.84\src\NAnt.VSNet\Reference.cs:line 124
at NAnt.VSNet.Project.Load(Solution sln, String
projectPath) in D:\Program Files\NAnt\NAnt.84
\src\NAnt.VSNet\Project.cs:line 194
at NAnt.VSNet.ProjectFactory.LoadProject(Solution
sln, SolutionTask slnTask,TempFileCollection tfc, String
outputDir, String path) in D:\Program Files\NAnt\
NAnt.84\src\NAnt.VSNet\ProjectFactory.cs:line 70
[more deleted...]
As best I can tell, the problem is because the
HandleWrapperImport method encounters a typelib
registration format it isn't expecting. The problem occurs
in the lines:
_typelibFile = (string) registryKey.GetValue(null);
if (!File.Exists(_typelibFile)) {
throw new Exception(string.Format
(CultureInfo.InvariantCulture,
"Couldn't find referenced type library '{0}'.",
_typelibFile));
The value for the VB.NET runtime library
is "C:\WINDOWS\system32\Msvbvm60.dll\3", where I
believe the "\3" on the end refers to the resource id.
Some other typelib registrations also have this format so
I don't believe it is an error, although I am by no means
a COM registration wizard.
My workaround is to remove the last two characters if
the string ends in "\3", but that's obviously not so
robust, and I'm not sure if there's other code that would
depend on loading the typelib resource out of the file. It
did seem to fix the problem.
So long,
JR
Logged In: YES
user_id=707851
This should work fine in NAnt 0.85.
Can you try NAnt 0.85 RC1 or a recent nightly build
(http://nant.sourceforge.net/nightly/latest) and let us know
if that worked fine ?
Logged In: YES
user_id=707851
Ping !
Logged In: YES
user_id=1206079
See attached file.
Logged In: YES
user_id=707851
Thanks for the additional info. It would be great if you could
send me a repro for the new issue you ran into.
Zip with sample project and .build file
Logged In: YES
user_id=1206079
Hi,
The attached .zip has a sample project and NAnt build file. If
I compile with Visual Studio and then run the CompileIt.cmd
file (I run in the same directory; vbc.exe has to be on the
path), the vbc.exe runs fine. If I compile using NAnt (using
the include .build file) or, once NAnt has rebuilt the Interops,
try to run the CompileIt.cmd, I get the error I was describing.
So long,
JR
Logged In: YES
user_id=707851
This is now fixed in cvs, but one with one (serious) limitation:
If type library A references type library B, then we should
first import type library B and use a reference to that
imported type library when we import type library A.
However, I have no way to find out in which order the type
libraries should be imported. So only if type library B is first
listed in your project file, it will work fine.
If you can shed some more light on how we can analyse a
type library to determine dependencies on other type
libraries, then please provide us with that information and
we'll look into adding it to the <solution> task ASAP.