Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

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
?
609 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 28

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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Arrow Electronics was searching for a KVM  (Keyboard/Video/Mouse) switch that could display on one single monitor the current status of all units being tested on the rack.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

660 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