Re: [IronPython] clrtype: How to subclass ClrClass?

2010-03-12 Thread Shri Borde
Hi Lukas, the clrtype fix for 
http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=26249 is indeed in 
in 2.6.1.

About this Silverlight error, I am not sure. Including the mailing list in case 
someone else can help.


error CS1685 : Warning as error : The predefined type 'System.Runtime.InteropSe

rvices.DefaultParameterValueAttribute' is defined in multiple assemblies in the

 global alias; using definition from 'c:\IronPython_Main\Src\Runtime\Microsoft.

Scripting.Core\Stubs.cs'

Done Building Project C:\IronPython_Main\Src\Runtime\Microsoft.Scripting.Core\

Microsoft.Scripting.Core.csproj (default targets) -- FAILED.


From: Lukas Cenovsky [mailto:cenov...@bakalari.cz]
Sent: Friday, March 12, 2010 7:47 AM
To: Shri Borde
Subject: Re: [IronPython] clrtype: How to subclass ClrClass?

Unfortunately I am unable to build IronPython for Silverlight. Is it currently 
broken or do I do something wrong?

C:\IronPython_Main\Srcc:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe IronP

ython.sln /p:Configuration=Silverlight Release

Microsoft (R) Build Engine Version 3.5.30729.4926

[Microsoft .NET Framework, Version 2.0.50727.4927]

Copyright (C) Microsoft Corporation 2007. All rights reserved.



Build started 12.3.2010 16:40:57.

Project C:\IronPython_Main\Src\IronPython.sln on node 0 (default targets).

  Building solution configuration Silverlight Release|Any CPU.

Project C:\IronPython_Main\Src\IronPython.sln (1) is building C:\IronPython_

Main\Src\Runtime\Microsoft.Scripting.Core\Microsoft.Scripting.ExtensionAttribut

e.csproj (2) on node 0 (default targets).

Project file contains ToolsVersion=4.0, which is not supported by this versio

n of MSBuild. Treating the project as if it had ToolsVersion=3.5.

PrepareForBuild:

  Creating directory C:\IronPython_Main\Src\..\Bin\Silverlight Release\.

CopyFilesToOutputDirectory:

  Copying file from obj\Silverlight Release\Microsoft.Scripting.ExtensionAttri

  bute.dll to C:\IronPython_Main\Src\..\Bin\Silverlight Release\Microsoft.Scr

  ipting.ExtensionAttribute.dll.

  Microsoft.Scripting.ExtensionAttribute - C:\IronPython_Main\Bin\Silverlight

  Release\Microsoft.Scripting.ExtensionAttribute.dll

  Copying file from obj\Silverlight Release\Microsoft.Scripting.ExtensionAttri

  bute.pdb to C:\IronPython_Main\Src\..\Bin\Silverlight Release\Microsoft.Scr

  ipting.ExtensionAttribute.pdb.

Done Building Project C:\IronPython_Main\Src\Runtime\Microsoft.Scripting.Core\

Microsoft.Scripting.ExtensionAttribute.csproj (default targets).



Project C:\IronPython_Main\Src\IronPython.sln (1) is building C:\IronPython_

Main\Src\Runtime\Microsoft.Scripting.Core\Microsoft.Scripting.Core.csproj (3)

on node 0 (default targets).

Project file contains ToolsVersion=4.0, which is not supported by this versio

n of MSBuild. Treating the project as if it had ToolsVersion=3.5.

Project C:\IronPython_Main\Src\Runtime\Microsoft.Scripting.Core\Microsoft.Scri

pting.Core.csproj (3) is building C:\IronPython_Main\Src\Runtime\Microsoft.Sc

ripting.Core\Microsoft.Scripting.ExtensionAttribute.csproj (2:2) on node 0 (Ge

tTargetPath target(s)).

Project file contains ToolsVersion=4.0, which is not supported by this versio

n of MSBuild. Treating the project as if it had ToolsVersion=3.5.

Done Building Project C:\IronPython_Main\Src\Runtime\Microsoft.Scripting.Core\

Microsoft.Scripting.ExtensionAttribute.csproj (GetTargetPath target(s)).



Project C:\IronPython_Main\Src\Runtime\Microsoft.Scripting.Core\Microsoft.Scri

pting.Core.csproj (3) is building C:\IronPython_Main\Src\Runtime\Microsoft.Sc

ripting.Core\Microsoft.Scripting.ExtensionAttribute.csproj (2:3) on node 0 (Ge

tNativeManifest target(s)).

Project file contains ToolsVersion=4.0, which is not supported by this versio

n of MSBuild. Treating the project as if it had ToolsVersion=3.5.

Done Building Project C:\IronPython_Main\Src\Runtime\Microsoft.Scripting.Core\

Microsoft.Scripting.ExtensionAttribute.csproj (GetNativeManifest target(s)).



error CS1685 : Warning as error : The predefined type 'System.Runtime.InteropSe

rvices.DefaultParameterValueAttribute' is defined in multiple assemblies in the

 global alias; using definition from 'c:\IronPython_Main\Src\Runtime\Microsoft.

Scripting.Core\Stubs.cs'

Done Building Project C:\IronPython_Main\Src\Runtime\Microsoft.Scripting.Core\

Microsoft.Scripting.Core.csproj (default targets) -- FAILED.



Done Building Project C:\IronPython_Main\Src\IronPython.sln (default targets)

 -- FAILED.





Build FAILED.



C:\IronPython_Main\Src\IronPython.sln (default target) (1) -

C:\IronPython_Main\Src\Runtime\Microsoft.Scripting.Core\Microsoft.Scripting.Co

re.csproj (default target) (3) -

(CoreCompile target) -

  error CS1685 : Warning as error : The predefined type 'System.Runtime.Interop

Services.DefaultParameterValueAttribute' is defined in multiple assemblies in t

he global alias; using definition from 'c:\IronPython_Main\Src\Runtime\Microsof

t.Scripting.Core\Stubs.cs

[IronPython] clrtype: How to subclass ClrClass?

2010-02-06 Thread Lukas Cenovsky

Hi all,
it looks like I cannot subclass a class based on ClrClass metaclass:

IronPython 2.6 (2.6.10920.0) on .NET 2.0.50727.4927
Type help, copyright, credits or license for more information.
 import clr
 import clrtype

 class Product(object):
... __metaclass__ = clrtype.ClrClass
...
 p = Product()
 print CLR type name: %s % p.GetType().FullName
CLR type name: Product

 class MyProduct(Product):
... pass
...
Traceback (most recent call last):
 File stdin, line 1, in module
KeyError: The given key was not present in the dictionary.

Is it a bug or am I doing something wrong? Thanks.

--
-- Lukáš


___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] clrtype: How to subclass ClrClass?

2010-02-06 Thread Shri Borde
It is a know bug. I can take a look next week.

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Michael Foord
Sent: Saturday, February 06, 2010 4:10 AM
To: Discussion of IronPython
Subject: Re: [IronPython] clrtype: How to subclass ClrClass?

On 06/02/2010 11:19, Lukas Cenovsky wrote:
 Hi all,
 it looks like I cannot subclass a class based on ClrClass metaclass:

 IronPython 2.6 (2.6.10920.0) on .NET 2.0.50727.4927
 Type help, copyright, credits or license for more information.
  import clr
  import clrtype
 
  class Product(object):
 ... __metaclass__ = clrtype.ClrClass
 ...
  p = Product()
  print CLR type name: %s % p.GetType().FullName
 CLR type name: Product
 
  class MyProduct(Product):
 ... pass
 ...
 Traceback (most recent call last):
 File stdin, line 1, in module
 KeyError: The given key was not present in the dictionary.

 Is it a bug or am I doing something wrong? Thanks.

Hehe, I ran into this a couple of days ago on Silverlight as well.

All the best,

Michael


 -- 
 -- Lukáš


 ___
 Users mailing list
 Users@lists.ironpython.com
 http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


-- 
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog

READ CAREFULLY. By accepting and reading this email you agree, on behalf of 
your employer, to release me from all obligations and waivers arising from any 
and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, 
clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and 
acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your 
employer, its partners, licensors, agents and assigns, in perpetuity, without 
prejudice to my ongoing rights and privileges. You further represent that you 
have the authority to release me from any BOGUS AGREEMENTS on behalf of your 
employer.


___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com