VS2010 will not display project properties ("underlying RCW")? - visual-studio-2010

Only sometimes (I haven't yet noticed a pattern), VS2010 shows the following error (where I'd expect the body of the property page to be) when I right-click on a project (various types of projects) and select "Properties":
I can typically view the project pages after restarting VS2010. I'm using the RTM version.
What can cause this error?

LepardUK. I had the same issue and finally found out what had gone wrong. It's misbehaving addin - TestDriven.NET. But things could be different for you. But anyway, it's addins. The process to find this is that you Goto "Tools -> Options" dialog. Goto "Environment -> Add-ins/Macros Security" node. Uncheck "Allow add-in components to load". And then restart VS 2010 to see if the issue goes away. If it does, then it must be an addin in those folders specified. And next step is to enable addins to load, and remove the directories in the list one by one to identity which addin caused the issue. And at last, disable or simply remove/uninstall it.

I had the same problem with Productivity Power Tools extension or StyleCop, don't remember which one. Update fixed it.

Related

Visual Studio 2013: auto-refresh solution explorer in "show all files" mode

Is there any way or some unobvious workaround to make the Solution Explorer refresh automatically (in Show All Files mode) when there are changes to the project directory tree? Currently if I rebuild a project with different output settings (which would add some files and remove some others), no changes would get reflected in Solution Explorer until I manually click refresh button. Doesn't seem too convenient for a tool aimed at programming, i.e. automating repetitive tasks...
Update
A picture is worth a thousand words:
My relevant options # Tools > Options > Environment > Documents:
Let's assume that Release directory is empty and Show All Files mode enabled
Now, I build my Release config... Build succeeds, but no changes are visible in Solution Explorer:
Only after I hit refresh button manually can I see the results of build process:
So I'm basically asking if there are ways to make Solution Explorer update automatically when changes occur, not to make externally modified files auto-reload in VS editors.
#Sunny Moon - There is no option right now to automatically refresh the project tree if changes are introduced. You have to manually select the Refresh button in the command bar of Solution Explorer. I'm going to track this feedback along with other areas I've been collecting for Solution Explorer so thanks for sharing your frustration here.
Thanks!
Cathy
Visual Studio IDE Team
Just set check the “Auto-load changes, if saved” check box on VS2013 Option menu >> Environment menu.
That was impossible in VS 2013 and 2015, but with 2017 Microsoft did the right thing and revamped the Solution Explorer a bit - now there is clear and logical separation between solution (virtual) and folder (physical) views, and changes to the filesystem are now tracked and displayed automatically.

Is there a way to automatically collapse the Script Documents section in solution explorer?

While in debug mode, the solution explorer has a Script Documents section. It is expanded by default. As the debugger runs, new ScriptDocumentxxx poll.txt files are added to this section. As I am navigating the explorer files, the adding of these new line items causes the entire contents of the explorer to shift downward. This is quite annoying if I am trying to find a file or trying to click something. I can collapse the section manually, but I'd rather not have to do this all of the time.
Right click the projects you are interested in working on and click on 'Scope to this'. This will hide everything (Including the scripts folder) except those projects you selected.
I got annoyed enough with this that I turned off JavaScript debugging. If you are willing to go that far, the scripts are gone.
The path for turn of JS debugging is:
Tools -> Options -> Debugging -> General -> Enable JavaScript debugging for ASP.NET (Chrome, Edge and IE) (Visual Studio 2017 and 2019)
Note: This method does not prevent you from stepping though JS in the Chrome inspection tools so you do not lose that ability. You lose both the scripts (of course) and that new Chrome window that pops up when you launch the debugger.
Yes, there is.
IIS Express > Script Debugging > Disabled
Right click then 'Scope to This' to hide everything but the project in the solution you want to view.
Click on the Home/House icon to reverse it.
Yes there is. One way is to create a visual studio add-in or extension which monitors the solution explorer tree and collapses the "script documents" -item if it is expanded.
If you need code samples and/or a fully functional add-in just let me know. You have Visual Studio 2013, ay? Is it the express edition or what?
This is confirmed bug in VS 2019. Just Microsoft is not so fast about fixing it.
https://developercommunity.visualstudio.com/content/idea/351537/provide-a-way-to-prevent-the-script-documents-fold.html

Code Window does not highlight selected (usually .cs) file in "Solution Explorer"

My Visual Studio has done something really weird.
Usually, when you are in the "edit window" and are changing code, the file you are editing will highlight in "Solution Explorer".
Also, if all projects are "collapsed" in "Solution Explorer", and then there is a file already open (as in, you can see its "tab"), when you click the tab of that file (to be able to edit it), the Solution-Explorer will un-collaspse that project and highlight the file you are editing.
My "Solution-Explorer-Highlight-The-Current-File" function has stopped working.
I can move from tab to tab to tab, and Solution-Explorer doesn't react at all.
I've googled and binged, and I either get 5 billions hits ... or none. The key phrases are too ambiguous I think.
Anybody ever seen this one?
I have VS2010 on the same machine, and it works just fine.
I have one Add-In installed, but it is installed in both VS2010 and VS2012. Thus I don't think it's the culprit.
Smaller hammer.
From the menu: Tools -> Options
From the tree: Projects and Solutions -> General
On the form check: Track Active Item in Solution Explorer
Well.
From here:
How do I truly reset every setting in Visual Studio 2012?
I found this "Big Hammer" command line switch.
/ResetUserData
I used it.
And now it works.
I hate to answer something myself, but just in case somebody hits this in the future.

"Add Existing Item" feature disabled - how to enable / why does it happen?

I didn't use MSVS since v2008 (but I never was good at it). The version I'm talking about is 2012. I work mostly in Emacs, but for the team I must create MSVS projects and maintain them in a workable state. Now once I create a file, MSVS would not let me add it to the solution (click on "Project" in "Solution Explorer" -> context menu -> select "Add" -> "Add Existing Item" is grayed out.)
This used to work two days ago. Since then I've installed a plugin through NuGet that allows adding custom mime-types to IIS used in MSVS for ASP.NET projects. That was all the changes I've made.
How do I troubleshoot this? Why can this possibly happen? What could possibly be the reason for disabling this functionality?
EDIT
Sorry, it looks like it isn't possible to do it while "debugging" the project - somehow I must have fatfingered a debug session w/o noticing it. When I restarted the Studio, it prompted me about the open debugging session. After restarting the Studio the functionality was back. Still, it's strange you can't add files during debugging... or maybe I'm missing something.
I had the same problem today. The solution is to leave the debug mode in visual studio. Then the before grayed out menu point "Add New Item" project is available.
btw: you leave the debug mode in visual studio (2013) with Shift+F5 or click the red square in the gui.
Add Existing option is disable when you are in debug mode please stop debugging then try to add existing item.

Visual Studio Editor does not underline errors anymore

My Visual Studio (2008) Editor has stopped to underline Errors (this nifty wavy red lines). I can't really tell when, but it can be related to the installation of .Net Framework 3.5 SP 1 or the MVC Beta (which I guess is unlikely). Furthermore have I installed and uninstalled both CodeRush and Resharper for evaluation purposes (decided not to keep either one of them).
Does anyone know the problem and how to restore this functionality again?
Have you checked Tools→Options...→Text Editor→C#→Advanced→Underline errors in the editor?
I usually like to reset my settings after messing around with plugins, as they tend to mess with settings: Tools→Import and Export Settings...→Reset all settings.
About possible causes.
For VS 2012 and 2013 if you have more than one instance of Visual Studio on different machines binded to one "live" account and have installed ReSharper on one of them, it disables the native IntelliSense and error underlines (to replace by it's own rules) that will be synchronised through your account to another machine without ReSharper.
Found it in Visual Studio 2019 as: Tools > Options > Text Editor > General > Show error squiggles
This is generally called Disable Squiggly or Wavy lines in Visual Studio.
How you will do in Visual studio 2013?
TOOLS -> Options... -> Text Editor -> C/C++ -> Advanced -> Disable Squiggles: True/False (Under IntelliSense) -> Press OK
I know its an old question, and with various solutions, but I have fixed it in different way. I'm working with Unity3D on my C# code using VS2017, when suddenly VS decides to stop underlining error while im typing. However, if I close the file tab and reopen, it suddenly undelines the error.
For example:
class A {
public int x;
s;
}
should obvsiouly give an error for that lonely 's' symbol. But, VS doesn't underline it until I close and reopen this file tab.
Solution:
Copied the entire Unity Project folder (which is like a regular VS Solution folder basically) and worked with the new folder, which issue was gone there.
For visual studio 2017 act according to HeeJae's comments in:
https://developercommunity.visualstudio.com/content/problem/113112/design-time-error-checking-isnt-working.html
i.e:
Hi. you are probably hitting a known issue. can you try this?
1.Update to latest release If that doesn’t solve it
2.Go to Tools\Options\Projects and Solutions\General and uncheck “Allow parallel project initialization”.
3.Close VS.
4.Delete the “.vs” directory beside their solution file.
5.Reopen VS.
..
thank you
You can re-enable the "Allow parallel project initialization" option after the issue was solved.
I tried to upgrade VS, reset VS settings, clear VS cache and everything people do conventionally but none of them solved this issue! At the end the mentioned solution worked for me magically.
Good luck
Unloading and loading same project again from the solution does the trick. Just right click on the project and click "Unload Project". Once unloaded, again right click the same project and click "Reload Project". Error highlighting will return.
I had the same issue with 2017. There was a 'disable intelisense' option, make sure that is set to false.
For everyone wondering in 2021..
search for "C_Cpp.errorSquiggles" in the settings.
Make sure to have it active for the user, as well as the workspace.
No need to restart Visual Studio.
For me (VS 2019) , after trying the other answers also, setting the scope of analysis from "Current document" to Open document" brought back the missing error markers
Just go to settings and search for errors and Image in Error Squiggles. You can see the Error squiggles (Modified: Workspace - Right now you can't see it because I modified it). Just click on modified and you will see the disabled option. If by mistake you disabled it, just enable it and you can see the red line errors again in your code.
In latest edition, check for .vscode folder in same project folder. There will be a setting.json file in that. Delete the key value pair of "C_Cpp.errorSquiggles": "Disabled". Restart the vs code.

Resources