My SharePoint 2010 dev box seems to have gone crazy today. I started to get an error when using U2U's CAML builder and trying to connect to a site using the Object Model.
The error message is as follows -
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SharePoint, Version 12.0.0.0' etc
I turned on Assembly Binding logging and used the Fusion viewer to see what was going on - here is an excerpt from one of the logs -
=== Pre-bind state information === LOG: User = IDDEV\spmysitesapppool LOG: DisplayName = Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c (Fully-specified) LOG: Appbase = file:///C:/inetpub/wwwroot/wss/VirtualDirectories/mysites2010.iddev.local/ LOG: Initial PrivatePath = C:\inetpub\wwwroot\wss\VirtualDirectories\mysites2010.iddev.local\bin LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\4ba17ee6 LOG: Cache Base = C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\4ba17ee6 LOG: AppName = c9766a3a
Calling assembly : (Unknown).
LOG: This bind starts in default load context. LOG: Using application configuration file: C:\inetpub\wwwroot\wss\VirtualDirectories\mysites2010.iddev.local\web.config LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config. LOG: Post-policy reference: Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c LOG: GAC Lookup was unsuccessful. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/4ba17ee6/c9766a3a/Microsoft.SharePoint.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/4ba17ee6/c9766a3a/Microsoft.SharePoint/Microsoft.SharePoint.DLL. LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/mysites2010.iddev.local/bin/Microsoft.SharePoint.DLL. LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/mysites2010.iddev.local/bin/Microsoft.SharePoint/Microsoft.SharePoint.DLL. LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/mysites2010.iddev.local/_app_bin/Microsoft.SharePoint.DLL. LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/mysites2010.iddev.local/_app_bin/Microsoft.SharePoint/Microsoft.SharePoint.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/4ba17ee6/c9766a3a/Microsoft.SharePoint.EXE. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/4ba17ee6/c9766a3a/Microsoft.SharePoint/Microsoft.SharePoint.EXE. LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/mysites2010.iddev.local/bin/Microsoft.SharePoint.EXE. LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/mysites2010.iddev.local/bin/Microsoft.SharePoint/Microsoft.SharePoint.EXE. LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/mysites2010.iddev.local/_app_bin/Microsoft.SharePoint.EXE. LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/mysites2010.iddev.local/_app_bin/Microsoft.SharePoint/Microsoft.SharePoint.EXE. LOG: All probing URLs attempted and failed.
As far as I'm aware SharePoint uses policy files in the GAC to redirect requests to v12 dlls to the new v14. I have checked in the GAC and those policy files seem to exist and are in tact.
It seems as though it is not reading the policy file correctly.
I have checked and tried everything I can think of - IISRESET, restarting box, deleting temp files etc.
The only thing I can guess is that a windows update has come along and broken it - I have updates enabled on my VM (a bad idea I know!).
Can anyone shed any light on this?? It's driving me mad!!
Cheers
Alex