开发者

Visual Studio crashes when opening solution: Rejecting native image because dependency is not native

I am working with a solution that con开发者_StackOverflowtains an ASP.NET website and class library project. It has been working splendidly for years. In the past few months I upgraded it from VS 2005 and .NET 2.0 to VS 2008 and .NET 3.5.

During the upgrade process I did not notice any issues and it runs fine in production.

After pushing to production and leaving it alone for a bit, I finally went back to make some more changes. However, when I try to open it in VS 2008 it VS crashes. VS opens and acts like everything is OK, but, while loading, the VS window simply disappears.

The Application Event Log shows this:

.NET Runtime version 2.0.50727.3607 - Fatal Execution Engine Error (7A036050) (80131506)

I did some research which pointed me to a possible corrupt .NET install. This made no sense to me, since all of my other VS 2008 applications (6 others) opened and ran just fine in VS 2008. But, because I could not come up with another solution, I decided to install the latest updates for .NET 2.x and 3.x, found here.

After installing the updates, it appeared to work fine.

Here I am, a few weeks later, running into the same problem. I tried running the same .NET updates to see if that would resolve the issue again, but "no dice".

I took my problem solving to the next step and ran WinDbg against VS, while opening the solution. Here is what I got:

CLR:(C:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll) Rejecting native image because dependency C:\WINDOWS\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll is not native

I assume that this is my problem, but I can't figure out why. My other applications are using System.Web.Extensions 3.5 without issue.

Anyone have any suggestions on where I should go from here?

Thanks.


If the above two comments does not solve your problems, you can do the following. I also had a similar issue while working with Silverlight and I had resolved it this way.

Before opening your solution, go to your bin/debug directly and delete everything available there. (I would also suggested deleting ASP.Net Temporary files available at C:\Windows\Microsoft.NET\Framework\\Temporary ASP.NET Files.

Once theese directories are cleaned up, try reopening your solution.


Thanks to Subhash Dike's suggestion (delete all files in the bin folder), I stumbled on the problem. The bin folder contained a copy of the System.Web.Extensions.dll. I believe that this older DLL was overiding the web.config's reference to the DLL in the GAC and breaking things.

So, after deleting the System.Web.Extensions.dll, I am now able to open the solution in Visual Studio 2008 and build it with no problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜