Forum Discussion
sahrens
Apr 05, 2023Copper Contributor
Macro Run-Time Error
I have a spreadsheet that my team uses to generate templates by pulling data from our automation systems. It uses a macro to pull the requested information from a file on a server. To use it, my ...
sahrens
Apr 10, 2023Copper Contributor
Okay, I installed the 4.8.1 version because you said:
"To resolve this issue, you can try updating the .NET Framework on your computer to the latest version."
But it is still not working, and I don't think that going back to an older .NET Framework (3.5) will solve the issue when the error message is:
"This assembly is built by a runtime NEWER than the currently loaded runtime and cannot be loaded."
So what could the root cause be in this case? Is the .NET not properly updated?
Is there a way I can check which version of the .NET Framework that the assembly was built with, and check which version I am running to make sure the download worked properly?
"To resolve this issue, you can try updating the .NET Framework on your computer to the latest version."
But it is still not working, and I don't think that going back to an older .NET Framework (3.5) will solve the issue when the error message is:
"This assembly is built by a runtime NEWER than the currently loaded runtime and cannot be loaded."
So what could the root cause be in this case? Is the .NET not properly updated?
Is there a way I can check which version of the .NET Framework that the assembly was built with, and check which version I am running to make sure the download worked properly?
NikolinoDE
Apr 11, 2023Platinum Contributor
One .NET version does not cancel out the other, as far as I know, both can be installed. If this were or is as you say, then 4.8 would certainly cancel out 3.5 and not the other way around.
If the issue persists even after installing the version 3.5 of .NET Framework, there are a few more steps you can try:
- Make sure all Windows updates are installed. To do this, open Windows Settings and navigate to “Update & Security”. Click on “Check for updates” and install any available updates.
- Check the Excel file for corrupted content. To do this, open the file in Excel and click on “File” > “Info” > “Check for Issues” > “Inspect Document”. Follow the instructions to repair any corrupted content.
- Disable all add-ins in Excel. To do this, open Excel and click on “File” > “Options” > “Add-ins”. Select “Excel Add-ins” from the drop-down menu and click on “Go”. Uncheck all add-ins and click on “OK”.
- Try running the macro in safe mode. To do this, hold down the Ctrl key while opening the Excel file. Click on “Yes” when asked if you want to continue in safe mode.
*If the issue persists, it would be useful to add a file (without sensitive data) with the problem to be able to say more precisely.
As far as I'm aware there is no way to use Excel directly to check the version of .NET Framework an assembly was built with and what version you are running. You could possibly try Visual Studio and use Clrver.exe tool.
Hope these Information helps!