Vegas21 .NET script compatibility

antoni-s wrote on 11/23/2024, 11:54 AM

Hi guys,

Big noob here.

I'm trying to write my first script for sony vegas, and I am not finding a way to have Vegas open my script, both in debug and release versions.

I tried opening the script by running Vegas while in debug mode from Visual Studio, and by opening directly Vegas and open the dll. No success in any case.

When I open the script (tools-> scripting->run script -> my.dll ) I get this exception:

An error occurred during the executon of the script. Error 0x800700002

System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. File not found.
File name: 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
   at System.Reflection.RuntimeAssembly.GetExportedTypes()
   at ScriptPortal.Vegas.ScriptHost.ScriptManager.Run(Assembly asm, String className, String methodName)
   at ScriptPortal.Vegas.ScriptHost.RunScript(Boolean fCompileOnly)

I am not very expert on C# and .NET stuff, but I think it might be a compatibility problem with my Sony Vegas version and the .NET version I am using to build my script, because I found out that, by changing the version of .NET, the version of System.Runtime changes.
 

Here is some details:

- My Sony Vegas version is 21.0
- I tried building the scripts using .NET Core 3.1, .NET 5.0, and .NET 8.0 without success.
- My visual studio version rn is Visual Studio 22.
 

Is this a .NET version problem? If yes what would be the right .NET version to be used in order to build a script that is compatible with Vegas 21?

If it isn't a version problem... does anyone know how to fix this? :s

Thanks a lot in advance!

Comments

jetdv wrote on 11/23/2024, 4:26 PM

Try .NET 4.8. It won't work with 5 or 8. I build all of mine with .NET 4.8. Take a look at my first two tutorials:

Jerry-Malcolm wrote on 12/5/2024, 9:22 AM

Edward, just out of curiosity, is there a reason Vegas 22 is still bound to .net 4.8? I'm trying to utilize some other services in a couple of scripts that require .net 8.0. I know I can create completely separate, independent VS solutions and have them communicate via 'blackbox' communication. But it would sure be nice if Vegas someday (soon) migrated up to .net 8.0. I know 'future plans' can't be discussed. But just curious if there's something specific that's forcing them to stay on 4.8.

jetdv wrote on 12/5/2024, 8:02 PM

All I know is that's the version used by scripts in VEGAS. If you try newer versions, they won't work so I stick with 4.8. There may be many other issues in other areas of VEGAS if they were to try to migrate all or some of it to the newer .net versions.

Howard-Vigorita wrote on 12/6/2024, 4:32 PM

Here's the Visual Studio Installer 22 setup I've been using which works fine for the limited stuff I do... which is mostly Vegas c# scripting and masm apps with occasional Rigaya forks...

I originally selected the components on the Individual Components tab.