So I have an ASP.NET website, which works great on my machine. But when I deployed it on web host server, its giving me an error saying:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 15: using Microsoft.VisualBasic;
Line 16: using System.Data.SqlClient;
Line 17: using Newtonsoft.Json;
Line 18: using System.Globalization;
Line 19: using System.Text.RegularExpressions;
I think this is a classic error, and there are similar questions already being asked, even by me before. But, all the solutions are either not clear or not applicable.
Since its a "website" project, so the property of the aspx.cs file does not contain any field such as "Build Action" or "Copy Local" etc. I am using Newtonsoft to parse JSON. Can someone please suggest me STEP-BY-STEP way to get rid of this problem?
I came across solutions such as clean-up and such. Clean what? In my solution explorer, there's this BIN folder which contains the dll, xml, and pdb for the Newtonsoft library; which is AS-IT-IS copied on to the webhost server, using COPY WEBSITE tool.
What do I need to do to fix the problem? Thanks a bunch.