1
Vote

Issue calling overloaded generic function

description

I'm using Visual Studio 2015 version 14.0.24720.00 Update 1 with .NET Framework 4.6.0.1055

I have a static class with one overloaded generic method:
public static class ChangeRecordHelper
{
public static IEnumerable<PropertyChangeInfo> GetChanges<TEntityType>(DbEntityEntry<TEntityType> entry, ChangeType changeType) where TEntityType : class, new()
{
...
}
public static IEnumerable<PropertyChangeInfo> GetChanges<TEntityType>(DbEntityEntry<TEntityType> entry, ChangeType changeType, IEnumerable<string> propertyNames)
             where TEntityType : class, new()
{
...
}
}
When I'm executing the following (first method):
ChangeRecordHelper.GetChanges<MyType>(myTypeEntry, changeType);
Everything is fine. But when I'm executing the other method in this way:
ChangeRecordHelper.GetChanges<MyType>(myTypeEntry, changeType, propertyNames);
None of the methods above gets executed. Of course there are no compilation errors. The compiler jumps through, not stopping on breakpoint in any of these functions.

Please let me know if you need more information.

EDIT: It seems, that the method is executed, but Visual Studio doesn't either stop on a breakpoint in it or jump into it (using F11) - so it may actually be an Visual Studio bug rather than a Roslyn linker issue.

comments

PauloMorgado wrote Feb 4, 2016 at 10:00 AM

These discussions have moved to https://stackoverflow.com/