Vulcan.NET: System.InvalidProgramException

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
User avatar
robert
Posts: 4522
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Vulcan.NET: System.InvalidProgramException

Post by robert »

Mathias,
I think there are different versions of the .Net framework on both machines.
When compiling Vulcan does not load the reference assemblies from the "c:Program Files (x86)Reference AssembliesMicrosoftFramework.NETFramework" subfolders (like C# and X# do) but loads the reference assemblies from the c:WindowsMicrosoft.NETFrameworkv4.0.30319 folder.
This has a risk: even if you tell the compiler that you want to compile against version 4.6, it will still resolve your code against the version that is installed in that folder. So you (or the compiler) may use something that is not available in the target framework that you selected.

C# and X# use the reference assemblies from one of the subfolders from the above folder, so you know for sure that you are only using things that are allowed on that particular version of the framework.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Kromi
Posts: 45
Joined: Wed Jan 13, 2016 8:31 am

Vulcan.NET: System.InvalidProgramException

Post by Kromi »

Robert,

you're absolutely right. On my machine there are .NET Framework 4.8 asseblies in the c:WindowsMicrosoft.NETFrameworkv4.0.30319 folder. The other machines have 4.7.
I have found no way to uninstall .NET Framework 4.8 that actually worked on my machine. So I guess I have to re-install Windows again and stick with an older version.

Anyway, thanks a lot for analysis and advice!

Mathias
User avatar
robert
Posts: 4522
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Vulcan.NET: System.InvalidProgramException

Post by robert »

Mathias,

This is exactly the reason why a compiler should compile against the reference assemblies and not against the assemblies in the Windows folder.
I think that converting your Vulcan project files to X# project files and compiling with X# (and maybe setting some compiler options or suppressing some new warnings) will be less work then reinstalling Windows, and will also give you better performance during compiling.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Chris
Posts: 4913
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Vulcan.NET: System.InvalidProgramException

Post by Chris »

Mathias,

Vulcan uses the .Net classes themselves (System.Reflection.Emit) to generate code, so I suspect that what happened is that in the latest framework version something changed in those classes, breaking vulcan code generation. Probably a bug in the update from MS I would guess.

But as Robert said, X# is extremely compatible with vulcan, so it should not take you months to start using the X# compiler instead. I would bet it will take you less than a week actually or less.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply