0
votes

I seem to be getting an issue where it cannot load the datatools interop assembly for Visual Studio 2017. I've tried resetting the packages, deleting the component cache folders, re-installing/repairing Visual Studio, installing the SQL Server Data Tools and installing SQL Server Express to see if that fixes but the issue still persists.

When I look at the activitylog.xml file, the following error is displayed:

CreateInstance failed for package [Visual Studio Data Package]Source: 'mscorlib' Description: Exception has been thrown by the target of an invocation. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.DataTools.Interop, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.at Microsoft.VisualStudio.DataTools.DataPackage..ctor()--- End of inner exception stack trace ---at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)at System.Activator.CreateInstance(Type type, Boolean nonPublic)at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)at System.Activator.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)at System.Activator.CreateInstance(String assemblyName, String typeName)at System.AppDomain.CreateInstance(String assemblyName, String typeName)System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.DataTools.Interop, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.DataTools.Interop, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'at Microsoft.VisualStudio.DataTools.DataPackage..ctor() WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Any ideas or help would be greatly appreciated. Thanks.

1

1 Answers

0
votes

Since it's too late for the person asking, I'm writing this for those who'll get stuck upon this issue like I did with my case. I got this specific error while I was trying to run the wizard to "Update Model from Database" from .edmx diagram, having Entity Framework handling the DB interaction. I needed to update my model since there was a new table added to the DB... Here it is

Error while trying to update the Model from Database for EF5

It is to mention the fact that the project I was dealing with was an old project, being initially designed in VS 2015. Apparently, this was the trick causing this issue cause it worked like a charm after I've opened this project with VS 2015 instead and running the wizard to update my model with it. After having my model updated I've continued to work in VS 2017 without any problems. Hope it helps someone with a similar issue.