1

I am in the process of converting quite a few .NET 2 ASP.NET web apps to .NET 4. One of the problems I've encountered during this process is the following error message -

Could not load file or assembly 'Microsoft.Scripting.ExtensionAttribute, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. 

The error also highlights the line of code which is the culprit, which for me, in my ScriptManager -

<asp:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" runat="server">
</asp:ScriptManager>

The strange thing I've noticed is that this error simply disappears as soon as the page is refreshed, but will reappear if I recycle the application pool (and I'm guessing if I publish the web app again).

Most of my research has lead to dead ends, which mostly point the finger of blame to Umbraco (which is not being used at all) and IronPython (which I admit, is used in another project in the same solution, but not the project in question).

I can't really have these web apps breaking every time I make a change to the site, does anyone have any ideas?

Paul McLean
  • 3,450
  • 6
  • 26
  • 36

1 Answers1

1

Seems to be a bug, but here is a fix (haven't tried it but look for the comment from Jerod Venema on 8/24/10):

https://groups.google.com/forum/?fromgroups=#!topic/websync/g8H4iruwC4A

Also:

http://www.mattwrock.com/post/2012/02/29/What-you-should-know-about-running-ILMerge-on-Net-45-Beta-assemblies-targeting-Net-40.aspx

assembly crashing my asp.net 4.0

Community
  • 1
  • 1
IrishChieftain
  • 15,108
  • 7
  • 50
  • 91
  • Hmm, that seems to definitely be a step in the right direction, but those articles don't talk about my exact situation. If I understand thing correctly, one of my assemblies is conflicting with .NET 4. The articles mentioned conflicts with WebSync and ILMerge (neither of which I am using). I'm ok with using the fix mentioned by Jerod Venema, but at this point, I have no idea which of my assemblies is the culprit. Any ideas on how to detect which one is causing me grief? – Paul McLean Nov 02 '12 at 06:34
  • I'm "guessing" that in your case the problem is some kind of conflict with AJAX. You're going to end up using the hack you mentioned I think. – IrishChieftain Nov 02 '12 at 06:37
  • 1
    So after many hours of working on this problem, I finally solved it. Even though my projects were targeting 4.0, they were being built on a machine that had 4.5 installed, and deployed to a machine without 4.5 installed. I'm sure you can see where this is going. Simply installing 4.5 on the target machine fixed everything. While all of the links you provided were helpful, the third is what ultimately helped me solve my problem. Thanks! – Paul McLean Nov 08 '12 at 04:06