[IronPython] to invoke ironpython from runtime in .NET framework 4.0

David DiCato ddicato at microsoft.com
Fri Jan 29 06:29:33 CET 2010


>From a development and testing perspective, few other changes (if any) should be required, and are best addressed on a case-by-case basis. We're definitely trying to minimize the number of breaking changes between the .NET 2.0 and 4.0 builds, especially any that would be visible from pure Python. That being said, some changes are inevitable, so this is not a 100% guarantee. Personally, I would suggest testing against both builds of IronPython well before the migration. Whether or not such testing is feasible, we'd love to hear from you and help sort out any problems you run into.

As for your last question, it sort of depends on what you mean by "official" (for example, we don't ship in-the-box with Visual Studio). But by almost any other standard, IronPython and IronRuby are both official Microsoft dynamic languages.

Happy scripting!
- David

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Neelima Potti
Sent: Thursday, January 28, 2010 6:59 AM
To: 'Discussion of IronPython'
Subject: Re: [IronPython] to invoke ironpython from runtime in .NET framework 4.0


Thank you David. That explains the things.
We have a .NET application on .NET framework 3.5 where we want to use IronPython for some validations. This application will be eventually migrated to .NET 4.0.
So my question is if we develop using IronPython 2.6, when we migrate to .NET 4.0, what are the changes required for Ironpython?
Is it only the references that need to be replaced with IronPython 2.6 CTP references or will there be subsequent changes that need to be done?
Will there be any changes from development, testing perspective?

And other trivial Q: Is IronPython an official Micorsoft dynamic scripting language?

Thank you
Neelima

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of David DiCato
Sent: Tuesday, January 26, 2010 4:58 PM
To: Discussion of IronPython
Subject: Re: [IronPython] to invoke ironpython from runtime in .NET framework 4.0

The DLR is not exclusively for .NET 4.0, and until recently, it was not part of the framework. Starting with .NET 4.0, core bits of the DLR have been added as a feature.

IronPython 2.6 runs on .NET 2.0 SP1 and contains its own distribution of the DLR. The release page refers to this distribution when it mentions the update. On the other hand, IronPython 2.6 CTP for .NET 4.0 Beta 2 does not need to include the DLR core.

Hope this clears things up,
- David

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Neelima Potti
Sent: Tuesday, January 26, 2010 1:24 PM
To: 'Discussion of IronPython'
Subject: Re: [IronPython] to invoke ironpython from runtime in .NET framework 4.0

Thank you Dino...it worked.
but I have a Q:
http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=12482... Whose release notes say "Updating to the latest version of the DLR"..so doesn't that mean it is .NET framework 4.0 as DLR is for .NET 4.0
http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=28125 ..."IronPython 2.6 CTP for .NET 4.0 Beta 2".
In terms of DLR..what is the difference between the above 2 releases...

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland
Sent: Monday, January 25, 2010 4:51 PM
To: Discussion of IronPython
Subject: Re: [IronPython] to invoke ironpython from runtime in .NET framework 4.0

You need to download the version of IronPython which is built for .NET 4.0: http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=28125

That'll just work and it'll support interop w/ C# 4.0.

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Neelima Potti
Sent: Monday, January 25, 2010 1:48 PM
To: users at lists.ironpython.com
Subject: [IronPython] to invoke ironpython from runtime in .NET framework 4.0

Hi,
I am new to IronPython..
I have downloaded IronPython from the website
http://www.codeplex.com/IronPython lastweek.
When I open IronPython Console, it shows
IronPython 2.6 (2.6.10920.0) on .NET 2.0.50727.3053

I am trying to invoke the Python engine at run time
By calling in c# source(.NET 4.0 framework)

_runtime = ScriptRuntime.CreateFromConfiguration()

When I add Microsoft.Scripting as a Reference to this project, it shows the version as 2.6.911.0

And my app.config has

<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="microsoft.scripting" type="Microsoft.Scripting.Hosting.Configuration.Section, Microsoft.Scripting, Version=2.6.911.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
  </configSections>
  <microsoft.scripting>
    <languages>
      <language names="IronPython,Python,py" extensions=".py" displayName="IronPython 2.0 Beta" type="IronPython.Runtime.PythonContext,IronPython, Version=2.0.0.0000, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </languages>
  </microsoft.scripting>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>


During runtime, I get the error:
An error occurred creating the configuration section handler for microsoft.scripting: Could not load file or assembly 'Microsoft.Scripting, Version=2.6.911.0, 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

What am I missing here? Is my version wrong or publicKeyToken wrong or??

Any help would be greatly appreciated

Thank you
NPotti


Click here<https://www.mailcontrol.com/sr/WSxS7jK8MNnTndxI!oX7UiNQo6b55PW6krXvwLfSLzORUhF!aIXAHsg9ErZRenzw1SwZVmyjaGsNWyQ1f1p+mg==> to report this email as spam.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100129/cf46bbf0/attachment.html>


More information about the Ironpython-users mailing list