none
Warning CS1702 - Assembly reference duplicity RRS feed

  • Question

  • Hi folks,

    I'm having a warning when I try to build my project as it follows:

    "

    Assuming assembly reference "Ninject, Version=3.3.3.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7" matches "Ninject, Version=3.3.4.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7", you may need to supply runtime policy

    "

    And below is my entry in web.config about ninject:

    <dependentAssembly>
            <assemblyIdentity name="Ninject" publicKeyToken="c7192dc5380945e7" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-3.3.4.0" newVersion="3.3.4.0" />
    </dependentAssembly>

    right now I don't know where to look to get rid of this warnings, and I'm out of ideas, I would appreciate any insights in this problem

    thanks in advance for any help!

    Tuesday, April 16, 2019 5:33 PM

Answers

  • A friend of mine found a solution, of some sort, in my .csproj I had the following lines:

    <MvcBuildViews>true</MvcBuildViews>
    <UseIISExpress>false</UseIISExpress>

    so looking in other projects he realized that all of them was:

    <MvcBuildViews>false</MvcBuildViews>
    <UseIISExpress>true</UseIISExpress>

    when i made the changes, all warnings vanished.

    Thanks for all the help Karen!!!

    • Marked as answer by n1lt0n Tuesday, April 16, 2019 9:12 PM
    Tuesday, April 16, 2019 9:11 PM

All replies

  • Hello,

    Using NuGet command line under Tools -> NuGet Package Manager -> Package Manager console run

    nuget locals all -clear


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Tuesday, April 16, 2019 6:16 PM
    Moderator
  • I didn't find this cmd nuget, is in PM ?

    PM> nuget locals all -clear
    nuget : The term 'nuget' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path 
    is correct and try again.
    At line:1 char:1
    + nuget locals all -clear
    + ~~~~~
        + CategoryInfo          : ObjectNotFound: (nuget:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
     

    Tuesday, April 16, 2019 6:44 PM
  • A little update, my Nuget was version 2.8.2, but even upgrading and now, running nuget locals all -clear, the cs1702 warning persist :(


    Tuesday, April 16, 2019 8:50 PM
  • A friend of mine found a solution, of some sort, in my .csproj I had the following lines:

    <MvcBuildViews>true</MvcBuildViews>
    <UseIISExpress>false</UseIISExpress>

    so looking in other projects he realized that all of them was:

    <MvcBuildViews>false</MvcBuildViews>
    <UseIISExpress>true</UseIISExpress>

    when i made the changes, all warnings vanished.

    Thanks for all the help Karen!!!

    • Marked as answer by n1lt0n Tuesday, April 16, 2019 9:12 PM
    Tuesday, April 16, 2019 9:11 PM