5

Closed

Better error message for running ir.exe on pre-.Net 2.0 SP1

description

(from Ben Hall)
 
I'm running a machine without .Net 2.0 SP1 installed, when I run ir it throws an unhandled exception. I assume this
is the reason why it can't load the assembly.
 
C:\Documents and Settings\ben.hall\Desktop\DLR.10216\Release>ir
 
Unhandled Exception: System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration
section handler for microsoft.scripting: Could not load file or assembly 'Microsoft
.Scripting, Version=1.0.0.5000, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located
assembly's manifest definition does not match the assembly reference. (Excepti
on from HRESULT: 0x80131040) (C:\Documents and Settings\ben.hall\Desktop\DLR.10216\Release\ir.exe.Config line 4) --->
System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Scripting,
Version=1.0.0.5000, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's
manifest definition does not match the assembly reference. (Exception from HRE
SULT: 0x80131040)
File name: 'Microsoft.Scripting, Version=1.0.0.5000, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at System.Configuration.TypeUtil.GetTypeWithReflectionPermission(IInternalConfigHost host, String typeString, Boolean
throwOnError)
at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.Init(RuntimeConfigurationRecord
configRecord, FactoryRecord factoryRecord)
at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.InitWithRestrictedPermissions(RuntimeC
onfigurationRecord configRecord, FactoryRecord factoryRecord)
at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory..ctor(RuntimeConfigurationRecord
configRecord, FactoryRecord factoryRecord)
at System.Configuration.RuntimeConfigurationRecord.CreateSectionFactory(FactoryRecord factoryRecord)
at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean&
isRootDeclaredHere)
 
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].
 
--- End of inner exception stack trace ---
at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean&
isRootDeclaredHere)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean
checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Objec
t& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean
checkPermission)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String
sectionName)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at Microsoft.Scripting.Hosting.Configuration.Section.LoadRuntimeSetup(ScriptRuntimeSetup setup, Stream configFileStream)
in c:\NB\DLR\10216\Runtime\Src\Microsoft.Scripting\Hosting\Configuration\Sec
tion.cs:line 116
at Microsoft.Scripting.Hosting.Shell.ConsoleHost.CreateRuntimeSetup() in
c:\NB\DLR\10216\Runtime\Src\Microsoft.Scripting\Hosting\Shell\ConsoleHost.cs:line 79
at Microsoft.Scripting.Hosting.Shell.ConsoleHost.Run(String[] args)
in c:\NB\DLR\10216\Runtime\Src\Microsoft.Scripting\Hosting\Shell\ConsoleHost.cs:line 169
at RubyConsoleHost.Main(String[] args) in c:\NB\DLR\10216\Languages\Ruby\Utils\ironruby.console\Program.cs:line 45
 
 
 
When I run IronPython, it displays a nice error message.
 
C:\Documents and Settings\ben.hall\Desktop\DLR.10216\Release>ipy
IronPython requires .NET 2.0 SP1 or later to run.
Closed Jul 22, 2009 at 10:17 PM by jredville

comments