Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

vb.net 'Newtonsoft' is not declared. It may be inaccessible due to its protection level.

Posted on 2017-04-19
5
Medium Priority
?
963 Views
Last Modified: 2017-04-19
Hello All;

In Visual Studio, I have NewtonSoft added to the "NuGet"
The "Bin" folder has all required resources.
I have these in the top.

Imports Newtonsoft.Json.Linq
Imports Newtonsoft.Json

Open in new window


Running the project from VS, it works great.
Running the project from its web folder gives the error.

Compiler Error Message: BC30451: 'Newtonsoft' is not declared. It may be inaccessible due to its protection level.

On this line.
Dim playList = Newtonsoft.Json.JsonConvert.DeserializeObject(Of VidList)(jsonString)

Open in new window


What else do I need to do, in order to run the NewtonSoft components outside of VS?

Thanks.
Carrzkiss
0
Comment
Question by:Wayne Barron
  • 2
  • 2
5 Comments
 
LVL 64

Accepted Solution

by:
Fernando Soto earned 2000 total points
ID: 42098785
I am not a web developer but it sounds like the NewtonSoft.dll has not been installed on the web server when you installed the web application. Make sure that NewtonSoft.dll is installed.
0
 
LVL 29

Expert Comment

by:Dan McFadden
ID: 42098868
In what scope did you declare the variable (Public, Private Protected)?  The protection level error message may indicate that the variable is not available (declare) outside the scope of some class or partial class.

Posting additional code will help trouble shoot the issue.

Dan
0
 
LVL 31

Author Comment

by:Wayne Barron
ID: 42099167
@Fernando
Thanks for the information. I had to do the same thing to another project as well.
Here is the link to that EE Thread.
0
 
LVL 31

Author Closing Comment

by:Wayne Barron
ID: 42099168
I had gone through this once before and with a lack of sleep.
I had forgotten all about it.
Fernando, you helped me to remember something I had done just nearly a month ago.

Wayne
0
 
LVL 64

Expert Comment

by:Fernando Soto
ID: 42099184
Not a problem Wayne, glad I was able to help and thanks for the info. Have a great day.
1

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
pc, laptop  monitor connection configurations
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month14 days, 22 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question