Cannot open existing or create new SQL Server Database Project - visual-studio-2012

PLEASE HELP!!!!
MY SET UP
Visual Studio Ultimate 2012 Update 4 on Windows 7 Professional,
ACTION
Installed latest SQL Server Data Tools Update
SYMPTOM 1 (Cannot create)
When attempting to create new project, I get:
Could not load file or assembly
'Microsoft.Data.Tools.Schema.Utilities.Sql.11, Version=11.1.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. The System cannot find the file specified.
SYMPTOM 2 (Cannot open existing project)
When attempting to open an existing project, I get:
Unsupported
This version of Visual Studio does not have the following project
types installed or does not support them. You can still open these
projects in the version of Visual Studio in which they were originally
created.
Non-functional changes required
Visual Studio will automatically make non-functional changes to the
following projects in order to enable them to open in this version and
Visual Studio 2010 SP1. Project behavior will not be impacted.
WHAT I HAVE TRIED
I have uninstalled/reinstalled VS2012, SSDT, and Update 4.
I've gone through "Programs and Features" Control Panel and have Repaired everything in several different orders.
I have been all over the internet and have tried every single workaround from every article even remotely related to my situation, including deleting temporary files, registry keys, etc.
Nothing seems to work.
Please help me, I'm on day 2 of being dead in the water.

MICROSOFT -- HEADS UP!!!
This appears to have worked !!!!
Zip up the folder C:\Program Files (x86)\Microsoft SQL
Server\110\DAC\bin and set aside (in case this doesn't work for you)
Delete the contents of C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin
Copy the entire contents of
C:\Program Files(x86)\Microsoft Visual Studio\11.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\120
into C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin
Re-launch VS2012,
AND
I was able to create a new SQL Server Database Project, and
I was able to open one of my existing projects.
VS did crash once when i was looking through my project using the SQL Server Object Explorer, but I have not been able to duplicate it.

Related

Setting up SSIS Item Template in SQL Server Data Tools for Visual Studio 2012

I have created a dtsx file to use as an SSIS package template. I want to be able to use the file as a template by clicking on an open Project in Solution Explorer and selecting Add -> New Item
My questions are:
How do I save this as a template file? Its currently a .dtsx file.
Where do I have to place the file so its in my list of options in the Add New Items dialog? I have seen many conflicting paths and none specifically for SQL Server Data Tools for Visual Studio 2012.
I have searched for instructions on how to do this but have now found clear instructions for use with SQL Server Data Tools for Visual Studio 2012. Posts I have found are conflicting and don't clearly explain how convert the dtsx file into a template file. The link here is an example of conflicting info; its posted for vs 2010 and examples are for vs 2005. I have also tried to use the Export Template Wizard but this feature seems to have gone away in SSDT for VS2012.
You need to copy the dtsx package to following location and restart the SSDT for VS2012. Note that the VS installation location may be different in your machine.
First select the package that you want to export as a template and then Select File->Save As..
and save it to
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\ProjectItems\DataTransformationProject\DataTransformationItems
E.g.
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\ProjectItems\DataTransformationProject\DataTransformationItems\MyTemplatePackage.dtsx
Quote: I have also tried to use the Export Template Wizard but this feature seems to have gone away in SSDT for VS2012
SSDT for VS2012 does not have an export template wizard. It's only avaible for VS2012.

Error opening SQL File from TFS 2012

When I try to view a .sql file from Source Control Explorer in Visual Studio 2012 (TFS 2012) I get the following error message:
TF10187: Could not open document
FilePath\FileName
User canceled out of save dialog
It's only happening for SQL files. The file does exist in the TFSTemp folder and I can double click and open it from there. What do I need to change to fix this error message?
Install SQL Server Data Tools - September 2013 update things will be fine. http://msdn.microsoft.com/en-us/jj650015
For us, this seems to be linked to a .NET Framework 4.6 upgrade and is not limited to SQL files. Users have issues opening files from Source Control Explorer and Solution Explorer.
Delete the contents from the following folders:
C:\Users\<>\AppData\Local\Microsoft\Team Foundation
C:\Users\<>\AppData\Local\Microsoft\VisualStudio
C:\Users\<>\AppData\Local\Microsoft\VSCommon
The first step fixed it in my case, but you can try this if it doesn't: Navigate to the Visual Studio IDE folder in command prompt or windows explorer and Run the following command "devenv /resetuserdata". Ie: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE. To minimize the potential loss of the user’s personal environment, you should consider creating a backup using the Export Settings wizard, and the Import Settings wizard to restore the settings if and when needed.
Note: The side effects of running the /resetuserdata option is that any customizations will have to be reconfigured (ie: TFS server and proxy settings) as well as many, if not all, Visual Studio extensions have to be re-installed.
Source: http://blogs.msdn.com/b/willy-peter_schaub/archive/2010/09/15/if-you-have-problems-with-tfs-or-visual-studio-flush-the-user-cache-or-not.aspx
Looks like you need to uninstall Redgate and then re-install the data tools. This is probably because an add-in was trying to grab the .SQL files and do something with them that VS wasn't expecting.

The 'ProviderPackage' package did not load correctly

I installed Visual Studio 2012 and at a later date Update 2. After installing Update 2, when I load any project, I get the following 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 'C:\Users\username\AppData\Roaming\Microsoft\VisualStudio\11.0\ActivityLog.xml'.
Continue to show this error message?
---------------------------
Yes No
---------------------------
After locating the ActivityLog.xml, I see the following set of errors:
<entry>
<record>300</record>
<time>2013/04/23 18:32:54.002</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [ProviderPackage]</description>
<guid>{5F2E5E42-4192-4D79-A0D8-1D881E808829}</guid>
</entry>
<entry>
<record>301</record>
<time>2013/04/23 18:32:54.012</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [ProviderPackage]</description>
<guid>{5F2E5E42-4192-4D79-A0D8-1D881E808829}</guid>
<hr>80131522</hr>
<errorinfo>Method 'GetHostedIntellisenseTypes' in type 'Microsoft.VisualStudio.Progression.DTEWrapperCached' from assembly 'Microsoft.VisualStudio.GraphProviderPackage, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' does not have an implementation.</errorinfo>
</entry>
<entry>
<record>302</record>
<time>2013/04/23 18:32:54.012</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [ProviderPackage]</description>
<guid>{5F2E5E42-4192-4D79-A0D8-1D881E808829}</guid>
<hr>80131522</hr>
<errorinfo>Method 'GetHostedIntellisenseTypes' in type 'Microsoft.VisualStudio.Progression.DTEWrapperCached' from assembly 'Microsoft.VisualStudio.GraphProviderPackage, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' does not have an implementation.</errorinfo>
Google searches do not reveal an exact match on my issue. I've tried searching the packages on the install ISO and cannot locate a package that needs to be repaired...
F:\packages>dir /s *provider*
Volume in drive F is VS2012_ULT_MSDN_ENU
Volume Serial Number is 4A21-C8BD
Directory of F:\packages\SSDT
07/26/2012 11:30 AM 780,288 DbSqlPackageProvider.msi
1 File(s) 780,288 bytes
Total Files Listed:
1 File(s) 780,288 bytes
0 Dir(s) 0 bytes free
Any other ideas?
Close Visual Studio.
Open a Developer Command Prompt for Visual Studio 2012 (as administrator).
Type devenv /setup.
Restart Visual Studio.
Possible duplicate of Visual Studio 2012 error: Package 'Visual C++ package' failed to load
See Visual C++ package: failed to load?????
This is Aaron's (Aaron Reed) answer from above, just copied as an answer instead of part of the question:
Fixed it... Fixed it... Fixed it...
Opened Programs and Features (run: appwiz.cpl)
Sorted list of installed apps by: Install Date
Filtered list by adding "SQL" to the upper right search filter
List item
I installed VS2012 on 4/1/13, so I went through each listed SQL item in the list, and right click --> Repair
From there I ran VS2012 and opened the target Solution file without issue.
My list:
Microsoft SQL Server 2012 Data-Tier App Framework
Microsoft SQL Server Data Tools - enu (11.1.20627.00)
Microsoft SQL Server 2012 Management Objects (x64)
Microsoft System CLR Types for SQL Server 2012 (x64)
Microsoft System CLR Types for SQL Server 2012
Microsoft SQL Server 2012 Management Objects
Microsoft SQL Server 2012 Transact-SQL Compiler Service
Microsoft SQL Server 2012 Command Line Utilities
Microsoft SQL Server Data Tools Build Utilities - enu (11.1.206...
Microsoft SQL Server Compact 4.0 SP1 x64 ENU
Microsoft SQL Server 2012 T-SQL Language Service
Microsoft SQL Server 2012 Native Client
Microsoft SQL Server 2012 Data-Tier App Framework
Microsoft SQL Server 2012 Express LocalDB
Microsoft SQL Server 2012 Transact-SQL SpriptDom
This worked for me -
In order to fix the issue one needs to clear the Visual Studio cache under:
%LOCALAPPDATA%\Microsoft\VisualStudio\11.0\ComponentModelCache
Thanks go to blog post SetSite failed for package [Microsoft.VisualStudio.Editor.Implementation.EditorPackage].
Usually this can be fixed by clearing the Visual Studio cache under:
Visual Studio 2012: %LOCALAPPDATA%\Microsoft\VisualStudio\11.0\ComponentModelCache
Visual Studio 2013: %LOCALAPPDATA%\Microsoft\VisualStudio\12.0\ComponentModelCache
I fixed this by uninstalling or removing:
Microsoft SQL Server Data Tools - enu (14.0.50325.0)
I hope this helps :)
Worked for me.
Window7 SP1 + VS 2013
Open a Developer Command Propmpt for VS 2012 (as administrator).
Run devenv /setup.
An even quicker fix is to simply repair the Microsoft SQL Server in the list. That fixed my problem.
Uninstalling/Repairing SQL Server Data tools is the only thing which worked for me, thanks to wayne.blackmon comment.
Picture below
For me the ActivityLog.xml stated
<errorinfo>Access to the path 'C:\Users\Klas\Documents\Visual Studio
2015\ArchitectureExplorer' is denied.</errorinfo>
When I examined this folder I realized that the entire folder structure here
C:\Users\Klas\Documents\Visual Studio 2015
had permission set so that my user had no write permissions. I added Full Control rights to my user for this folder and everything below.
After that, the message went away. Also, when I started Visual Studio it created lots of subfolders to this folder.
I had the same issue in Visual Studio 2013 for Windows 8.1.
The previous answers didn't work for me. I had to repair Visual Studio and then reboot my machine.
I was getting this error on Visual Studio start up:
the 'visual studio component model host package' did not load correctly...
After that bunch of other The '' package did not load correctly... error messages.
I realized I don't have enough free space on my C drive, where the Visual Studio were installed.
I opened up some space and restarted the Visual Studio, solved the problem.
Not sure if it has anything to do with the free space on disk though.
In my case the problem appeared after I installed Visual Studio 2015. From that point nor 2015, nor previous versions of Visual Studio would load.
The problem was the PATH environment variable exceeding the MAX length.
I shortened it to less than 2048 and restarted the machine. Visual Studio started loading, but with some errors still. Lastly run the devenv /setup, and all is back to normal.
I just had a similar error (on Windows 7. I installed Visual Studio 2015 Professional and then after that, several "...package did not load correctly" messages started showing up when I ran Visual Studio 2012).
What fixed my issue was to repair "Microsoft Studio Tools for Applications 2012".
Run "appwiz.cpl" (Control Panel → Programs → Uninstall a program
Right-click on "Microsoft Studio Tools for Applications 2012. Select "Change", then click "Repair".
After this, I can open up Visual Studio 2012 without those error messages.
I had a similar error. After I updated to VS2012.U2, the problem went away. TFS 2012 update 2 can't be removed without removing TFS. While I had an issue with upgrading from TFS2012.U1 to U2, I have found TFS2012.U2 to be worthwhile.
It was the problem with access rights to my %USERPROFILE% directory (because of the failure with the PC). Setting permissions to full access fixed it.
Another suggestion,
Run as admin, and restart the VS application.
Apply package update.
Reboot.
Hope this helps!
From MSDN forums:
Please open Windows Explorer, and navigate to <Visual Studio Installation Path>\Common7\IDE
Devenv.exe /SafeMode: Launches the IDE in safe mode loading minimal windows.
Devenv.exe /ResetSettings: Restores the IDE's default settings, optionally resets to the specified VSSettings file.
Devenv.exe /ResetAddin: Removes commands and command UI associated with the specified Add-in.
Devenv.exe /ResetSkipPkgs: Clears all SkipLoading tags added to VSPackages.
If still no help, I suggest you try repairing your Visual Studio installation or uninstall it and then reinstall it. If you want to reinstall it, I am afraid that you need a DVD or a fine Internet.
Doing the first three steps works for me.
I got "lucky" and restarted Visual Studio 2013 and it worked. I have had other errors in which deleting the temp cache items cleared it up.
Side note. While Visual Studio 2015 is not perfect as of yet, and NuGet has become less friendly to use IMO, if my computer is restarted by the company domain network administrators OR especially when there is a computer losing power with a brown-out of some loss of power Visual Studio 2013 becomes a bit a "fun" to fix while Visual Studio 2015 projects for months seem to just open just fine as if nothing happened when I login.
In my case, I solve this problem by removing the Read-only attribute of the folder "Visual Studio 2015" in <C:\Users\myuser\Documents>.

VS2012 Express Web Can't Create MVC4 Apps

I have VS2012 Express Web installed on my machine and can create all different kinds of Projects with exception of MVC3/MVC4 apps. When I click OK on the New Project dialog I get the Select A Template dialog. I notice that the Create a Unit Test Project checkbox is Disabled. Selecting any of the choices (such as Internet Application) gives me this same error: The system cannot find the file specified (Exception from HRESULT 0x80070002).
I have uninstalled and deleted the C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\VWDExpress\ProjectTemplatesCache and ItemsTemplateChache - and after removal deleted the entire VWDExpress directory so the fresh install would recreate all the templates. I've tried both the web-installer as well as the .iso installer. Has anyone seen this problem or have any idea why I can't create MVC3/MVC4 projects?
Any thoughts would be greatly appreciated. I have posted to the MSDN Newgroup and not had any luck there.
regards,
Bill
I had the same problem with a full installation of Visual Studio 2012. Uninstalling Visual Studio and everything it came with (SQL Server localDB, Silverlight SDKs etc), restarting, then reinstalling Visual Studio made it work.
Prior to re-installing, I ran ProcessMonitor during an attempt to create an MVC4 app and it kept trying to find an "extension.vsixmanifest" file but couldn't. I'm not sure which one, since I didn't try reinstalling all my extensions; maybe that will help.

Visual Studio 2012 Corrupting ApplicationHost.config File

I just installed Visual Studio 2012 RTM. During the process of trying to create a new web project, I receive the following error:
"Web application projects are currently configured to use IIS Express. To switch back to using the Visual Studio Development server, change the development server option under the Projects and Solutions/Web Projects category of the Tools/Options menu. Configuring IIS Express failed with the following error: Filname: \?\UNC\DEV-FILES\home\mike\MyDocuments\IISExpress\config\applicationHost.config. Line number:1. Error: Configuration file is not well formed XML"
...and project creation subsequently fails.
I already know that I can resolve the this by using the VS dev server, but I should also be able to use IIS when necessary.
When I view the applicationHost file in question, its size is 0kb. It looks like Visual Studio 2012 wiped the contents of the file completely out. I've taken clean backups of the applicationHost file from c:/inetpub/history/ and restored them in the IISExpress folder. Again, when I attempt to create a new project through VS 2012, the file goes from 85KB back down to 0KB.
So I guess I'm trying to figure out why VS 2012 is writing to the applicationHost.config file, what it's trying to write, and how I can resolve the issue.
Thanks,
Mike
I had this problem and solved it by removing encryption on the IISExpress folder. You may or may not need to remove encryption on your My Documents\Visual Studio 2012 folder as well.

Resources