This is a bug. Unfortunately it looks like one of the version numbers didn't
get updated. In Src\Microsoft.Scripting\Hosting\PlatformAdapationLayer.cs
there are currently some version numbers hard-coded until we get a better
configuration story:
PlatformAdaptationLayer.cs:
_assemblyFullNames.Add("microsoft.scripting", "Microsoft.Scripting,
Version=1.0.0.100, PublicKeyToken=b03f5f7f11d50a3a");
PlatformAdaptationLayer.cs:
_assemblyFullNames.Add("microsoft.scripting.vestigial",
"Microsoft.Scripting.Vestigial, Version=1.0.0.100, PublicKeyToken
=b03f5f7f11d50a3a");
PlatformAdaptationLayer.cs: _assemblyFullNames.Add("ironpython",
"IronPython, Version=2.0.0.100, PublicKeyToken=b03f5f7f11d50a3a");
PlatformAdaptationLayer.cs:
_assemblyFullNames.Add("ironpython.modules", "IronPython.Modules,
Version=2.0.0.100, PublicKeyToken=b03f5f7f11d50a3a");
Those should all be .200 for the alpha 2 release.
We have a better script for automatically updating these so this shouldn't be
an issue w/ future releases (and hopefully these hard coded strings will go
away fairly soon anyway). Sorry for the trouble.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Foord
Sent: Sunday, July 01, 2007 12:01 PM
To: Discussion of IronPython
Subject: [IronPython] IronPython 2.0 Alpha 2
Hello all,
I've been playing with a simple C# script illustrating embedding
IronPython 2.0.
The following code works fine for 2.0 Alpha 1:
using System;
using Microsoft.Scripting;
namespace IronPythonScriptHost
{
class Program
{
static void Main(string[] args)
{
string code = "print \"Hello\" + Name";
Script.SetVariable("Name", "Nick");
Script.Execute("py", code);
Console.Read();
}
}
}
When run with 2.0 Alpha 2, it produces the following error (saying that
the version of the Python language provider is incorrect):
Unhandled Exception: Microsoft.Scripting.MissingTypeException: Type
'IronPython, Version=2.0.0.100, Culture=neutral,
PublicKeyToken=31bf3856ad364e35,
IronPython.Hosting.PythonLanguageProvider' is missing or cannot be
loaded. ---> System.IO.FileLoadException: Could not load file or
assembly 'IronPython, Version=2.0.0.100, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
The located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
File name: 'IronPython, Version=2.0.0.100, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' at
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&
stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at
Microsoft.Scripting.Hosting.PlatformAdaptationLayer.LoadAssembly(String
name)
at
Microsoft.Scripting.ScriptDomainManager.LanguageProviderDesc.LoadProvider(ScriptDomainManager
manager)
As far as I can see from the docs, this part of the API should still
work, and I am referencing the DLLs provided in the Alpha 2 release. Any
clues?
Michael Foord
http://www.voidspace.org.uk/ironpython/index.shtml
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com