type or namespace name 'Newtonsoft' could not be found

前端 未结 4 1269
死守一世寂寞
死守一世寂寞 2021-01-11 23:41

I\'ve looked this question up, but I don\'t see too many answers, and obviously none have been helpful or I wouldn\'t be asking. I am a .NET neophyte.

My local enviro

相关标签:
4条回答
  • 2021-01-12 00:09

    Thanks for the pointer and the link. After a struggle I got it to work. What finally happened was my friend, an expert in .NET Skyped me and talked me through the proper way of deploying my project to the destination server. I didn't understand that there is a separate folder where your Build goes. I made a "Build Deployment Package" as a zip file. Then I unzipped it on my hard drive, and dropped it into a clean folder on the web server (actually, I uploaded it to the root directory), and voila, it worked.

    0 讨论(0)
  • 2021-01-12 00:20

    First step is try to rebuild your project. If it doesn't help: find 'Newtonsoft' in 'Nuget package Manager' and uninstall it. If it have a references => put checkboxes (Remove dependencies, Force uninstall) and in dropdowns (Dependency behavior => Ignore dependencies, File conflict action => Ignore All)

    Install 'Newtonsoft' again.

    0 讨论(0)
  • 2021-01-12 00:22

    Another possible reason for this issue is if the project is using NuGet packages and they haven't been restored (downloaded) yet.

    They may need to be restored in Visual Studio or you can use the nuget.exe command-line executable to restore the packages.

    https://docs.nuget.org/consume/package-restore

    0 讨论(0)
  • 2021-01-12 00:29

    When you copy files of a solutions, some references can be "lost". Try to delete the reference and add it again, after you copied the files and open in the other machine.

    Also, take a look at this question: reference dll not copying to bin with deployment project causing error

    0 讨论(0)
提交回复
热议问题