'ExpandoObject' is ambiguous in the namespace 'System.Dynamic'.

Jun 21, 2010 at 6:15 PM
Edited Jun 21, 2010 at 6:19 PM

I am geting this error trying use ExpandoObject: 'ExpandoObject' is ambiguous in the namespace 'System.Dynamic'.

The code firing this error is so simple:

Imports System.Collections.Generic
Imports System.Dynamic Imports Microsoft.Scripting Imports Microsoft.Scripting.Hosting Imports System.Xml.Linq Public Class ScriptContext Private _scope As ScriptScope Public Values As Object Protected Friend Shared Function CreateContext(ByVal Engine As ScriptEngine) As ScriptContext Dim context As New ScriptContext context._scope = Engine.CreateScope() context.Values = New Dynamic.ExpandoObject() Return context End Function End Class
What is wrong?
Coordinator
Jun 21, 2010 at 7:13 PM

Please make sure you're using our DLLs compiled for .net 4.0, not .net 3.5.

Bill

From: Ildefonso [mailto:notifications@codeplex.com]
Sent: Monday, June 21, 2010 10:16 AM
To: Bill Chiles
Subject: 'ExpandoObject' is ambiguous in the namespace 'System.Dynamic'. [dlr:216771]

From: Ildefonso

I am geting this error trying use ExpandoObject: 'ExpandoObject' is ambiguous in the namespace 'System.Dynamic'.

The code firing this error is so simple:

Imports System.Collections.Generic
Imports Microsoft.Scripting
Imports Microsoft.Scripting.Hosting
Imports System.Xml.Linq
 
Public Class ScriptContext
 
    Private _scope As ScriptScope
 
    Public Values As Object
 
    Protected Friend Shared Function CreateContext(ByVal Engine As ScriptEngine) As ScriptContext
        Dim context As New ScriptContext
        context._scope = Engine.CreateScope()
        context.Values = New Dynamic.ExpandoObject()
        Return context
    End Function
End Class
What is wrong?

Read the full discussion online.

To add a post to this discussion, reply to this email (dlr@discussions.codeplex.com)

To start a new discussion for this project, email dlr@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Jun 21, 2010 at 9:53 PM

Hi, Bill. Thanks your help.

Unfortunately I am just using a version that was compiled in my PC using VS2010 with .Net 4. And I got a lot of problems.

Where can I get a compiled version?

Ricardo.

Coordinator
Jun 21, 2010 at 10:04 PM

One easy way is to just download IronPython – we produce binaries for both .NET 2 and .NET 4 here: http://ironpython.codeplex.com/releases/view/36280 and they include the DLR.

From: Ildefonso [mailto:notifications@codeplex.com]
Sent: Monday, June 21, 2010 1:54 PM
To: Dino Viehland
Subject: Re: 'ExpandoObject' is ambiguous in the namespace 'System.Dynamic'. [dlr:216771]

From: Ildefonso

Hi, Bill. Thanks your help.

Unfortunately I am just using a version that was compiled in my PC using VS2010 with .Net 4. And I got a lot of problems.

Where can I get a compiled version?

Ricardo.

Read the full discussion online.

To add a post to this discussion, reply to this email (dlr@discussions.codeplex.com)

To start a new discussion for this project, email dlr@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Jun 21, 2010 at 10:10 PM

Of course Dino is correct. Those binaries will work. But Ricardo, I take it you’re building sources from DLR.Codeplex.com. This should work as well. Are you building the 1.0 release or the latest source in the repository? Which configuration are you building?

From: dinov [mailto:notifications@codeplex.com]
Sent: Monday, June 21, 2010 2:04 PM
To: Ryan Dawson
Subject: Re: 'ExpandoObject' is ambiguous in the namespace 'System.Dynamic'. [dlr:216771]

From: dinov

One easy way is to just download IronPython – we produce binaries for both .NET 2 and .NET 4 here: http://ironpython.codeplex.com/releases/view/36280 and they include the DLR.

From: Ildefonso [mailto:notifications@codeplex.com]
Sent: Monday, June 21, 2010 1:54 PM
To: Dino Viehland
Subject: Re: 'ExpandoObject' is ambiguous in the namespace 'System.Dynamic'. [dlr:216771]

From: Ildefonso

Hi, Bill. Thanks your help.

Unfortunately I am just using a version that was compiled in my PC using VS2010 with .Net 4. And I got a lot of problems.

Where can I get a compiled version?

Ricardo.

Read the full discussion online.

To add a post to this discussion, reply to this email (dlr@discussions.codeplex.com)

To start a new discussion for this project, email dlr@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Read the full discussion online.

To add a post to this discussion, reply to this email (dlr@discussions.codeplex.com)

To start a new discussion for this project, email dlr@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Jun 21, 2010 at 10:13 PM
Is, by the way, the "Microsoft.Scripting.Core" the same as the framework 4.0 "System.Core" assembly? Both have the "ExpandoObject" in the same namespace. The message "'ExpandoObject' is ambiguous in the namespace 'System.Dynamic'" pops up if both assemblies are referenced.
Coordinator
Jun 21, 2010 at 10:16 PM

Yes, everything in …core is in .NET 4.0 under System… namespaces.

Bill

From: aldineisampaio [mailto:notifications@codeplex.com]
Sent: Monday, June 21, 2010 2:14 PM
To: Bill Chiles
Subject: Re: 'ExpandoObject' is ambiguous in the namespace 'System.Dynamic'. [dlr:216771]

From: aldineisampaio

Is, by the way, the "Microsoft.Scripting.Core" the same as the framework 4.0 "System.Core" assembly? Both have the "ExpandoObject" in the same namespace. The message "'ExpandoObject' is ambiguous in the namespace 'System.Dynamic'" pops up if both assemblies are referenced.

Read the full discussion online.

To add a post to this discussion, reply to this email (dlr@discussions.codeplex.com)

To start a new discussion for this project, email dlr@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Jun 22, 2010 at 1:41 PM
Edited Jun 22, 2010 at 1:43 PM

Hi, people.

As Aldinei said, I deleted the reference to micrososft.scripting.core and the mess with the ExpandoObject was resolved.
Thanks a lot.

Now I am thinking if the DLR project can be compiled in our enviroment. There are some time, I can't get the Silverlight files working (see http://dlr.codeplex.com/Thread/View.aspx?ThreadId=210348). Is there a new version of DLR solution file to be used to solve this?

One more time, thanks.