I'm currently using VS Community 2013 but I've seen this behaviour in previous versions of VS.
Scenario: I have previously saved and closed a solution whilst it has several tabs open. I then re-open the solution. The open tabs reload, but (as far as I can tell randomly) one or more of the aspx files that were open when I last saved and closed the solution, are recreated as a blank file with the extension aspx:1 or aspx:2.
Closing the blank file & reopening that file from the Solution Explorer restores the correct version of the file. No work is lost, so I admit this is an irritation rather than a crisis.
What's going on, and more importantly any idea how I can make it stop? I have got the Preview Tab functionality (Options >> Environment >> Tabs and Windows) turned off. Thanks
http://ambracode.com/index/show/161001
it says there:
"It's the naming convention for Visual Studio when the window is cloned. Sometimes, however, Visual Studio just gets confused and names it that way."
Related
While I'm debugging a page with a break point in our ASP.NET web site in Visual Studio 2015, an extra tab is opened for the same file once the break point is reached:
After I stop debugging, the tab remains open and has focus... at which point I begin to make changes to fix something, etc. However, this tab stops showing Intellisense, nags with a dialog about unsaved changes inside this editor and has been changed externally, etc.
After some checking, it turns out the extra tab that gets opened during debugging (blue tab) is the local file from my local version of the website, while the original tab (brown tab) is my file from my local TFS development directory.
This extra tab is fairly annoying to my workflow and I'd rather it didn't show up, or at least that it disappeared after debugging so that I could continue programming happily. However, despite my best Google-Fu and looking through the options in Visual Studio, I cannot find a way to either disable this feature or hide this tab after debugging... maybe there isn't a way.
Anyone have the same issue and know a solution? A grateful programmer would thank you if you do. :) Thanks.
I am using VS2010 on Windows XP pro (sp3, x86), and I just installed the hotfix kb2106584. This fix was reported by some people, example here, as having a fix for an issue I had with Asp.Net Development Server not getting opened properly from VS, which I was having previously. My issue was being caused by ESET NOD32 messing with the http traffic from devenv.exe and causing all the ports in my computer to get used up, however.
Anyway, as soon as that was finished, I opened my website back up, and clicked debug. Asp.Net Dev server pops up, which was what the hotfix was supposed to make happen, and then notepad++ opens with the tabs I had last time I used it, and IE never shows up. "Wait, what?" try it again. and again. Always notepad++, never IE, always with no new documents opened, just some completely unrelated stuff.
I've seen one other post on SO about this happening, here, but his issue was corrupted files/filesystem. My project is in source control, so I tried a delete&revert to yesterday's revision. Still opens notepad++, so that's not my issue.
I've also tried rebuilding, which did nothing, and deleting my local Solution files, which also did nothing. I restarted the program and then the computer, both to no avail.
I start to believe that this is the hotfix screwing things up, so I try to do a system restore to a couple days ago. Once again, no dice; it's still pulling up notepad++ instead of IE.
So, the questions become:
Is there a setting or two I can try changing to make it open the proper program again?
Or was this a bad/improper hotfix, and if so, how do I uninstall it? It doesn't show up in the Add/Remove Programs dialog, and I don't see an option to uninstall it in VS, or in the installer.
Thanks in advance.
[edit] Also note: Notepad++ is not actually opening the website file, it's just getting opened with whatever I left in it last time. I dunno if this helps at all, but I felt like details would be appreciated. [/edit]
Fixed:
Uninstalling n++, deleting EVERY registry entry & folder containing 'notepad++' (except one, from whose string I removed ";notepad++.exe"), then reinstalling n++ made VS stop opening notepad++.
Now it opens the default web-browser again.
[edit]
Note for anyone else out there who ends up with this specific and bizarre problem:
It would be worth a shot to try changing the "Browse With..." setting in VS, by r-clicking on Default.aspx to "Internet Explorer". My list included Notepad++ as an available internet browser.
This might be a better solution than the previous, if it does in fact work.
I didn't know this setting would allow Notepad++ as an option until I had to set it back to IE again after all this, and that may have been the problem all along. Apparently, VS just changes this setting sometimes. How or why N++ got put in as an internet browser is completely beyond me, but I did myself the favor of 'Remove'ing NotePad++ from the list, and you may wish to do the same.
Again, I'll never truly know whether or not I nuked everything when I could have changed a single setting that got mysteriously reset, but may this [lesson?] at least be recorded for posterity.
[/edit]
It took all of that to figure out that it [was?] a bogus registry entry somewhere that [may have been?] modified by the hotfix; a registry entry that neither notepad++ nor visual studio 2010 ultimate would clean up on uninstall or replace on reinstall
Which was it? I have no idea. Like I said, I didn't even use n++ this week until VS started opening it for me, and the only change I made was to install that hotfix.
I was working on webpage (Chat.aspx) accidently my system got shutdown. Now my visual studio opening webpage in notepad which is empty(showing nothing).
I also tried it to open with in Html editor, it also showing that file cannot be opened in selected editor please choose another editor.
How can i recover my work/code?
Once I faced the same issue , I researched a lot on internet but in the end I ended up with writing the page again. Basically File pointer in Memory becomes invalid or corrupted due to which OS can not open the file in VS. here is a link for you
When I faced this problem one of the expert suggested me that it is not possible to get back your page .
If you have backup of your page then use that.
I recently faced this issue working in VS 2010 and I was breaking my brain. Luckily I had source control, so to solve the issue I manually deleted it the file and got latest version.
In Visual Studio 2010 SP1, automatic outlining is not enabled for ASPX files when I open them. For each file opened, I need to click Edit / Outlining / Start automatic outlining, which is extremely annoying. This step is not necessary when code-only (non-ASPX) files are opened.
I use a few extensions, all of them from MS, including Power Tools, the JavaScript tools, etc., and I thought that maybe they were causing the problem, so I disabled all of them and restarted VS, but the problem still exists.
I did not have this problem with VS2010 (no SP) on Win XP Pro, which I used for about 18 months, but I recently did a clean install of Win 7 x64, VS2010, and VS2010 SP1, and now I have this issue.
Any ideas?
This worked for me:
In the registry, look here:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\HTML Editor
for a value named OutlineHTMLOnFileOpen. Mine was set to 0, change it to 1. Make sure you do this while VS is closed, as it saves this value out on exit and will change it back.
I had this issue and it was driving me crazy all week!!
Finally managed to fix it really easy:
Make sure the registry value for OutlineHTMLOnFileOpen is set to: -1
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\HTML Editor
OutlineHTMLOnFileOpen = -1
Open VS then open an aspx file.
Press CTRL M then M again while keeping the CTRL key depressed.
Press Ctrl+ M M
Wait a few moments and the automatic outlining engine will start.
Restart VS and it should auto kick in again when you open a file.
I had the same problem and went through and disabled my extensions. Once I disabled the Javascript Addins from Microsoft (That give the outlining and brace matching), I found I was able to change the registry setting and it didn't set change back. I'm going to reinstal the addin to see if it was the actual cause.
I posted the same question at the MS forums, and was told to do the following, which I have not yet had time to try, but I thought I would add it here for now:
Please try to create two new project (one is the same type project as
your previous project, one is another type project.) see whether this
issue still exists.
If this issue still exists, you can try the following solutions:
If we reboot the operating system to safe mode, do we have the
problem? This can help to isolate whether any other applications are
interfering with Visual Studio. Note that some features (like IIS) are
not available under safe mode. Please check whether this can apply or
not. In addition to safe mode, we can also suggest “clean boot”:
http://support.microsoft.com/kb/310353 .
If we create a new user account, do we have the problem? This can
help to isolate user profile corruption related causes.
If we use “devenv.exe /resetsettings”, does it solve the problem?
It restores Visual Studio default settings.
If the problem remains, we can use Visual Studio Setup Wizard (via
Control Panel) to repair Visual Studio. It can restore the Visual
Studio Installation into its original state.
The forum thread is here.
I will provide my results if I make progress.
Using Ctrl + M should toggle this if you're focused on the file having trouble. I had the same problem until I realized had been accidentally using the hot keys to turn this on and off.
Does any else have a problem where when using VS2005 or VS2008, it suddenly 'forgets' to color code and format the text for you? All of a sudden it acts like its a plain old notepad editor. Sometimes if I save and re-open the file, or else re-start Visual studio altogether, it suddenly 'remembers'. I thought maybe this was because of a bad install on my machine, but recently upgraded to a new one, brand new fresh install with all service packs - and we are right back to the erratic behaviour....
Is this a known problem? Is there a workaround (i.e. a key combo I can hit to tell it to do its thing?)
PS: This happens for me when doing asp.net with VB code - not sure if it affects other flavors of the tool...
EDIT: This is a clean install of VS2008 on Vista, but also have had it on XP. No addins on either setup, problem happens routinely.
Sometimes something similar to this happens to me in VB.Net. In my case it has alway been the backgroundcompiler service that has stopped working for one reason or another. Haven't found anything that helps besides restarting visual studio.
I got this often when working on large web projects (> 1K pages and 4K total files) and most often on ashx files.
At the same time, I would lose intellisense, This was happening because the files I was adding were not getting marked as "Compile" in the file properties -> build option.
I never found the cause (assumed it was overburdening the solution) but I found that it would stay fixed for longer if I deleted the SUO file periodically (it was getting into the 1MB range).
Since coming to a new company, new PC, etc, I have not had this problem but then again I'm not working on as large of a web project.
I use C# in VS2008, and haven't had any problems. Maybe this is VB.NET related?
I used to see the problem with "Web Sites". I have since changed most of my projects to "Web Applications" and haven't seen the issue in a while.
I had a similar issue with VS 2003. I use VS 2008 right now and this doesn't happen anymore.