SSMS 2014 Service provider must implement IVsDebugger interface - sql-server-2014

I'm getting the following errors when launching Microsoft SQL Server Management Studio 2014.
The 'VsDebugPresentationPackage, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' package did not load correctly.
The 'Microsoft.SqlServer.Management.SqlStudio, Microsoft.SqlServer.Management.SqlStudio, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' package did not load correctly.
The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by running the application together with the /log parameter on the command line, and then examining the file 'C:\Users\Leah\AppData\Roaming\Microsoft\AppEnv\10.0\ActivityLog.xml'.
I have checked the ActivityLog.xml and have found the following errors:
<entry>
<record>1063</record>
<time>2016/09/09 10:51:43.711</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [Microsoft.SqlServer.Management.SqlStudio, Microsoft.SqlServer.Management.SqlStudio, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91]</description>
<guid>{04401FF3-8B0F-4D2D-85EB-2A3542867A8B}</guid>
<hr>80070057 - E_INVALIDARG</hr>
<errorinfo>Service provider must implement IVsDebugger interface</errorinfo>
</entry>
<entry>
<record>1064</record>
<time>2016/09/09 10:51:43.714</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [Microsoft.SqlServer.Management.SqlStudio, Microsoft.SqlServer.Management.SqlStudio, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91]</description>
<guid>{04401FF3-8B0F-4D2D-85EB-2A3542867A8B}</guid>
<hr>80070057 - E_INVALIDARG</hr>
<errorinfo>Service provider must implement IVsDebugger interface</errorinfo>
</entry>
This message has started appearing today after my PC black screened during windows updates. After several more black screens and further forced restarts, windows restored to a previous version and booted successfully. I have tried doing a fresh install of Microsoft SQL Server Management Studio 2014 but it hasn't changed the outcome.
This is the update that caused the black screens: Feature update to Windows 10, version 1607
Any help welcomed. Thanks.

Yes, it wasn't related to the update. My machine.config wasn't correct as I had put the connection string above config section in the machine.config.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config

Related

ASP.Net Could not load file or assembly MySql.Data

I have a ASP.Net website that connects to a MySQL data base to retrieve data. I have used NuGet to install mysql.data. Doing this added a Bin folder with the sql.data dll in it to my project. It added a reference in my web config file. and it added a packages.config to my project. All of this is expected i assume ? With these resources in place my website works when i run it from visual studio. The problem is when i upload it to a server i get the following error :
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'MySql.Data, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
Source Error:
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Source File: d:\DZHosts\LocalUser\bman262\www.brandonsLoginTest.somee.com\riviera horticulture\web.config Line: 7
Assembly Load Trace: The following information can be helpful to determine why the assembly 'MySql.Data, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' could not be loaded.
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].
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1069.1
This is saying it cant find the mysql.data reference right ? What am i doing wrong ?
Here are some pictures of my solution in visual studio and my web.config
Solution
Web.config
I am tearing my hair out over this, any help would be VERY appreciated
→ You will have to make sure that the same version is installed on the server where you are deploying your project.
→ If the server to which you are deploying your project is on 64 bit, you can enable 32 bit support for this site's application pool, if your dll requires 32 bit architecture.
For anyone using similar or the same host as me if you have this problem the solution was to convert the project file to an application on the server.

How to display report execution time in client's local time zone in SSRS 2012

I have reports in SSRS2008R2 which uses this code to return the report execution time in the local time zone of the client running the report:
=System.TimeZoneInfo.ConvertTimeBySystemTimeZoneId(DateTime.UtcNow,TimeZoneInfo.Utc.Id,First(Fields!TenantTimeZoneName.Value, "Company"))
In order for this to run in SSRS2008R2, I added the reference assembly below:
System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
These reports have run fine for years until now. I am building up a new SSRS2012 server and when I attempt to deploy a report to the new server, I get the following error during deployment:
The definition of the report '/MyReport' is invalid.
Assuming that this just meant that I would have to switch the reference assembly to point to a higher release System.Core, I changed the assembly to point to System.Core 4.0 instead of System.Core 3.5. When I do that, I get this error:
Error while loading code module: ‘System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’. Details: Could not load file or assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
I checked the file location and the System.Core assembly shows up just where the path indicates it is supposed to be. I also checked the GAC and the assembly is there.
I really need to get this working ASAP but I am at an impasse. Any ideas?
This is old, but for anyone looking. It is best to remove the reference to System.Core and call the same function via system.
The example below converts a datetime from "UTC" to "EST".
=System.TimeZoneInfo.ConvertTimeBySystemTimeZoneId(Fields!YOURDATETIMEHERE.Value, "Dateline Standard Time", "Eastern Standard Time")

Visual Studio settings files corrupt / MySQL connection issues

My Visual Studio 2012 Professional is having problems with a three project solution.
I have been struggling all day with a LinqToMySQL.edmx file and getting a MySQL data connection option to appear in Server Explorer.
For this I have tried installing EFTools6.1.0ForVS2012. The mysql connector I have tried is mysql-connector-net-6.7.4. This worked at one point but other problems with MySQL dll versions means I am back to square one (when I got the latest version of the DLL which I got from nuGet 6.8.3, it was still looking for 6.7.4). I have since got 6.7.4 and added the reference to the dll for all project. I've also tried editing machine.config to look for the correct mysql data provider. Still no joy.
But now...
For each solution the app.config or web.config files can't be read when trying to access Properties > Settings.
An error occurred while reading the app.config file. The file might be
corrupted or contain invalid XML
All files seem valid when checked under an XML validator.
When opening a project in VS2012 I get the error:
Microsoft Visual Studio
The ProviderPackage package did not load correctly.
The problem may have been caused by a configuration change
or by the installation of another extension. You can get more
information by examining the file
t:\Users\John\AppData\Roaming\Microsoft\VisualStudio\11.0\A
ctivityLog.xml.
When trying to create a new project I get:
Failed to create a 'ImageSource' from the text
'..\lmages\Medium.png'.
After re-installing Visual Studio the problem persists.
In the activity log the last errors are:
<entry>
<record>235</record>
<time>2014/03/25 10:28:31.202</time>
<type>Warning</type>
<source>Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost</source>
<description>The catalog cache file is not up-to-date and has to be regenerated:</description>
<path>C:\Users\John\AppData\Local\Microsoft\VisualStudio\11.0\ComponentModelCache\Microsoft.VisualStudio.Default.cache</path>
</entry>
<entry>
<record>236</record>
<time>2014/03/25 10:28:31.211</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [Visual Studio Component Model Host Package]</description>
<guid>{49D12072-378B-4FFA-A09E-40E0B5D097CC}</guid>
<hr>80131902</hr>
<errorinfo>Configuration system failed to initialize</errorinfo>
</entry>
<entry>
<record>237</record>
<time>2014/03/25 10:28:31.241</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [Visual Studio Component Model Host Package]</description>
<guid>{49D12072-378B-4FFA-A09E-40E0B5D097CC}</guid>
<hr>80131902</hr>
<errorinfo>Configuration system failed to initialize</errorinfo>
</entry>
Looks like most of these errors were caused by malformed XML in the machine.config file in the framework folder. The machine.config file in framework64 was fine which must have caused me confusion. That's what editing with notepad gets you!
Still having problems with the mysql connector but that's a separate issue.

MySQL connection in ASP.NET MVC 4 and Entity Framework 5.0 - multiple DbProviderFactories

I have an ASP.NET application that I would like to upload to a host that offers a MySQL database. I am using Visual Studio 2012, .NET 4.5, Entity Framework 5.0, and I have installed MySQL for Visual Studio 1.0.2. I have been trying to connect to a local MySQL server, but I have encountered some problems.
At first I referenced MySql.Data and MySql.Data.Entity at version 6.6.5.0 in my project. But when I tried to do Update-Database in the package manager console, I got the following error:
System.DateTime System.Data.Entity.Migrations.Model.InsertHistoryOperation.get_CreatedOn()
This seems to be a problem with Entity Framework 5.0 and earlier versions of Connector/.Net - the MySQL connector for visual studio. Since the process was one of discovery, I unfortunately can't recall how my project came to reference MySql.Data and MySql.Data.Entity version 6.6.5.0.
I deleted the references, and then downloaded and referenced the same assemblies in version 6.7.4.0, using NuGet. This solved the error I got before, but now Update-Database gives me the following error:
Could not load file or assembly 'MySql.Data, Version=6.6.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies.
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I have solved this problem by including a specific DbProviderFactory in my Web.Config file:
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider"
invariant="MySql.Data.MySqlClient"
description=".Net Framework Data Provider for MySQL"
type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
If I leave out the remove tag, I get the error:
Column 'InvariantName' is constrained to be unique. Value 'MySql.Data.MySqlClient' is already present.
I think this means that somehow my project still has a DbProviderFactory that serves version 6.6.5.0 of the MySQL libraries. But when I search the text files of my project, I can't find the string 6.6.5.0 anywhere.
At the moment this solution lets me connect to my local MySQL server, but when I publish the project to my hosting provider and go to the web site in my browser, I just get an error message. I would like to know how to remove the implicit 6.6.5.0-serving DbProviderFactory, both as part of my learning and because I think my workaround could be the reason that my web site doesn't work at my hosting provider.
As a clue in finding a solution, I find it suspicious that when I try to add a reference, I can only see (several versions of) 6.6.5.0:
But when I go to the NuGet manager, I only have version 6.7.4.0 installed:
Hope this helps.
I wrote a blog post on this subject, my project is available for download at the bottom of this paper.
I had to install (as noted in my article) MySqlDataEntity -Pre, which install the beta version 6.7.2 beta, to get good compatibility with EF 5, but I see that now the current version is noted 6.7.4, so I updated my project accordingly, and it works just as well, so I also updated the project to download from my blog.
Hope this can help you to start with EF and MySql.
BTW, in case this is not clear, you have to install, from NuGet, MySql.Data.Entities, which will also install MYSql.Data, as Entities is depending on it.

Shared Hosting + Entity Framework + MySQL = Data Provider Errors?

long-time listener, first-time caller!
I’m trying to connect to MySQL using the ADO.NET Entity Framework. (Visual Studio 2010, .NET 4.0) I created a web project and another class library project to serve as my DAL. On my local machine, I have no problems, and I have also tried running with Medium trust. I’m able to fully control the db as expected.
When I deploy to my host (shared, medium trust) however, I keep getting errors. I have tweaked my web.config multiple ways: I’ve explicitly called my assembly in the connection string, I’ve used the wildcard mapping, I added references to the MySQL dll’s, etc.
<connectionStrings>
<add name="NamespaceContext" connectionString="metadata=res:// Namespace.Data.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null/DataModel.csdl|res:// Namespace.Data.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null/DataModel.ssdl|res:// Namespace.Data.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null/DataModel.msl;provider=MySql.Data.MySqlClient;provider connection string="server=myserver;User Id=user;database=thedatabase;password=password;Persist Security Info=True"" providerName="System.Data.EntityClient"/>
<add name=" NamespaceContext " connectionString="metadata=res://*/;provider=MySql.Data.MySqlClient;provider connection string=" server=myserver;User Id=user;database=thedatabase;password=password;Persist Security Info=True"" providerName="System.Data.EntityClient"/>
<add name=" NamespaceContext " connectionString="metadata=res://*/DataModel.csdl|res://*/DataModel.ssdl|res://*/DataModel.msl;provider=MySql.Data.MySqlClient;provider connection string=" server=myserver;User Id=user;database=thedatabase;password=password;Persist Security Info=True"" providerName="System.Data.EntityClient" />
</connectionStrings>
The error I keep getting is:
System.ArgumentException: The specified store provider cannot be found in the configuration, or is not valid. --->
System.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.
at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
--- End of inner exception stack trace ---
at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
at System.Data.EntityClient.EntityConnection..ctor(String connectionString)
at MyNamespace.Web.Html.TestPage.EntityFrameworkTestButton_Click(Object sender, EventArgs e)
I talked to their support guys (who aren’t devs) but they said the MySQL connector is installed and in the GAC. I tried to use the DbProviderFactories section in my web.config, like the following:
<system.data>
<DbProviderFactories>
<clear/>
<remove invariant="MySql.Data.MySqlClient"/>
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.3.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
</DbProviderFactories>
</system.data>
I was hoping I could control this and reference the provider in my project. I then receive the following error:
System.Data.MetadataException: Schema specified is not valid.
Errors: error 0194: All artifacts loaded into an ItemCollection must have the same version. Multiple versions were encountered.
MySql.Data.Entity.Properties.SchemaDefinition-6.0.ssdl(4,9) : error 0169: All SSDL artifacts must target the same provider. The ProviderManifestToken '5' is different from '5.0' that was encountered earlier.
error 0194: All artifacts loaded into an ItemCollection must have the same version.
(lots of the same error message was snipped for brevity)
I am at a complete loss. I tried strongly signing my DAL project, not using a DAL and just creating the .edmx in the web project, all to no avail. I could have sworn I got it working at some point, but perhaps I was delirious.
Sorry for the wall o' text. Can anyone help or shed some light?
Thanks!
What happens if you put the mysql dll in your bin folder? Alternatively, try to remove the version restriction on the mysql dll, they may not have that exact version loaded on their servers.
I had a very similar problem in my application, where I was using the MySQL connector for a MySQL database and the Entity Framework for a SQL Server database (two separate connections, one project). The MySQL.Data.Entity DLL seems to fight with the entity framework. I didn't actually need it so I removed it... but the error persisted!
Finally out of desperation I just deleted my bin and obj folders and recompiled. Problem solved. I guess something was cached or hanging around in my folders, even after I ran a clean and rebuild. Something to try anyways if someone else runs into this.