The 'Visual Studio Explorers and Designer Package' package did not load correctly - visual-studio

Every time I open solution in Visual Studio 2015 I get following message:
Here are last entries from ActivityLog.xml:
<entry>
<record>827</record>
<time>2015/12/23 11:26:13.919</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [Visual Studio Explorers and Designers Package][Object reference not set to an instance of an object.]:{ at Microsoft.VSDesigner.VSDMenus.Initialize(IServiceProvider serviceProvider)
at Microsoft.VSDesigner.VSDesignerPackage.VSDesignerPackage.Initialize()
at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)}</description>
<guid>{8D8529D3-625D-4496-8354-3DAD630ECC1B}</guid>
<hr>80004003 - E_POINTER</hr>
<errorinfo>Object reference not set to an instance of an object.</errorinfo></entry>
I followed suggestions found in a similar question but with no success.
Unfortunately re-installing NuGet via Extensions and Updates doesn't solve the issue.

If #batressc solution doesn't work, you have to delete the .VS folder in the solution folder also.
So:
Close all VS Windows
Delete folder C:\Users\<username>\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache
Delete Folder [Solution Folder]\.vs

Delete the file Microsoft.VisualStudio.Default.Cachein the folder C:\Users\<username>\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache

This one helps with VS 2017:
https://developercommunity.visualstudio.com/content/problem/160124/failed-to-load-package-monoandroiddesignerpackage.html
1) Start VS
2) File->New->Project->Xamarin app (either iOS or Android)
3) Now click the Toolbox
4) Close VS

Deleting this folder did the trick for me.
C:\Users[USERNAME]\AppData\Roaming\Microsoft\VisualStudio\15.0_14b774ca

What did the trick for me was removing "Microsoft .NET Core 1.0.1 VS 2015 Tooling Preview 2"

Run the following command prompt help me solve the problem on VS 2017 Community. I never tried on other VS version though. Let me know if it works in other version:
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe" /resetskippkgs

I had this error on .netcore 3.1 only:
The 'windows forms remote designer hosting package' package did not load correctly
Resolved with the help of all of the answers here.
Remove the entire contents of the directories:
The .vs - in the project
c:\Users\User\AppData\Local\Microsoft\VisualStudio\16.0_1cac4d16\

Related

After windows update to 1909, getting this error while building my solution in VS Studio 2019

After windows update to 1909, getting this error while building my solution in VS Studio 2019
Error Details
Could not run the "GenerateResource" task because MSBuild could not
create or connect to a task host with runtime "CLR4" and architecture
"x64". Please ensure that (1) the requested runtime and/or
architecture are available on the machine, and (2) that the required
executable "C:\Program Files (x86)\Microsoft Visual
Studio\2019\Professional\MSBuild\Current\Bin\amd64\MSBuild.exe" exists
and can be run.
Windows version: 1909
Upgraded from 1803
Visual Studio version: Visual Studio Professional 2019 version 16.7.5
Please let me know anyone encountered this issue earlier, any help will be appreciated.
Try to add these node in xxx.csproj file:
<PropertyGroup>
<GenerateResourceMSBuildArchitecture>CurrentArchitecture</GenerateResourceMSBuildArchitecture>
<GenerateResourceMSBuildRuntime>CurrentRuntime</GenerateResourceMSBuildRuntime>
</PropertyGroup>
More steps about this issue, you can refer to this similar issue.
To be more specific, set an system environment variable DisableOutOfProcTaskHost to true.
Or DISABLEOUTOFPROCTASKHOST to 1.
as I said in here
I had the same Error (in version 16.9.3) but By Repairing Visual Studio 2019, Updating last version of windows 10, close VS, delete .vs hidden folder (under solution folder) ,bin and obj folder then restart your VS . Fortunately My problem was solved.

Microsoft ASP.NET and Web Tools 2015 - Visual Studio 2015 : Package failed

Visual Studio 2015 filed to install asp.net and web tools 2015
I tried more than one time also tried to repair Visual Studio i faced the same error.
also i tried to install the same ISO file on another machine and it worked fine
What a ridiculous ordeal. I was finally able to resolve this error by manually installing the webtoolsextensionsvs14.msi using msiexec and specifying a targetdir of c:\temp. For some reason is was trying to create temp install files directly in c:\
msiexec /a webtoolsextensionsvs14.msi /qb /l* log.txt SKIP_SETUP=1 TARGETDIR=
c:\temp
Thank you for reporting this. I will try to help you resolve this and do have a few questions.
Was this a clean installation or did you upgrade from a previous release such as RC?
Have you tried to repair Visual Studio?
Would you be able to share the installation logs? There should be two log files in your %temp% folder. The first file is an overall summary of the VS installation and should be have a name such as vs_professional_yyyymmddhhmmss.LOG. The second log is for the Web Tools package itself and should have a name such as vs_professional_yyyymmddhhmmss_nnn_WebToolsExtensionsVS14_1040.LOG
Thanks,
Jacques

The 'Provider Package' did not load correctly

VS 2013 Professional - Version 12.0.31101.00 Update 4
All of a sudden, whenever I try to open a project (MVC project or Python project), I get:
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\xxxx\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml'.
In my AppData\Roaming, there is no 12.0 folder! In AppData\Local, there is a 12.0 folder but there is no ActivityLog.xml file.
When I ignore the message and press F5 to run, after lots of disk movement, Visual Studio simply closes and disappears.
I have repaired a few times and the exact same behavior persists.
When I try to run devenv.exe /setup or devenv.exe /resetuserdata, absolutely nothing happens. No error, no process is launched, nothing. Running devenv.exe without any parameters does launch VS.
What can be wrong? I hesitate to uninstall and reinstall if there is some other solution.
1 day later: Uninstalled VS 2013 and reinstalled, and then applied Update 4.
Problem is still the same for the MVC project: ProviderPackage did not load correctly, and when running project VS closes and disappears.
Last record in ActivityLog.xml says:
<entry>
<record>1120</record>
<time>2015/03/17 06:38:43.882</time>
<type>Error</type>
<source>VisualStudio</source>
<description>An exception was thrown during package instantiation and was caught in the package manager [ProviderPackage]</description>
<guid>{5F2E5E42-4192-4D79-A0D8-1D881E808829}</guid>
<hr>8000ffff - E_UNEXPECTED</hr>
<errorinfo></errorinfo>
</entry>
Deleting ComponentModelCache from
C:\Users\YourUserName\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache
works fine for VS 2015.
Note: You will need to close the VS before deleting this folder. Also replace 14.0 with 12.0 in folder path for VS 2013
Delete folder ComponenModelCache
C:\Users\XXXX\AppData\Local\Microsoft\VisualStudio\XX\ComponentModelCache
that worked for me
Open Command Prompt and use the following commands (if necessary, change the directory according to the installation folder):
cd c:\
C:\>"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" /resetskippkgs"
Make sure the paths are correct at:
Computer\HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0
Mine for example the VisualStudioLocation key changed from "C:\Documents\Visual Studio 2015" to just "Visual Studio 2015" which was problematic.
I can't leave a comment on Murat Yıldız's answer so this is the next best thing. His solutions works great. I opened the Visual Studio Command Prompt as an administrator and ran from the command prompt:
C:\WINDOWS\system32>devenv /resetskippkgs
It worked like a charm.
I also faced the same problem and solution for me was to run Visual Studio as an administrator.

How to fix '"CheckAttributes" task could not be loaded'-error after installing Visual Studio 2013 Update 4

After installing Update 4, I now find myself unable to build (or even clean) any solution. I keep getting:
Error 1 The "CheckPathAttributes" task could not be loaded from the
assembly C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.Tasks.dll.
Could not load file or assembly 'file:///C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.Tasks.dll'
or one of its dependencies. The system cannot find the file specified.
Confirm that the declaration is correct, that the assembly
and all its dependencies are available, and that the task contains a
public class that implements
Microsoft.Build.Framework.ITask. HandlePageNotFound
Does anyone know how to resolve this please?
Well, here's "my solution".
First the horrific "prompt of death" (plus the same "licensing issue" annoyance) in this post:
What I've attempted (and result) based on info from the interwebs:
Close VS 2013 and rename the folder:
C:\Users\[your user name]\AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache
Result: No effect/errors persist (VS will re-create that folder on startup)
Rerun the Visual Studio Update 4 installer and Repair
Result: Successfully "fixed" whatever it was.
This will take about an hour which is slower than when I originally installed the update so that was a clue, or rather, more like "well, I hope that means it found what it did wrong or forgot/missed out on" (and not, "oh crap, now I'm really screwing things up even more")
A quick summary of my environment so that hopefully will guide you to your solution:
I did install Office Developer Tools Nov 2014 prior to the Update so in my case, that wasn't the issue (I did not remove/uninstall)
I have Resharper, and I did not disable it, so this too doesn't seem related (some have pointed this out)
I did update to Web Essentials 2013 for Update 4 after the initial Update (it will prompt you to after installing VS Update 4). I didn't do anything after the Repair (didn't remove/re-install/etc Web Essentials after the Repair).
I have VS 2012 as well, just mentioning this though that was never affected in any way (and was my fallback while this issue was stopping me from using VS2013)
Hth...
Found the solution via this
TransformXml task could not be loaded from Microsoft.Web.Publishing.Tasks.dll
In my case, I had Visual Studio 2012 installed on an E: drive already, so I found a copy of Microsoft.Web.Publishing.Tasks in
E:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web
So I copied that file, and Microsoft.Web.XmlTransform to here:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web
and now all is well :)
Uninstalling "Office Developer Tools for Visual Studio 2013 – November 2014 Update" helped me. Now all works as before.
If you have VS 2012 installed on your machine. Copy Microsoft.Web.Publishing.Tasks.dll and Microsoft.Web.Publishing.targets from C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\web\ into C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web (the path for VS 2013). Restart visual studio.
I have only VS2013 (now with Update 4) and I solve this problem as follows: Close VS, copy "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.Tasks.Dll" into the "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web" directory and start VS (folder v11.0 no contains Web subfolder). Now I can rebuild website projects without any error again.
My problem cleared thanks to the same TransformXml link and the suggestion to install Windows SDK for Windows 7 and .NET Framework 4
Copying "Microsoft.Web.Publishing.Tasks.dll" and "Microsoft.Web.XmlTransform.dll" from "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web" to "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web" also works

How can I delete bad Visual Studio templates?

How do you remove the following noise templates that don't even work?
In Visual Studio: go to Tools > Extensions and Updates and then uninstall or disable the template.
To save a bit of time for 2010 users, the folder has moved:
...\My Documents\Visual Studio 2010\Templates\ProjectTemplates
For Visual Studio 2013, I found my template cache here:
%USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio\12.0\ProjectTemplatesCache
Deleting them off of disk should do the trick. Where they exist will depend a bit on where you installed them. If you installed them for all users they will be at
%ProgramFiles%\Microsoft Visual studio 9.0\Common7\Ide\ProjectTemplatesCache
For a single user they will be at
%USERPROFILE%\Visual Studio 2008\Templates\ProjectTemplates
EDIT
If InstallVSTemplates fails, it is likely one of the following. The one I can't help with is some program randomly dumping files inside of the ProjectTemplatesCache directory.
The other more likely cause is there is a bad template in the ProjectTemplates directory. InstallVSTemplates really just goes through this directory, and unzips all of the files into the ProjectTemplatesCache directory. You will have to search through this directory and find the .zip file which contains the junk files being added to your project Once you find the file, delete it, delete ProjectTemplatesCache, and then re-run InstallVSTemplates.
After manually searching for some of the custom profile templates(.vstemplate),I found them at the following location:
%userprofile%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions
It appears VS2010 installs some of the templates as extesions or the authors made it that way.I hope this helps someone.
May need to run "devenv /setup" at the run command to refresh the VS2010 after you delete the templates.
For me it was a matter of removing it from here using VS2017:
%USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio\15.0_45552a03\ProjectTemplatesCache
Delete the bad/unwanted project folders from
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates
Clear cache
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplatesCache
Delete stuff from (perhaps not necessary)
C:\Users[Your User Name]\Documents\Visual Studio 2008\Templates\ProjectTemplates
and finally open Visual Studio 2008 Command Prompt as Administrator and run
devenv /installvstemplates
For me the issue got resolved when I deleted the cache.bin file from ItemTemplatesCache folder. Full path of this folder is:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplatesCache
Also make sure you delete the template files from below locations:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplatesCache
C:\Users\Default\Documents\Visual Studio 2010\Templates\ItemTemplates
C:\Users[NT-USERNAME]\Documents\Visual Studio 2010\Templates\ItemTemplates
For Visual Studio 2019:
Extensions > Manage extensions > Installed > Uninstall
Worke for VS 2012 and 2015 :
In Visual Studio: go to Tools > Extensions and Updates and then uninstall or disable the template.
worke in VS 2019 :
1- In VS2019, custom templates can be removed by deleting the template folder from %USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio{VSVersion}\ProjectTemplatesCache. Look for a {VSVersion} that begins with "16".
https://i.stack.imgur.com/V6SQ5.png
2- Delete What You Want From Templates Folder in {C:\Users\USERName\Documents\Visual Studio 2019\My Exported Templates}
Notes :
{ProjectTemplatesCache} Or {ItemTemplatesCache}
https://i.stack.imgur.com/9BM9p.png
For Visual Studio Express 2010 you should delete all folders under
%USERPROFILE%\AppData\Local\Microsoft\VCSExpress\10.0\Extensions
For Visual Studio 2013 Community, you have to delete {program folder}\Common7\IDE\ItemTemplatesCache\cache.bin after deleting all the unwanted files as described above. Afterwards VS will rebuild the templates listing in the New Project... dialog.
You could also try this:
dotnet new --uninstall <PATH|NUGET_ID>
It works for me in VS 2019 and VS 2022 to uninstall the Avalonia templates.
Description
The dotnet new --uninstall command uninstalls a template package at the PATH or NUGET_ID provided. When the <PATH|NUGET_ID> value isn't specified, all currently installed template packages and their associated templates are displayed. When specifying NUGET_ID, don't include the version number.
Examples
Uninstall the Avalonia templates
dotnet new --uninstall Avalonia.Templates
From MicrosoftDocs
If the template was installed by double clicking a VSIX file, it is considered an extension and can be uninstalled using the technique described by Hamid Behnam above. Otherwise, it can be deleted from one of the template directories mentioned above.
It looks like in each case we use different recipe. Unfortunately, commands line and VS menu command listed in this thread did not work in my case, which is MS VS 2019 Community Edition on Win7 x64:
First, close VS, remove unwanted *.zip files from all following folders, as well as hidden cache.bin file from the last \ProjectTemplatesCache folder (it will be restored at VS startup), then restart VS. Here are those 3 folders:
{Documents}\Visual Studio 2019\My Exported Templates
{Documents}\Visual Studio 2019\Templates\ProjectTemplates
{User}\AppData\Roaming\Microsoft\VisualStudio{Number}\ProjectTemplatesCache

Resources