The assembly with display name ‘VJSharpCodeProvider’ failed to load

I added an AjaxToolkit:AutoCompleteExtender to my ASP.Net 3.5 application. The web service lives in the same web application. Now I am getting this error when I hit F5/Debug in VS2008, and backing out the changes step-by-step so far have not revealed the cause yet.

I can’t seem to get rid of the error. While the application starts up and I don’t notice any issues once it is running.

BindingFailure was detected
Message: The assembly with display name 'VJSharpCodeProvider' failed to load in 
 the 'LoadFrom' binding context of the AppDomain with ID 4. The cause of the
 failure was:
 System.IO.FileNotFoundException: Could not load file or assembly 
'VJSharpCodeProvider, Version=2.0.0.0, Culture=neutral, 
 PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system 
 cannot find the file specified.
 File name: 'VJSharpCodeProvider, Version=2.0.0.0, Culture=neutral,
 PublicKeyToken=b03f5f7f11d50a3a'

=== Pre-bind state information ===
LOG: DisplayName = VJSharpCodeProvider, Version=2.0.0.0, Culture=neutral,
 PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using machine configuration file from C:WindowsMicrosoft.NETFramework
  v2.0.50727configmachine.config.
LOG: Post-policy reference: VJSharpCodeProvider, Version=2.0.0.0, 
  Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a/VJSharpCodeProvider.DLL.
etc

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

So I think that this is a non-issue. The exception probably gets thrown all the time, but I had turned on “Break when an Exception is thrown” in Debug/Exceptions for all types there, to diagnose an unrelated problem. Since I unchecked the check boxes to their default state, I no longer see the binding problem.

Method 2

We got this a few times here at work. Here’s what we found.

Method 3

If the accepted solution doesn’t work for you, try installing the VJSharp redistributable package.

32-bit: http://www.microsoft.com/download/en/details.aspx?id=18084

64-bit: http://www.microsoft.com/download/en/confirmation.aspx?id=15468

This got me past the error when none of the other solutions would work.

Method 4

This happened to me after a BSOD on my machine. Clearing the AppData/Local/Temp/Temporary ASP.NET Files/ folder did it for me, I guess the temp files got corrupted as a result of the crash.

Method 5

I too have received the same error, but my solution was very different to all of the above. In the web config I had a reference to an Assembly Binding such that it was older than the version I was trying to load eg.

    <dependentAssembly>
        <assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
    </dependentAssembly>

and I was trying to install version 4.2.3. I hope this helps someone!

Method 6

In my case, I was attempting to compile a BizTalk project in VS2010, and I got

Could not load file or assembly ‘VJSharpCodeProvider, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its
dependencies. An error relating to security occurred. (Exception from
HRESULT: 0x8013150A)

None of the other answers in posted so far here worked – but doing this on the user for my BizTalkServices IIS site did. This is only on my local machine, not actual production.

Whie the wisdom of giving the user for an IIS site admin priveledges is certainly debatable, perhas this will offer a clue for finding the real problem for someone.

Method 7

I was getting the same error, but for a different reason – I was referencing a C++/CLI DLL file.

After a couple of days of banging my head against a wall I downloaded and installed the latest Visual C++ and everything worked.

EDIT: After a couple of days of working with the project, I witnessed this error again in the Fusion logs. It appears that there was a different error hiding in the application: access denied or something like that. So after I fixed the error, this error didn’t disappear from the logs, but wasn’t breaking anything. So this error might be definitely misleading. Lesson learned: check your application for other errors, before trying to fix this one.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x