Skip to main content
Question

System.IO.FileNotFoundException' in Box.V2.dll

  • May 27, 2025
  • 4 replies
  • 8 views

Forum|alt.badge.img

I was getting an exception

An exception of type System.IO.FileNotFoundException occurred in Box.V2.dll but was not handled in user code

Additional information:

 

Could not load file or assembly 'System. Runtime, Version=4.0.10.0, Culture=neutral, Public Key Token=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

 

This exception occurred when i was creating a client using the Box Client class. the following is the code

I also updated the box.V2.sdk from git and also tried reinstalling this api in the nugget packages in visual studio 2015 but still this exceptio occurs.The following is the peice of code is below

 

var config = new BoxConfig(BoxClientId, BoxSecret, new Uri("http://localhost"));

var session = new OAuthSession(access_token, refresh_token, 3600, "bearer");

client = new BoxClient(config, session);

Can anyone please suggest me a solution

4 replies

Forum|alt.badge.img
  • Author
  • Known Participant
  • 34746 replies
  • May 27, 2025

Do you have "Copy Local" set to true?

 

khm602477.png


Forum|alt.badge.img
  • Author
  • Known Participant
  • 34746 replies
  • May 27, 2025

what is Copy Local


Forum|alt.badge.img
  • Author
  • Known Participant
  • 34746 replies
  • May 27, 2025

egxing7v4zye56vu3n3jq44k7u12mn1hnfk.png


Forum|alt.badge.img
  • Author
  • Known Participant
  • 34746 replies
  • May 27, 2025

Yes the copy local is set to true. The problem is the same code worked fine few days ago but now it is raising an exception.I also tried reinstalling the box.V2.sdk package but it did not work