Raj2002, on 20 March 2019 - 09:00 PM, said:
IMPORTANT!!
I discovered new something today!!
When I was using visual studio to debug the source code (running menu.exe), I found that when I changed target .NET Framework version to v4.0, the menu atleast came up however it threw exception
System.TypeInitializationException
…..
Inner Exception 1:
FileLoadException: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
Main crux is that it is possible that .NET Framework 3.5 version pre-installed in my computer may have been corrupted/altered by some software.
Can that be a reason?? I need some advice regarding this so that I can re-install .NET Framework 3.5.
I discovered new something today!!
When I was using visual studio to debug the source code (running menu.exe), I found that when I changed target .NET Framework version to v4.0, the menu atleast came up however it threw exception
System.TypeInitializationException
…..
Inner Exception 1:
FileLoadException: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
Main crux is that it is possible that .NET Framework 3.5 version pre-installed in my computer may have been corrupted/altered by some software.
Can that be a reason?? I need some advice regarding this so that I can re-install .NET Framework 3.5.
if you change the Framework version for whatever reason with the current source code to something newer than 3.5, it will compile but not run out of the box.
In that case, you will need update all app.config to add "useLegacyV2RuntimeActivationPolicy" to enable mixed mode assemblies.
<?xml version="1.0"?> <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/> </startup> </configuration>
However, I'm not sure what you are trying to achieve, and it's unlikely this will fix the problem.
Like other said, there may be issues with either your hardware (memory), or some files in the Windows installation are corrupted.
To check, I'd recommend few steps
- run chkdsk /f
- run sfc /scannow
- run dism.exe /online /cleanup-image /restore health
- run mdsched