Home c# “Failed to load file or assembly” VkNet.dll

“Failed to load file or assembly” VkNet.dll




Unhandled exception of type “System.IO.FileNotFoundException” in VkNet.dll

More Information: Could not load file or assembly
“Newtonsoft.Json, Version =, Culture = neutral,
PublicKeyToken = 30ad4fe6b2a6aeed “or one of their dependencies.
the specified file can be found.

This error appears when trying to get all the user’s photos.

private void button1_Click (object sender, EventArgs e)
  var getAll = vk.Photo.GetAll (Convert.ToInt32 (textBox1.Text), true, 20, 0, true, false);
  foreach (var photos in getAll)
    textBox1.Text = photos.CreateTime.ToString ();

Tell me, please, what is the problem? Authorization is successful.

Answer 1, authority 100%

The VkNet.dll library apparently needs the Newtonsoft.Json.dll library. Install Json.NET via nuget or manually add a link to the project. You can also add the dll itself to the project, specify in the properties “Copy to output directory – Copy later version” and “Build action – no”

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions