unable to create new project in visual studio 2015 - visual-studio

i am not able to create new project in visual studio 2015. The error is access to path is denied
C:\Users\good\Documents\visual studio 2015\windowsapplication1\windowsapplication1' is denied.

I had a similar problem in Visual Studio 2017. I removed this folder to get it working again:
C:\Users\USERNAME\AppData\Local\Microsoft\VisualStudio\15.0_4f8023be
15.0_4f8023be is a unique hexadecimal number for my AppData, yours will be a different.
It might also work by just removing:
C:\Users\USERNAME\AppData\Local\Microsoft\VisualStudio\15.0_4f8023be\privateregistry.bin
and that way you won't lose your settings and extensions.

i found the solution run visual studio as administrator or
Open visual studio. Tools Menu | Options | Projects and Solutions | Check the checkbox "Save new projects when created".
Also, you can change projects location in same dialog. Change it to somewhere else like D:\VBProjects etc..

What worked for me is this:
I uninstalled Visual studio 2015 completely and then installed Visual studio 2015 with option for update 3 unchecked.
I guess update 3 can cause this issue.

I got this problem while trying to create a project under a virtual disk path (created by command SUBST), so the solution for me was to create a project under a path the virtual disk path was referring to.

Related

Visual Studio Update Paused - Now cannot be resumed, modified or removed

First of all, I am trying to open a support request with Microsoft about this issue, but their support reporting portal isn't working. I have resorted to Stackoverflow because I have no way of getting to Microsoft.
Yesterday, I started updating Visual Studio 2022 from Visual Studio Installer by mistake and paused it shortly after. Today, I tried to open a project but Visual Studio seemed unavailable. At that point I remembered about the paused update and re-opened the Visual Studio installer. I tried to Resume, and I got the below error. The Modify and Remove options give out the same error too. There is no Repair option.
Sorry something went wrong
The dependent package of
'Microsoft.VisualStudio.Debugger.Concord,version=17.1.33203.90,productarch=x64'
cannot be found: Microsoft.VisualStudio.DebuggerClient.Concord,
version=[17.0,18.0].
I also tried Restarting and deleting temporary files using the Disk Cleanup tool - no difference.
I have tried to force an uninstall from the Add or Remove programs but this still redirects me to the Visual Studio installer.
I have tried to research this error online but found nothing.
I did not fix the issue but at least I managed to uninstall the Visual Studio instance to be able to start from scratch again. If you do not want to go down the route of uninstalling, feel free to try the steps as suggested by #garbagecollector.
I deleted the installation folder for 2022 from ProgramFiles.
I deleted the Visual Studio installer from Add or Remove programs. (Note: This actually uninstalled a working version of Visual Studio 2019 that I had, and left the messed up version of 2022 with the same issues, so beware if you do not want to uninstall another working version of Visual Studio)
Then I ran InstallCleanup.exe via CMD (in admin mode). Refer to the "Remove All with InstallCleanup.exe" section within this article. This seems to have cleared all Visual Studio related files including the Visual Studio
installer, and I could re-download the installer for Visual Studio
2022 Community edition and start afresh.
I faced the same issue today and could solve it by removing corresponding dependencies from _package.json files from C:\ProgramData\Microsoft\VisualStudio\Packages\[PACKAGE_NAME] folders.
I am not sure whether you can repair your installation this way, I tried only with uninstall.
So in your case edit this file:
C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualStudio.Debugger.Concord,version=17.1.33203.90,productarch=x64 and remove the line marked with "-->" under "dependencies":
{
"id": "Microsoft.VisualStudio.Debugger.Concord",
...
"dependencies": {
...
--> "Microsoft.VisualStudio.DebuggerClient.Concord": "[17.0,18.0]"
}
}
In my case I had to repeat this procedure for three or four _package.json files.

"Please correct before proceeding." - Web.config error

I attempted to launch a website project locally but received the below message in an error dialog:
Please correct before proceeding.(You might rename the current web.config and add a new one).
Typically this error is preceded by a general description of the cause, this one was not. Knowing odd, out-of-the-blue, problems such as these are typically related to corrupt IDE generated files. I tried deleting the .suo, .vssscc and other generated files from the solution and project directories but the problem continued.
This happened to me today after getting latest. I resolved by closing and reopening the solution, rebuild, then run. All is well...
I actually resolved this by making sure the Web.config file wasn't an open document inside VS 2015. In other words, close the Web.config file wherever it might be open, and make sure your Team Explorer isn't causing any problems, like an unexpected change or staged change...rebuild the sln and run...
Close vs2017 and open it again worked for me
just open web.config and run again.I've had this problem and I resolved by this solution .
I fixed the problem using a solution I found for a different IDE-related issue (original answer here). Run the following in an elevated command prompt:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" /setup
Note: You'll need to adjust the path for your version of Visual Studio (original version mapping answer here):
Visual Studio 2005 = 8
Visual Studio 2008 = 9.0
Visual Studio 2010 = 10.0
Visual Studio 2012 = 11.0
Visual Studio 2013 = 12.0
Visual Studio 2015 = 14.0
This issue came to me after merging some code in version control using RTC tools. When I saw whyoz answer I noticed that web.config wasn't opened anywhere. It could be RTC locking the file or something like this. So, I simply restarted Visual Studio and it became normal again.
I ran into this issue today after doing a branch merge using the VS19 built-in Git tools. The config file was correct; I even used a schema validator based on KD2ND's answer in how can I validate dot net application config file(ex, app.exe.config) on console?.
I cleaned the solution, unloaded it, and reloaded it, and everything worked fine. I didn't even need to restart studio.
Based on others' answers, this appears to be related to code merging in the IDE. It's a weird problem but it's a relief that the solution (once found) is simple.
As an FYI, in VS 2019 the solution is to close the tabs, and the solution and Visual Studio, then restart Visual Studio. This has worked for me.
in Microsoft Visual Studio 2019 : Just neeed to close project, thenn open+ clean+rebuild and everything work
In VS 19 Enterprise, the Solution for me was:
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe" /setup
Based on the merked answer from alan.
I had just opened the web.config file and then pressed CTRL K + D. it will make the formatting good of the file. and then run the application. it worked for me.
Even if you undo the above changes then also it works. it is weird somehow.

How to fix visual studio error "cannot find one or more components .Please re-install the application" in windows 8.1?

As Alex suggests find devenv.exe and run it . when search for devenv.exe then I found it's there . When I run this file getting error "cannot find one or more components .Please reinstall the application" .I re-installed visual studio thrice still getting same error . How to fix this error .
It's visual studio ultimate with update 3 . I don't have ISO file , file automatically downloaded by installer.It's got installed smoothly i.e. without giving any error .
Edit:
Initial question was How to create shortcut on windows 8.1 for visual studio ?
Contents :
Today I installed visual studio 2013 with windows phone SDK and Multi-device Hybrid apps on windows 8.1 .Unfortunately I am unable to find any shortcuts related to any one of the applications which are installed today .
How can I create shortcut or which file should I execute to open IDE ?
One answer would be search in search charm ,it's not there . I tried all methods that i could .
Following folders are there in windows 8.1 program files
C:\Program Files\iTunes
C:\Program Files\iPod
C:\Program Files\Windows Identity Foundation
C:\Program Files\Hyper-V
C:\Program Files\Common Files
C:\Program Files\IIS Express
C:\Program Files\Microsoft Identity Extensions
C:\Program Files\SharePoint Client Components
C:\Program Files\Microsoft SQL Server
C:\Program Files\Application Verifier
C:\Program Files\MSBuild
C:\Program Files\IIS
C:\Program Files\Microsoft Visual Studio 12.0
Many folders are there related to these apps in programfilesx86 .
Same problem for me. My solution:
Open command prompt as administrator
cd C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE
devenv /resetuserdata
I had solved the same issue on VS2012 as following steps:
• Use regedit.exe
• Go to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio
• Delete "11.0_Config" & "11.0 node"
notice: 11.0 as your VS version
• Restart VS2012
VS env will be constructed initially.
Hope this help.
BR
Problem is with security setting .
After 2-3 hours of Googling i found many solution but none of them work then i tried these solutions .
There is one folder in your machine: "C:\ProgramData".
Don't worry if you don't see this folder, unhide all the folders, you will find it there.
I did not had the rights on "C:\ProgramData\Microsoft\VisualStudio" .
See if you have full rights on the same.
If your are not able to open this folder, This means that you do not have rights on this.
to give rights follow the steps below :
1) Right click on the folder "VisualStudio."
2) Go to Properties->Security. See if your PC name is there in the user names list,
if not , then add it.
3) Go to Advanced -> Owner -> Edit -> Other users or groups. add your PC name,
i.e add yourself as the owner of the folder and give full rights.
Which is found here Application-data-folder-error . I was unable to change security of ProgramData files then i tried this solution .
1. On the root folder, right click, select properties, select security tab.
2. Click Advanced
3. The window that pops up should show the current owner. Click "Change."
The "Select User or Group" pop up box appears.
4. In the text box, type in your current user name (you should be an admin), and hit the
"Check Names" button. Your name will be replaced with the "official" system
name (i.e.,preceded by computer name and back slash).
5. Click OK
6. The box disappears, sending you back to the Advanced Security Settings window.
7. A new tick box appears below owner, with the text "Replace owner on subcontainers and
objects" Select this tick box.
8. I also selected the tick box "Replace all child object permission entries
with inheritable permission entries from this object", but I think I had to run this twice
- once with this box ticked and once without.
9. Make sure that "everyone" appears on the Permission entries window, if not,
click add. The same box that appears in step 4 shows up again.
Type everyone, click "Check Names" and then "OK"
10. Hit apply
which is found here Permission error.
Finally it works cheers :) Hope it will help to some other .
%programfiles(x86)%\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe should work. The VS version number (12.0) depends on your installed Visual Studio, of course.
Oh, and if you're on a 32-bit install of Windows, then use:
%programfiles%\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe
I have come across this problem while installing VS 2015 community. For me the problem was that I had ThreatFire running, which prevented VS from loading some dll. Deinstalling ThreatFire was the only solution. You cannot just stop it, as the actual service will still continue to run.
In general, thats how I figured out what the problem is:
Download and extract Windows Process Monitor https://technet.microsoft.com/en-us/library/bb896645.aspx
Run Process Monitor, include Process devenv.exe to the filters, exlcude Result SUCCESS, and click ok.
Process Monitor will display a huge list of file and registry accesses. Go through the list and look for events with Result ACCESS DENIED or FILE/PATH NOT FOUND. (You can filter the list even more using right click context menu)
That should give you usefull hints about what is really going wrong as the VS error message really is no help at all. You can also view the stack trace that generated the event. Thats how I found out about ThreatFire blocking dll loading.
For Visual Studio 2015 I had to delete these keys in regedit.exe:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0_Config
One possible user friendly workaround is to use the take ownership method from How to Geek and use it on %USERPROFILE%\AppData and on C:\ProgramData where C is the disk partition holding your OS. However you'll need to make hidden folders visible first. Then navigate to your VS installation folder and run devenv /resetuserdata.
Was facing the same issue with VSExpress 2015 (win 10).
Fixed the problem by removing the registry key in
[HKEY_CURRENT_USER\Software\Microsoft\WindowsNT\CurrentVersion\
AppCompatFlags\Layers]
Refer the link for more details
http://maditguy72.blogspot.ru/2013/06/cannot-find-one-or-more-components.html
I had the same problem, and I have fixed it.
You should check the name of the folder in which you installed visual studio.
If its name has been changed, windows can not find the components to execute. For this reason, windows will show an error message box to you
I'm on windows 7 32bits SP1. this worked for me :
run cmd.exe with elevated privileges (run as administrator). then execute :
cd c:\program files\microsoft visual studio 15.0\common7\ide
devenv.exe /resetuserdata
devenv.exe
before that I tried to give full rights (for my user account and also the weird Account-unknown(S1-5-21-13113034....) ) to these folders: c:\program files\microsoft visual studio 14.0 and c:\users\_myname_\appdata\local\microsoft
note that when installing visual studio, I changed the default folder name to c:\program files\microsoft visual studio 2015 so maybe it is related to the bug seen later ?
I had the same problem, and it turned out to be that my password on my local admin account expired. I use a regular account to login to Windows, but run Visual Studio as Administrator. Upon opening Visual Studio as Administrator, it prompts me for my local admin credentials, and because my password had expired, it gives me this error message.
Solution: Log out of Windows. Switch users, and login as the local admin. Windows will tell you that your password has expired. Change the password, and log out. Log back in as your normal user account, and try running Visual Studio again, this time entering the new admin password.
To fix this issue
Start regedit.exe
Go to HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio
Delete 11.0_Config
Restart ssms.exe
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b6d2b85d-c6e1-464a-85e0-e0625e7fb305/microsoft-visual-studio-shell-isolated-cannot-find-one-or-more-components?forum=sqlexpress
This is probably specific to people working with Isolated Shell applications based on VS 2015, but I found that two registry values were sometimes getting set with incorrect values, leading to this error on startup. Simply delete them from the registry and start again:
HKCU\Software\Company\TheApp\1.0_Config\Initialization\PkgDefSearchPath
HKCU\Software\Company\TheApp\1.0_Config\Initialization\RelativeRootFolderPath
For Visual Studio 2015, replace Company\TheApp\1.0_Config with Microsoft\VisualStudio\14.0_Config.
Go to regedit.
Renaming HKEY_CURRENT_USER\Software\Microsoft\VisualStudio fixed problem for me.
No need to reinstall just reset devenv data…
cd c:\program files\microsoft visual studio 15.0\common7\ide
devenv.exe /resetuserdata
Run VS2013/12 with administrator rights.
It will work fine.
Visual Studio Enterprise 2017 Version 15.8.6
Run cmd as administrator, then:
cd C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE
devenv /resetuserdata
For users experiencing this issue who has tried all the above answers, this is what worked for me for Visual Studio 2015:
After uninstalling/reinstalling Visual Studio 2015, if you're still experencing the "Cannot find one or more components" error, open up Add or Remove Programs from the Windows search bar.
Uninstall any redistributables from 2015 and 2017 if applicable.
If you happen to have the offline install folder for Visual Studio 2015 - navigate to the "packages/vcRedistD14" folder and install both the 32 bit and 64 bit redistributable packages. Otherwise, download them from the MS website.
Attempt to open Visual Studio 2015, it should be working normally now.
I haven't attempted to reinstall the 2017 redist packages, but for the purposes of getting 2015 working again, this is what worked for me. Another option if you already have them installed, is to simply Repair the redist packages.
Running cd C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE
devenv /resetuserdata using the command prompt works fine.
The only thing which everyone has missed is that you will have to reboot your PC after running the above command. I was having same error after running the command several times but was fixed after I rebooted my machine.
And of course for VS 2015 replace Microsoft Visual Studio 12.0 with Microsoft Visual Studio 14.0
restart you laptop it will be fixed.it work for me
well, it seems simple but it work like magic
input visual studio in your windows search bar then
right click on the visual studio app and
choose run as administrator
all things been equal, it should run without an itch

Unable to start debugging because the object invoked has disconnected from its clients

I'm running Visual Studio 2012 (version 11.0.61030.00 update 4). When debugging a local console application I get the following error when I start debugging (F5):
---------------------------
Microsoft Visual Studio
---------------------------
Error while trying to run project: Unable to start debugging.
The object invoked has disconnected from its clients.
---------------------------
OK
---------------------------
This only happens if I leave visual studio alone without debugging for a couple minutes. If I close visual studio and re-open the error goes away (until I leave it untouched for another couple of minutes). Has anyone experienced this? I can't find any threads of other people experiencing it.
This may be a possible answer for the problem.
Some from the answer:
Check which files were changed (why and how) after update from a source control engine
Review the list of extensions and plugins. Try to disable all or some of them
Close Visual Studio and kill all the development processes: devenv, mspdbsrv, vcpkgsrv, msbuild, msvsmon, vshub, vstest etc
Remove .suo, .ncb, .VC.db, .VC.VC.opendb files of the solution as well as .vs directory, which sometimes cause problems
Remove project setting files, sort of YourProjectName.vcproj.DOMAINNAME.LOGINNAME.user or YourProjectName.csproj.user. The setting file name depends on a project kind you use
Run "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" /setup or "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" /setup for x64 environment
Just Close the VIsual Studio and start again the project.Its work Perfectly for me.
Thanks
While restarting Visual Studio does provide a workaround, it doesn't solve the actual problem. In my case, I was working with a C# solution in VS2017 and the following resolved the issue:
Close Visual Studio
Delete the .vs folder that was created in the Solution's directory
Re-open the Solution
I corrupted my App.config file with NLog settings without section Handler in the top of the document. Gist is check out your config file settings either corrupted in format or not properly handled any section. once I remove corrupted config section, it did not raise the error again (VS 2017)
Hope it helps!
In my case I have just reinstalled Windows 10 and so the Visual Studio 2022..
My project was targeting .net 5 SDK, but I only had .net 6 SDK installed. The solution was to install earlier version of the SDK.

set property 'system.windows.resourcedictionary.deferrablecontent' threw an exception

I'm running Visual Studio 2012, when I add a new File/Reference to a project the message box appears showing the error message
set property 'system.windows.resourcedictionary.deferrablecontent' threw an exception
I read an MSDN article suggesting to run the command devenv /resetuserdata on visual studio command prompt to resolve this problem, tried it but didn't work for me. In fact the command prompt shows the Unknown Error message.
Some addins cause this issue for me so have had to workaround it whenever it occurs:
In Vis studio -
Tools > Options > Environment > Add-in Security, uncheck 'Allow Add-in components to load', OK
Restart vis studio
The error shouldn't occur anymore, so go back to
Tools > Options > Environment > Add-in Security and re-check Allow Add-in components to load, OK
To be specific, I get this error when trying to add files to projects and manage Nuget Packages.
Update
I now make a point of opening
'Tools > Nuget package manager > Manage nuget packages for solution'
whenever I open up a new instance of Vis studio, before loading a solution, just to make sure the window loads properly
That way I know I won't get this issue.
In my case it was a style with the same key defined twice in a ResourceDictionary (WPF)
I have Windows azure tools for Microsoft VisulStudio 2013- v2.2 and Windows azure tools for Microsoft lightswitch VisulStudio 2013- v2.2.
I uninstall only Windows azure tools for microsoft lightswitch vs 2013 .
It's working fine...
I fixed it. The resolution was to remove the Windows Azure Tools for Visual Studio 2012 which I was not actually using, and the error went straight away.
In my case it was to first launch Visual Studio in safe mode. You can create a shortcut for visual studio with a target like this:
'"F:\Program Files\Visual Studio\VS2013\Common7\IDE\devenv.exe" -safemode'
Once launched in safe mode, you can remove the problematic extension via the Addin Manager. However, this wont work for some extensions, as the uninstall option might be disabled for certain extensions when running in safe mode, particularly if you have already uninstalled another extension in the same session.
In My case the problem was caused by Paradox Game engine, in which I had uninstalled it via 'Programs and Features' - which in return did not remove the extension which was originally installed via Nuget package. Uninstalling Paradox via "Programs And Features" left the extension itself still registered in Visual Studio, presumably causing a hidden NullReferenceException.
This issue can be caused by any extension that may have an error in it, or by extensions that were not properly uninstalled.
Also, see this article...
The mentioned issue can be resolved by simply restart the Visual Studio. :P
Also seem to be able to get around this by closing the project and vis studio instance, re-opening, then when the start page/open project screen appears selecting Tools > Extensions and Updates..., then pressing Close
Now open the project and the error doesn't get thrown when trying add files or manage nuget packages, weird.
Just annoying you have to remember to open Extensions and Updates each time...
Other wise make sure given Resourcedictionary.xaml path is correct or not
I had to remove Xamarin from Add/Remove Programs in Control panel and restart Visual studio to fix this.
I had this problem with My Devexpress Project in VS 2015
What finally worked for me was.
Close my solution,
Close Visual Studio,
Open Visual Studio,
Create a New dummy project,
Add a form to it,
Close and save the new project,
Reopen original project and all was ok.
for everyone else who are working in silverlight sdk environment with windows phone8 sdk.
The versions of sliverlight which are compatible with visual studio versions -
vs2012- sliverlight sdk 4
vs2013- silverlight sdk 5
I was integrating in vs2013 and as soon as I updated it with silverlight sdk 5, The errors went away.
In my case it was the Line Endings: you can have different formatting and by copy pasting some code one file got a different Line Ending. It was enough to File > Save As and then click the little arrow next to the save button.
Then click on save with encoding and choose the one you are using in all other files.
See Andrew Truckle's answer.
I hope this helps

Resources