SSMS 2017 Could not load file or assembly 'Microsoft.AnalysisServices.AppLocal' - ssms

I recently installed Microsoft SQL Server Management Studio 2017.5 in order to connect to some Azure resources. When attempting to connect to any db (including my localhost) I get an error saying:
'Could not load file or assembly 'Microsoft.AnalysisServices.AppLocal, Version=14.0.0.0,Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies.
I have looked in the C:\Windows\assembly\GAC directory and do not see the assembly there as I believe it should be.
Is there some way I can either download the assembly or repair ssms?
UPDATE:
After many hours of struggling I found a procedure to solve this issue.
Uninstall SSMS completely
Delete the C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio directory
Reinstall SSMS 17.5 and it should work now.
Looks like its a partial removal on upgrading from previously installed versions.

After many hours of struggling I found a procedure to solve this issue.
1) Uninstall SSMS completely (and all versions of it)
2) Delete the C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio directory
3) Reinstall SSMS 17.5 and it should work now.
Looks like its a partial removal on upgrading from previously installed versions.

For me upgrading to latest version 17.9.1 did help. Upgrade details can be found at following Microsoft page:
https://learn.microsoft.com/en-gb/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017
You can download the SQL Server Management Studio 17.9.1 Upgrade Package (upgrades 17.x to 17.9.1) and install it.
Cheers.

Related

LinqPad Error: Unable to find the .Net Framework Data Provider

I am new to LinqPad.
I downloaded a .sdf file from the internet (i know what it is) I wanted to view its tables. So I googled "how to read .sdf files" and came across Linqpad, which I installed.
When I browse to my .sdf file from LinqPad and try to open it as a connection, I get the message "Unable to find the requested .Net framework data provider, it may not be installed"
Does this mean i need to install SQL CE before using LinqPad? I assumed LinqPad was the program to view tables, run queries, etc and that I did not need the original db program.
Please advise on what the error refers to and best way to resolve. thanks
To answer your question, yes you do have to install it. I just ran across this problem while trying to connect to a Sql CE 3.5 DB in LinqPad. You have to have the proper version installed first. I only had 4.0 installed and was trying to connect to a 3.5 DB. So had to use the SSCERuntime msi found here to install the items shown below:
Just go to that link and download it somewhere and then run the msi(s).
Note the following:
It is mandatory to install both the 32-bit and the 64-bit version of
SQL Server Compact MSI files on a 64-bit Computer. Installing only the
32-bit version of the SQL Server Compact 3.5 SP2 MSI file on a 64-bit
computer will lead to failure of the existing SQL Server Compact 3.5
applications on the Computer.
So just follow the instructions shown in the "Install.txt" that is downloaded with the msi's.
After installing them I had to close and reopen LinqPad and then the connection worked.
I'll add a variant on Kasper's solution. For the case of connecting to SQL CE 4, I appeared to already have the SQL CE4 runtimes installed yet I still got the same error.
Trying to install the latest SQL CE 4 from Microsoft reported that a newer version was already installed and aborted the install.
Uninstalling the "newer version" and then installing the latest download fixed the problem for me.
I'm not sure how I got that original version, that's "newer" than the latest from Microsoft. Possibly from an older Visual Studio install.
You first need to make a connection to your database. You can do that by clicking "Add Connection", "Default Linq to Sql connection" and then marking your version of SQL CE on top and providing the information.
LinqPad is not just viewing tables, run queries etc. It is much more than that.

Visual Studio 2013: Database Project MSBuild error

I've got a database project as part of my solution in Visual Studio 2013. Been working perfectly for the last 3 weeks and now suddenly today it won't build and so I cannot publish any changes. I'm getting an MSBuild error:
"C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v12.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(513,5):
Error: MSB4018: The "SqlBuildTask" task failed unexpectedly.
System.MethodAccessException: Attempt by method 'Microsoft.Data.Tools.Schema.Sql.Build.SqlTaskHost.OnCreateCustomSchemaData(System.String,
System.Collections.Generic.Dictionary`2)'
to access method
'Microsoft.Data.Tools.Components.Diagnostics.SqlTracer.ShouldTrace(System.Diagnostics.TraceEventType)'
failed."
Anyone got any ideas? All I did this morning was pull down the latest changes from source control. I can't see how that would mess up the actual MSBuild process, and the guy who checked in last doesn't have any issues at all.
You need to install the last version of SQL Server Data Tools:
http://msdn.microsoft.com/en-US/data/hh297027
Make sure to restart VS and then build the solution again. This solves the problem!
In Visual Studio 2013 -> Tools -> Extensions and Updates... -> Updates -> Product Updates -> Microsoft SQL Server Update for database to 12.0.50318.0
I was upgrading from 12.0.41012.0 and this resolved my issue. This relates to the answer to install the latest SQL Server Data Tools.
I am using Visual Studio Community 2013.
I had same error:
You can fix it by updating the SQL Server Tools:
Tools --> Extensions and Updates
Then under Product Updates you will see an option to update SQL Server Update.
Click on Update, after it has installed restart Visual Studio.
Try:
Install the latest DacFx from http://www.microsoft.com/en-us/download/details.aspx?id=43370
Reinstall the latest SSDT from http://go.microsoft.com/fwlink/?LinkID=393521
Source: VS2013 SqlBuildTask 04018 Error
I searched "Visual Studio 2013 Update 2" in MSDN subscriber downloads and it was there
Also I filed a bug with MS
VS2013 SqlBuildTask 04018 Error Please up vote it if you are getting the same problem
I had the same issue. I tried to repair Visual Studio 2013, update 4, SSDT, the DAC tools, etc., but it didn't work any better.
However I noticed the Microsoft.Data.Tools.Schema.SqlTasks.targets file present in C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\SSDT was dated from 2013 (In fact it corresponded to the old SSDT). So what I did is just copy the new one (which I suprisingly found in C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT ...) over to this v12.0\SSDT folder, restarted Visual Studio 2013 and now it works. For information, that new SSDT targets file is dated from 2014/10/26 and its size is 75437 bytes.
It turns out the issue was with Visual Studio Update 3. I uninstalled and reinstalled VS 2013 to Update 2 only and reinstalled Data Tools and it works perfectly now.
I already had the newest Version of SQL Data Tools installed, but after installing VS2015 RC it stopped to work. After run a repair on SSDT it compiles again with success.
I had Visual Studio 2013 Update 5 installed and was having this issue. I followed these steps from above and that fixed the issue for me -->
In Visual Studio 2013 -> Tools -> Extensions and Updates... -> Updates -> Product Updates -> Microsoft SQL Server Update for database to 12.0.50730.0
I had the same issue and just restart the Visual Studio and it works for me.
I experienced the same issue with a slightly different stack trace:
Error MSB4018: The "SqlBuildTask" task failed unexpectedly.
System.IO.IOException: The file exists.
Turns out this is a issue with the Temp directory for the service account I was using, I think if you exceed X number of folders/files in that directory the publish will no longer work. Fixed this issue by following the instructions mentioned here (for my service account):
Go start-> run
Type %temp% and click ok
Make sure you are in the folder /Local/Temp
Delete everything in this folder
If it helps anybody, I installed VS2014 CTP 3, and I can build from it. Interestingly after a successfull build in vs2014, the next time you build in VS2013 it works. But subsequent builds in VS2013 dont work, until you rebuild in VS2014.
I was able to fix the issue by repairing Microsoft SQL Server Data Tools and re-starting Visual Studio 2013.
Control Panel > Right Click: "Microsoft SQL Server Data Tools" > Click: "Repair" > Re-Start Visual Studio
I had the same issue. Running disk check and then rebooting fixed it.
I got the same error and fix it by re-install Visual Studio 2015
I had this problem and fixed it like this:
install the latest DacFx from http://www.microsoft.com/en-us/download/details.aspx?id=43370
Delete the Microsoft.Data.Tools.Schema.SqlTasks.targets file from C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\SSDT
repair SQL Server Data Tools 2013 , reset visual studio()

Error 0x84b10001 when installing SQL Server 2012 on a machine with VS2013

I'm trying to install SQL Server Express with Service Pack 1 on my Win8 Pro (x64) development machine and I'm consistently getting an error 0x84b10001 when trying to install it:
Antivirus is disabled during the installation (done as Administrator) and I tried 2 versions of the SQL Server Express package and I'm getting the same issue with both.
I'm getting the same issue whether I'm trying the x86 or x64 packages.
I suspect that the issue comes from the fact that Visual Studio 2013 has already installed some SQL Server packages but I do not see any way to update and modify these to add the Management Studio for istance.
Well, turns out that this cryptic error is due to an older instance of SQL Server Desktop Engine (MSDE) being present.
After uninstalling MSDE, the SQL Server 2012 setup worked without errors.
Create a new local user with administative rights and try the installation again. In my case it solves the problem with MSSQL 2008R2.
Create new user with administrative privileges and install using that user. It worked.
Remove folder:
C:\Users[USER ID]\AppData\Local\Microsoft_Corporation
It worked for me.
If you try to install SQL Server 2014 and get this error, use this web site:
http://anewdomain.net/2013/10/21/how-to-enable-net-framework-2-0-and-3-5-in-windows-8-1-for-older-programs/
You should install .NET Framework 2.0 and 3.5 first. You should check the framework versions on your PC. If you have only 4.5, you will continue to get the same error code.
Anyway, I fixed my trouble.
I hope it helps you too.
In my case, it was because trying to install an x86 package on an x64 windows, installing x64 package worked for me.

Visual Studio Unable to Add Data Connection to SQL Server

Im trying to add my local SQL Server database to Visual Studio so I can grab the connection string from it but I am getting this error message:
As you can see the Test succeeds but when I try to add I receive error.
I figured out that you need to have SDK.sfc 11.0.0.0 installed. I only had 10.0.0.0 installed.
You can use the link here to download "Microsoft® System CLR Types for Microsoft® SQL Server® 2012" and "Microsoft® SQL Server® 2012 Shared Management Objects"
Download Link
I think these are normally installed with VS 2012 but in either case it fixed the issue. You can check your version in the assembly path:
C:\windows\assembly
The install does not require a restart but you will need to close and reopen your Visual Studio.
It seems that you are missing some updates from Microsoft: one link
You could search with google/bing/whatever and find a lot of hints to get this working!
for both type (32 bit or 64 bit )
Open URL http://www.microsoft.com/en-us/download/details.aspx?id=35580
Download ENU\x86\SQLSysClrTypes.msi
Download ENU\x86\SharedManagementObjects.msi
Install ENU\x86\SQLSysClrTypes.msi
Install ENU\x86\SharedManagementObjects.msi
Restart your Visual Studio and now Everything will work smooth.
This fix was for the error (version 11.0.0.0)

Replacing SQL Server 2005 Express Management Studio with the full version

I have been running SQL Server 2005 Express Management Studio ("SSMSE"), and I now have a need to install the full version of Management Studio ("SSMS"). This is a known hassle, but I've not found a comprehensive way to carry it out.
At first, I uninstalled SSMSE, and then ran SqlRun_Tools.msi to install the toolset. I got this error message:
A component that you have specified in the ADD_LOCAL property is already
installed. To upgrade the existing component, refer to the template.ini
and set the UPGRADE property to the name of the component.
I had no idea what template.ini was. So I looked around, and decided to uninstall the rest of the minimal installation of SQL Server 2005 Express on my computer by following Microsoft's advice in KB 909967, "How to uninstall an instance of SQL Server 2005 manually." That bit was very successful.
But when I attempted to run SqlRun_Tools.msi again, I faced this mess when the installer was "Preparing Installation Wizard":
The setup has encountered an unexpected error in datastore. The action
is SetDialogs. The error is : Source File Name:
...\datastorecachexmlschema.cpp
**** Compiler Timestamp: Fri Jul 29 01:13:50 2005
**** Function Name: DataStoreCacheXMLSchema::initScopeRecord*****Sour...
(but replace the asterisks with box chars, which were probably CR-LF's in the original message)
This is very frustrating. Does anybody have any advice for installing the full version of SSMS over top of SSMSE? Any help you can provide would be greatly appreciated!
I have also installed SQL Management Studio before just using the SqlRun_Tools.msi package without any problems but I think if you have previously had any other SQL Server 2005 components installed then you will need to install the Setup Support Files first as this is probably what sets up the component installation sequence. This can be done either by installing from the SQL Server installation media or by running the sqlsupport.msi file as described in the Microsoft KB article.
I resolve this problem
Steps
Go to Add\remove program
unstall SQL server browser
Install support files from CD
Install SQL_Tools.MSI
Well, I roughly found out what the problem was, based on a somewhat cryptic resolution mentioned across a few different forums. This solution suggested that I needed to install Setup Support Files. Maybe it was reinstall, since I removed something with the same name when uninstalling SQL2K5 Express. I'm not sure if they were the same files, between the full version and the Express Edition.
I had tried reinstalling SQLXML4, the Native Client, and MSXML6 just to see if I could get beyond the error involving datastorecachexmlschema.cpp, and each time, I got the same error again. But I tried the technique mentioned in the above link, and it worked perfectly.
Basically, you insert the CD and run just the first part of the installation process, which installs the installation tools, including Setup Support Files. Then you cancel the rest of the installation process, and run SqlRun_Tools.msi instead.
I got great results when upgrading 2008 express to 2008 developer by (running setup) first going to Maintenance->Upgrade Edition, and then (since Management Tools etc was still "express" and I mainly needed the Sql Profiler) I also did a complete "new" installation (Installation->"New installation or add features.."), selecting the existing instance and then selecting all features.
No uninstall or command line necessary.
Behaved the same afterwards, just with new features.