"Overload resolution failed" happens when using visual studio 2015 to compile projects RRS feed

  • Question

  • User446015896 posted

    My original solution contains two projects-->project A(website project, with VB.Net) and project B(class library, with VB.NET).

        Project A(website) is referencing project B's function, and usually I use Visual Studio 2013 to compile them, and they all look/work good.

        Things changed after I use Visual Studio 2015 to compile them, and errors came out.

        These errors are the same when compiling in project A, with the following messages:"Error BC30521 Overload resolution failed because no accessible 'IsLegalUrl' is most specific for these arguments:".

        I know that means Visual Studio 2015 found multiple functions with the same name(in project B), and can not decide which one project A will use when compiling in project A(project A).

       I am sure the reference in project A is good as usual, and even can use "Go to definition" in "IntelliSense" of Visual Studio 2015 to make sure the function we use in project A is in project B. I also confirmed that there is one "IsLegalUrl" function in project B.

        Does anyone have idea what is going on in this case?

    Thank you.

    Updated: I think VS2015 loaded it twice since these error messages all showed twice, but can't find any duplicated project reference from "MyProject", like the following thread discussing about:


    Wednesday, August 19, 2015 6:26 PM


  • User-166373564 posted


    From your description above, firstly, please clean and rebuild your current Project (Right-click > Clean, Right-click Rebuild respective) and see whether it makes any difference. 


    Error BC30521 Overload resolution failed because no accessible 'IsLegalUrl' is most specific for these arguments:".

    You can also look into <assemblies> section in the Web.config file, and check whether it has duplicate assembly.

    Please let me know if you need any help.

    With regards,


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, August 23, 2015 10:59 PM