IVSAReferenceItem problem.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi There.

I'm trying to build an application to use JScript scripts to test some
customer facing APIs. I have an exe that passes JScripts into a dll that then
compiles them using Microsoft.VSA. Everything works great except when I try
to use classes that I've defined myself. The following code should include a
reference to my dll for the JScripts:

string assemName = Assembly.GetExecutingAssembly().Location;
refItem = (IVsaReferenceItem)items.CreateItem(assemName,
VsaItemType.Reference,
VsaItemFlag.None);
refItem.AssemblyName = assemName;

I'm able to declare a class, but when I try to instantiate it I get a
System.IO.FileNotFoundException for my dll. For some reason it appears to be
looking for the dll in C:\Windows\System32 directory, and when I make a copy
of my dll in that directory everything works fine. When I debug and look at
the IVSAEngine the IVSAItem appears to have the right directory/file name in
the AssemblyName property. I'm sure there's something simple I'm missing, but
I can't for the life of me figure out what it is. Any help would be greatly
appreciated.

Cheers,
Dave Jackson

PS. I'm using
Win XP sp2
Visual Studio 2003
..Net Framework 1.1.4322.573
 
I should add that everything is written in C#, hence the posting in the
Dotnet forum, but please direct me elsewhere if necessary. Thanks again.
 
Back
Top