Our library has the type "Action". We support VS2005, 2008 and are now trying to support VS2010 too. When I include a namespace containing our type “Action” and “System” together in a file and try to use it, it gives a message with an ambiguous reference call between our type of action and the delegate of System.Action. This only happens in VS2010, and it does not cause an error in VS2008 or VS2005, although nothing has changed with the Action delegate (namespace, assembly are all the same between 3.5 and 4.0). Any idea why this might happen?
UPDATE:
I created a simple application to reproduce this:
Class1.cs:
using System;
using System.Collections.Generic;
using System.Text;
namespace Namespace1
{
public enum Action
{
Mouse,
Keyboard
}
}
Class2.cs:
using Namespace1;
using System;
using System.Collections.Generic;
using System.Text;
namespace Namespace2
{
public class Class2
{
public Class2()
{
Action a;
}
}
}
VS2008 , VS2010: " CS0104:" "- " Namespace1.Action "" System.Action "
, VS2010 3.5 4.0.
,
Niranjan