none
Build Error: BC30652 Reference required to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' containing the type 'Exception'. Add one to your project. RRS feed

  • Question

  • I get the following error below, yet the project has the NetStandard lib installed via nuget!

    BC30652 Reference required to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' containing the type 'Exception'. Add one to your project.

    https://developercommunity.visualstudio.com/content/problem/104584/build-error-bc30652-reference-required-to-assembly.html


    Eric

    Wednesday, August 30, 2017 6:52 PM

All replies

  • Try add this package to your project first and it'll help you add the lots of required assemblies in .NET framework.
    Thursday, August 31, 2017 1:25 AM
    Answerer
  • did you even read my post???

    "I get the following error below, yet the project has the NetStandard lib installed via nuget!"


    Eric

    Thursday, August 31, 2017 3:17 AM
  • Try use "Update-Package NETStandard.Library -reinstall" to reinstall it then.

    Usually this kind of "impossible error" are caused by bad reference entry in web.config (for web projects) or your project file. Reinstall option will try to delete the entries and add them back.

    If it still don't work, you'll have to review the file content corresponding to your project type and fix it yourself. I think the correct PublicKeyToken value is b77a5c561934e089 .

    Always backup your files before proceeding.

    Thursday, August 31, 2017 3:33 AM
    Answerer
  • how do I do this?

    Try use "Update-Package NETStandard.Library -reinstall" to reinstall it then.


    Eric

    Thursday, August 31, 2017 4:10 AM
  • You can run the command in "Tools" -> "NuGet Package Manager" -> "Package Manager Console".
    Thursday, August 31, 2017 4:34 AM
    Answerer
  • ok, done, still broken.

    Eric

    Thursday, August 31, 2017 4:48 AM
  • Have you manually check the reference has been added correctly as I told you so?
    Thursday, August 31, 2017 5:55 AM
    Answerer
  • you need to be more specific. This is a class lib project. The packages.config file does contain the NetStandard lib.

      <package id="NETStandard.Library" version="2.0.0" targetFramework="net46" />


    Eric

    Thursday, August 31, 2017 2:14 PM
  • Hi eschneider8888,

    I add the NETStandard.Library via NuGet to Class Library. There is no build error for me.

    Could you provide the code which could reproduce the build error for us to test?

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, September 8, 2017 2:29 AM
    Moderator
  • Adding package to the project does not mean the project will reference it (although in the most case it does since the package installer script will also modify the relevant parts for you)

    As I've said in previous post, you have to check your web.config if it's be used in a website project, or your .csproj/.vbproj file if it's other project types. These are the places where your compiler actually "see" your references. The complier don't care your package setting because it doesn't read that at all.



    Friday, September 8, 2017 2:48 AM
    Answerer