Could not load assembly 'SMDiagnostics.dll'

ChrisFearnleyChrisFearnley Chris FearnleyGBMember

I have just tried updating Xamarin (for Visual Studio); it's now 4.5.0.433
My project (which compiled OK before the upgrade) now won't compile. Not sure what my previous version was: probably 4.2.63 or earlier.
I am getting this exception:
Exception while loading assemblies: System.IO.FileNotFoundException:
Could not load assembly 'SMDiagnostics, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089'. Perhaps it doesn't
exist in the Mono for Android profile?
////File name: 'SMDiagnostics.dll'//
// at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve AssemblyNameReference reference, ReaderParameters parameters)//
// at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference)//
// at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(DirectoryAssemblyResolver resolver, ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)//
// at Xamarin.Android.Tasks.ResolveAssemblies.Execute(DirectoryAssemblyResolver resolver) LocationService/

I have investigated on StackOverflow but no success.
So, I have now uninstalled all of Xamarin from VS2015 and tried re-installing, only to find that VS2017 is now installed, and I cannot re-install Xamarin into VS2015 - every time I try, a new install of VS2017 is started. This is annoying in itself, I was happy with VS2015.
But even in VS2107, I am getting exactly the same error.
I have searched the Windows directory for SMDiagnostics.dll and there are several different copies in subfolders of C:\Windows\WinSxS. So why the sudden error, when the project was OK before today (nothing changed in the project itself!)

Sign In or Register to comment.