This project has moved. For the latest updates, please go here.

Cannot load Interop

Topics: Crash, Getting Started, Newbie, VST.NET Interop
Apr 4, 2011 at 5:49 PM

Hi,

 

I am totally new to VST.NET and so far I have been able to build the source but I can't get any of the samples working. When I run the VST host from source code, Visual Studio gives me the following error message:

"An unhandled exception of type 'System.BadImageFormatException' occurred in Jacobi.Vst.Samples.Host.exe

Additional information: Could not load file or assembly 'Jacobi.Vst.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format."

 

I tried downloading another VST host but when I point it to the plug-in path (...\VST.NET\Release) I get the following messages:

 

---------------------------
VST.NET Error
---------------------------
System.IO.FileNotFoundException: Could not find the managed VST plugin assembly with either the .net.dll or .net.vstdll extension.

   at Jacobi.Vst.Core.Plugin.ManagedPluginFactory.LoadAssembly(String assemblyName)

   at Jacobi.Vst.Core.Plugin.ManagedPluginFactory.LoadAssemblyByDefaultName(String interopAssemblyPath)

   at Jacobi.Vst.Interop.Bootstrapper.LoadManagedPlugin(String pluginPath, Configuration config)

   at Jacobi.Vst.Interop.VSTPluginMainInternal(Bootstrapper bootstrapper, IntPtr hostCallback)

File name = 'Jacobi.Vst.Interop'.


---------------------------
OK  
---------------------------

 

---------------------------
VST.NET Error
---------------------------
System.IO.FileNotFoundException: Could not load file or assembly 'Jacobi.Vst.Interop, Version=0.9.0.0, Culture=neutral, PublicKeyToken=fa678e13c1efc859' or one of its dependencies. The system cannot find the file specified.

   at Jacobi.Vst.Samples.WrapperPlugin.PluginCommandStubAdapter.GetPluginInfo(IVstHostCommandStub hostCmdStub)

   at Jacobi.Vst.Interop.VSTPluginMainInternal(Bootstrapper bootstrapper, IntPtr hostCallback)

File name = 'Jacobi.Vst.Interop, Version=0.9.0.0, Culture=neutral, PublicKeyToken=fa678e13c1efc859'.

Fusion Log = 'WRN: Assembly binding logging is turned OFF.

To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.

Note: There is some performance penalty associated with assembly bind failure logging.

To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

'.


---------------------------
OK  
---------------------------

 

I have put Jacobi.Vst.Core.dll and Jacobi.Vst.Framework.dll in my GAC. I also installed the VC90.CRT package but still no luck.

Do you have any idea what I am doing wrong?

 

Thanks.

Rob

Coordinator
Apr 5, 2011 at 6:17 AM

The easiest way to test is to put everything into one folder (a folder that is scanned by your host for plugins). You should have Jacobi.Vst.Core and Jacobi.Vst.Framework dll's in that folder as well as the Jacobi.Vst.Samples.Delay.dll (which is actually a renamed version of Jacobi.Vst.Interop) and the Jacobi.Vst.Samples.Delay.vstdll (the actual managed plugin).

Make sure you have a 32-bit host, VST.NET is currenly 32-bit. My guess that the BadImageFormatException is thrown due to a 64/32-bit mismatch.

You could also try the (free) VSTHost(.exe) written by Hermann Seib.

Hope it helps.
Marc

Apr 5, 2011 at 3:11 PM

Hi,

 

Thanks for the quick reply. The host that I was testing things with was the 32-bit version of Hermann Seib's VSTHost. I just assumed that none of the plugins loaded because of the error messages but it turns out that the error messages were being caused by Jacobi.Vst.Samples.WrapperPlugin.dll and Jacobi.Vst.Interop.dll. So all of the other plugins loaded just fine.

I still don't know why I can run Jacobi.Vst.Samples.Host.exe but I guess it's not a big deal now that I realized VSTHost is working.

 

thanks

Rob

Coordinator
Apr 5, 2011 at 6:07 PM

The WrapperPlugin is a special case that requires a config file (with the plugin that is being wrapped).
Interop is not something you have to deploy for a plugin (it is renamed anyway) and perhaps it caused the confusion? (wild guess) The Host sample however does require it.

Note that the code currently supports the x64 build configuration, so make sure you build the 32-bit version of the samples. 64 bit is not tested yet (but could work ;-)

Have fun with it.
Marc