How to disable Quick Actions in Visual Studio? - c#

I've googled extensively for this answer and it looks like being impossible. I've found a lot of people complaining and asking MS to make them optional since VS 2015, with no result. Like them, I think it's impossible to concentrate on your code with lightbulbs and screwdrivers flashing every time you move to another line. But I have a short story to tell.
I have been using VS 2015 for years, both at home and at work, and I have never seen those Quick Actions in my VS installations!
I remember to have tried VS 2017, and given up precisely because of those Quick Actions, which were absolutely new for me. Now I've taken a look at VS 2019, and they are still playing around.
Well, it seems I've found out what's different in my installations. When I right-click my C# code and click on Quick Actions I get this message:
.
The two computers have a quite different hardware, and in both I have made absolutely standard installations. I have never missed the Quick Actions, but although I have developed some quite complex applications, they were only for my own use. I've never published anything or tried to run them on other computers.
I really think I would like to also break Microsoft CodeAnalysis in VS 2019, so I could use the new features of C#.

You can disable CodeAnalysis for a project in the project properties> tab Code Analysis. For more details check this doc https://learn.microsoft.com/en-us/visualstudio/code-quality/disable-code-analysis?view=vs-2019.
As for the intelliSense, you can disable it by going to the tools menu > textEditor > C# > IntelliSense and uncheck the checkboxes.

Related

VS2015 unmanaged debugging

The shop where I work is currently using VB6 for development using controls and libraries. Someone once showed me how to use Visual Studio to be able to debug this code by simply creating a console application in C# and then changing a few options. He showed me this in VS2010, but I am now using 2015. When I go into the project properties and go to the Debug tab, the option for "Enable unmanaged debugging" is not there. Did Microsoft remove this option? I have searched the web quite a bit, but have had no luck finding a solution.
Also, for kicks, I also have 2010 installed on my machine. The option is available there, however when I attempt to run and debug I get a LoaderLock failure. After researching it I found that I have to disable the exception in Visual Studio. However, it would appear that my exceptions are locked down and I cannot change them as they are all greyed out. I am an administrator on the machine I am using, but I am unsure of where or what I need to change to enable me to change the exception settings.
Any recommendations on either issue would be greatly appreciated. It's not a show stopper for me, but a HUGE inconvenience.

New / Custom Visual Studio 2013 Language Service -Very Basic

I am not looking to do anything fancy just create a bucket for our internal company Visual Studio projects etc.
I have been through the following resources and it seems the codeplex projects have the same behavior as my tutorial walk throughs which tells me I don't understand / know what to look for / learn exactly.
Said behavior is that when my code or the codeplex code compiles and runs with no issues but I don't see the new language show up??? By show up I am expecting to see it in the New Project dialog under templates.
I started here:
http://msdn.microsoft.com/en-us/library/bb165744.aspx
and though not the best tutorial I feel I got everything correct. It compiles and runs but my new "Language" doesn't show.
So I did some more searching perhaps another tutorial might fill in some gaps I missed and I watched this video for an hour.
http://channel9.msdn.com/Blogs/VSIPMarketing/VSX212-Adding-a-Language-Service-into-Visual-Studio-2010
It's for 2010 but felt 2013 and 2010 close enough that it might help....and while I did learn quite a bit it didn't give me what I was expecting.
Another Google result was this SO post (How to create a new language for use in Visual Studio) from which I downloaded OOK from codeplex. Updated references, upgraded from 2010 to 2013 etc.
It compiles and runs but again my language is not "showing"....which is the behavior I had in my tutorial guided solution.
So what am I doing wrong??
All I really want is a language bucket where we can put our internal snippets, customized project templates etc. The c# editor, intellisense, syntax highlighting, etc. are just fine so don't need to extend those at this point.
If someone could please point me in the right direction I would be grateful.
Thank You

"Unable to step. Process is not synchronized" error in VS2010 after upgrading .NET Framework

I had Visual Studio 2010 installed on my Windows 7 desktop, that I was using primarily to debug ASP.NET solutions. Everything was working great, until one of the Windows updates installed a new version of the .NET Framework. Now I get the following message when I try to place a breakpoint and then do a "debugger step" in my C# code:
To make matters worse, it doesn't happen all the time. I tried to find any pattern, but the best way I can describe it is sporadic.
Any idea how to fix this?
I just got this in Visual Studio 2015. I was debugging on a separate thread, hit the breakpoint but could not continue. A reboot did not fix it.
I deleted all of my breakpoints, reset the two that I actually wanted and it works!
Can I suggest you try using the resharper test runner. I have also been hitting this error a lot in VS2017 15.5.2 I have found its something to do with the VS test system.
Even though this solution is a product recommendation (I don't work there) it solved my issue and I was able to get things debugged.

Extending visual studio

I want to write an AddIn for visual studio (2010). My goal is to add a menuitem to the context menu of all .cs files in the solution explorer. Or maybe just to context menu of the code window, although I prefer the first thing. I've been browsing around on the Visual Studio Extensibility website but I must admit that I'm having a hard time finding a tutorial on how to achieve what I want to. I guess that I don't really understand the VS extensibility model to be honest.
So I thought that some of the smart people here must have tried it before, and I'm hoping to save some time by asking here instead of fumbling in the dark.
Thanks in advance for any help.
I have a blog post on something pretty similar at http://www.runeibsen.dk/?p=237. Unfortunately, it is for VS2008 and AFAIK VS2010 is all WPF based now, in which case you may not be able to use it.
Checkout the codeproject Article-- LineCounterAddin, its a good one. Explaining the VS IDE internals needed to code Addins.
And quick googling shows this one Add-In That Converts C# Code To Visual Basic

How can I get Visual Studio to error check my code (show the squiggles) without explicitly compiling?

I use Visual Studio (C# Express 2008) occasionally to work with some vendor supplied C# code. I am looking to make my experience with VS more like my experience with Eclipse. I have become accustomed to the way Eclipse handles underlining errors (in java source). When I make an error in my code in Eclipse, it will be underlined right away, and if I fix it, the underline will disappear almost immediately, or at worst, when I save the file. In Visual Studio however, the underline remains until I next build the project.
Is there a setting somewhere I can change so that VS will build every time I save, or even as I am typing? Is this hard to do with C# because it is more complex in some way than Java? Do I need to find someone to buy me the full (non express) version? Also, what is the squiggly underline feature called? I fear this question may have been asked before but I don't know the magic word to search for.
Jason's answer is fine, but a couple additional points:
is this hard to do with C# because it is more complex in some way than Java?
Yes, but that's not relevant. Yes, it is a hard problem to do on-the-fly analysis of any language in the 100 milliseconds between keystrokes. Doing it for C# is probably harder than Java, being that it supports so many more language features than Java.
But our IDE team is a bunch of buff coders who are awesome, so they can handle doing it for C#.
The real issue was that the compiler architecture of C# was not originally designed to do this sort of analysis in realtime; the VB compiler was. And therefore it took rather longer to fix up the semantic analysis engine of the C# compiler to make this feature feasible.
We're continuing to do research into how to rearchitect the compiler to expose more and more of these on-the-fly analysis services in a rich, extensible and compelling way, but this will take some time. It's a big compiler.
what is the squiggly underline feature called?
On the compiler team we call it "the squiggly red underline feature", or "squiggles" for short.
I don't know if marketing has a name for it or not. If they do, it's probably something like "Microsoft SquiggleSense .NET For The Microsoft Visual Studio Suite System 2008"; they seem to like these long names that have "Microsoft" in them twice.
Do you have Visual C# 2008 Express Edition with SP1? SP1 added exactly this feature to Visual Studio 2008 Professional and Visual C# 2008 Express Edition.
From the release notes:
This service pack adds a new Visual C# IDE feature that provides a richer set of error information about your code. Specifically, this feature presents the expression-level errors that occur in open files to you according to your code. These expression-level errors were previously reported only after a build operation.
From Scott Guthrie's release notes:
The C# code editor now identifies and displays red squiggle errors for many semantic code issues that previously required an explicit compilation to identify. For example, if you try to declare and use an unknown type in the C# code-editor today you won't see a compile error until you do a build. Now with SP1 you'll see live red squiggle errors immediately (no explicit compile required):
To turn this option on in VS 2010 use Tools > Options > Text Editor > C# > Advanced > Show live semantic errors
and
VS 2010 use Tools > Options > Text Editor > C# > Advanced >Enter outlining mode when files open
To turn this option on in VS 2010 use Tools > Options > Text Editor > C# > Advanced > Show live semantic errors

Categories