Our previous development systems used Windows XP and Windows 7. Debugging C++ DLLs from Visual Studio worked great.
A recent move to Windows 10 has resulted in an annoying problem. We can debug once (using F5), but the 2nd time results in a linker error:
MyProg fatal error LNK1201: error writing to program database 'MyProg.pdb'
Trying to delete the .pdb manually in Explorer while Visual Studio is still open results in the error:
The action can't be completed because the file is open in devenv.exe
It doesn't matter whether you hit a breakpoint or not. Just start debugging once results in the problem. Re-starting Visual Studio resolves the issue (in the sense that you can debug once, but then you get the problem again).
If relevant:
x86 Visual Studio 2003.NET
targeting another x86 application
x64 Windows 10 Pro v1803
After hunting around for several hours some related, but unanswered, questions were found. Following suggestions in this MSDN article, along with some debugging of my own, this solution works:
Download FreePDB, a script written by MSDN user Toni76 (thanks Toni!)
Copy this script to a local folder (say C:\Apps\FreeDPB)
Download the latest version of SysInternals tool Handle (currently v4.21)
Copy handle.exe to C:\Apps\FreeDPB
NB! From the command line, run handle /? once. This is to agree the EULA. The script will not work if you skip this step!
Open Visual Studio, then Project > Properties > Build Events > Pre-Build Event
Set Command Line to C:\Apps\FreeDPB\freepdb $(ProjectName)
Set Description to Delete lock on PDB
...and now you don't need to restart Visual Studio to debug a 2nd time!
From comments, this works with multiple versions of Visual Studio on multiple versions of Windows.
Update
A more radical solution is described here which involves replacing a core Visual Studio DLL (NatDbgDE.dll). This solution only works for Visual Studio 2003 SP1, though.
In my case it was due to "Process Explorer" program, which was open alongside with my Visual Studio(I used it to check some properties of the exe I've created). After closing it problem solved.
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
My Problem
In Microsoft Visual Web Developer Express 2010, my intellisense suddenly stopped working today for my front end HTML (.aspx) files but is still working fine for code behind (.cs) files.
Along with this, when I hover over any asp control declared in my aspx pages, it says
validation(): Element 'control' is not supported.
validation(): Element 'label' is not supported.
etc...
(side note: 'control' and 'label' are lowercase in the message, instead of the proper case)
My Progress
I have been looking around for answers,
a few people suggested deleting certain files, such as the "*.ncb",
but I have not been able to find any MS files with this extention
anywhere (hidden files are visible).
I have a "Web Site", not a "Project" so within my site there are no
*.sln", *.proj, *.suo" files to delete either.
One suggestion was to "Clean" my project, but I can't find that
option anywhere.
Another person suggestion running "MS Developer command prompt" and
executing a utility called "devenv" with certain arguments. I do not
have the "MS Developer command prompt", I assume because I am using
the Express Edition. I cannot find the devenv utility in my file
system as well.
I have checked all my master pages but haven't noticed anything
weird.
I looked in the Tools > Options menu but didn't find any "intellisense" type of thing anywhere. My "Show all settings" is turned on.
I tried changing the doc type in the dropdown from XHTML 1.0 Transitional to all the other things just to see, with no luck.
My Plea to fellow .Net-ers
My website builds just fine with no errors, it's just having no intellisense on my aspx pages is driving me nuts.
Is there anything else I can try? Any thoughts appreciated. Thanks!
OK,
DevEnv is the program name for visual studio - it will be here:
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" on a 64 bit OS
or
"C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" on a 32 bit OS.
Right click on the icon you use to run VS and then click properties and it will tell you where this file is in the Target box.
To clean a project, right click the project in the solution explorer and then click Clean.
Visual studio command prompt will be in the start menu under:
Microsoft Visual Studio 2010 > Visual Studio Tools
There may be several version depending if you are running on a 64bit OS, Itanium, etc. You can also just run DevEnv from the Run box or ordinary command prompt.
The 32bit version can be run from the Run Box using the following (if on 64 bit, add " (x86" after "Program Files"):
%comspec% /k ""C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" x86
Personally, after closing down VS and rebooting the machine to check if it was just a process crash causing it (i.e. restart from a fresh OS and VS load) - I would reset option (see here /ResetSettings (devenv.exe)).
Good luck, and please reply back mif this worked or did not so to give the thread a conclusion. :D
I have Visual Studio 2008 and 2010 installed side by side, but trying to open either a 2008 or 2010 sln file results in nothing. The hour glass comes on for about a second and then it goes away and nothing is opened.
I read somewhere to relate sln file to VS directly, but I can't go that route because I don't want 2008 solutions to open with 2010. Does anyone know what the problem might be and how to fix it?
If you are running Vista or Windows 7 with the UAC enabled and have "Run this program as an Administrator" checked on the Compatibility tab for the Visual Studio exe (devenv.exe), you will get this behavior when you try to open a sln file directly from Windows Explorer.
One solution is to go to "%ProgramFiles%\Common Files\Microsoft Shared\MSEnv" or ("%ProgramFiles(x86)%\Common Files\Microsoft Shared\MSEnv" for 64-bit systems) and right-click VSLauncher.exe and select Properties. On the Compatibility tab, check "Run this program as an Administrator". Now when you try to open a sln file directly from Windows Explorer, you will get the elevation prompt and it will open the correct version of Visual Studio for the file.
Apparently, the "run as administrator" hack does not work anymore in Visual Studio 2010 SP1. Fabian describes a workaround here:
Getting Visual Studio 2010 SP1 to run elevated when launching .sln files
To sum it up:
Backup VSLauncher.exe
From within a Visual Studio 2010 Tools prompt, extract the manifest from VSLauncher.exe:
mt -inputresource:"VSLauncher.exe" -out:VSLauncher.exe.manifest
Alter the VSLauncher.exe.manifest file:
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false">
</requestedExecutionLevel>
</requestedPrivileges>
Write back the manifest into VSLauncher.exe:
mt -outputresource:VSLauncher.exe -manifest VSLauncher.exe.manifest
The really annoying thing about this problem is that you have to run Visual Studio as administrator under windows 7 to attach to an IIS instance. The least they could do was not break the .sln files when you do that!
The post by Jorge Poveda is correct though, the original hack no longer works but his does. It's maybe worth mentioning that you have to run everything as administrator for it to work (the command prompt and text editor).
I think there is a better way though as we have Win 7 at work which runs as administrator and didn't have this issue. The key difference is that with this fix, the admin prompt asks you to open VSLauncher.exe, but on my work machine, it asks to open devenv.exe so VSLauncher must be OK to open VS2010 somehow. I'll ask our infrastructure guys how they did it and post back.
I have two versions of Visual Studio 2005/208 installed in my system (windows7), when I am opening Visual Studio with "devenv" command from "Run" window then its opening Visual Studio 2005 but I want when I open it using "devenv" command so Visual Studio 2008 should open by default.
How can I do this in windows.
Thanks
Note: I am not sure this question is for Stackoverflow or for Superuser so just asked it here, if this has any problem then (any moderator) please move it to superuser.
You can follow these steps to open VS2008 from the command prompt using "devenv":
Open the Registry Editor by typing regedit on Run
Locate and open the following key:
My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\devenv.exe
Currently for VS 2005, devenv.exe is mapped to
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe
If you want open VS 2008 from the command prompt, you must change the map to
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe
Just change to 8 to 9.0 to switch from VS 2005 to VS 2008, or VS 2008 to VS 2005.
The problem is that both executables are called "devenv.exe".
What will be happening is that while both the 2005 folder and 2008 folder are on your Windows search path, the 2005 folder occurs first. This means that the 2005 version is found first and gets executed.
Possible solutions:
Rename the 2005 copy to be "devenv2005.exe" (for example). However, you will need to update any shortcuts that point to it to use the new name.
Edit your PATH environment variable to swap the order of the 2005 and 2008 directories.
The second is the least work - depending on how confident you are about editing environment variables.
This is what i have:
REM devenv8.bat
#echo off
"%VS80COMNTOOLS%..\IDE\devenv.exe"
REM devenv9.bat
#echo off
"%VS90COMNTOOLS%..\IDE\devenv.com"
It flashes command prompt momentarily, but I haven't worked out how to get rid of that. Will be interested to know how to have it not do that.
Make two batch files (devenv-2005.bat and devenv-2008.bat) and use them instead of devenv. Make sure to set up the environment appropriately for each one and then launch devenv.exe using the START command with a full path name from within the batch. There are utility batch files shipped with Visual Studio that will set up the environment (e.g., INCLUDE, LIB, PATH, etc.) for you. In VS2005, it was named vsvars32.bat. I would imagine that it is named similarly in VS2008.
The other option is to find the environment script (vsvars32.bat) for VS2008 and modify your user environment to match. I would remove references to VS2005 from the environment altogether just to be safe.
My suggestion is to run Launchy, but I also +1ed the batch file approach. I should add, once with that approach I hotkey launchy, win-space for me, and type either '5' or '8' for vs05 or vs08.