Change default "Error List" files to account for - visual-studio

We're currently using visual studio 2019 with linting.
This however causes the error list to become cluttered as it defaults to showing all errors, both build errors and with IntelliSense. As soon as a file is opened, all the errors are added. They remain there until VS restarts.
This can be fixed by selecting the "Changed Document's" option.
This is however reverted back to "Entire Solution" when Visual Studio restarts.
Is there a way I can change the default value. Preferably for all solutions so it doesn't have to be set for all solutions in the repo.
Thank you in advance.

Related

Error message in intellisense popup is displayed twice

On a new Visual Studio install I'm getting this problem:
Error messages are doubled, just without a hyperlink. This goes for all error/warning messages in Visual Studio, and I could find any info on this particular problem. Is there anything specific I should look at, so I don't have to reset everything?
I'm using Microsoft Visual Studio Community 2019 - Version 16.10.0, everything is up to date.
I have this problem too and only since upgrading to v16.10.0. You can make it temporarily go away by deleting the .vs folder inside of the solution folder, but it seems to always come back.

VS Solution Explorer Analyzers exclamation: ef1000 "possible sql injection vulnerability"

Strange message in Solution Explorer.
ef1000 "possible sql injection vulnerability"
It doesn't prevent compile, no errors, no warnings, no messages in "Errors List".
No similar messages in the output on compile...
Click doesn't move focus to "vulnerability" line. No referenced file/line related information.
But there is context menu with "Delete" button which doesn't work (nothing happens). There are no Analyzers related entries in proj file.
Looks like common package references bug. How to fix it?
I went to that location C:\Users\User.nuget .. etc and deleted the package. I closed visual studio and reopened it. The package was restored and the error was gone. I was using a .net framework application in visual studio at the same time and was opening and closing the core solution repeatedly so I'm thinking the package got corrupted somehow.
Just unload the project and reload it again, the warning is disappeared.
The source
UPDATE for Visual Studio 2019:
If you use Visual Studio 2019 you have always to get last version. So if there are any updates available just install it.
Click on Help => Check for Updates => Update.

VS2017 15.7.5 doesn't automatically check out files

I've recently noticed that when I go to make a change which needs a file to be changed, VS2017 (Professional) has started to produce a popup saying:
The file <filename>, which you attempted to edit, is read-only on disk.
Would you like to make the file writeable or edit it anyway?
If I cancel this, I get a message:
The file '<filename>' needs to be checked out before it can be edited.
The file was not checked out automatically because you have disabled automatic checkout
when files are edited in the Source Control options page.
The Source_Control->Plug-in_Selection is set to Visual Studio Team Foundation Server; I haven't changed the Options under Source_Control->Environment; both Saving and Editing are set to Check out automatically.
As far as I know, apart from recently updating from 15.7.4 to 15.7.5, I haven't changed any settings. Is there some setting elsewhere which affects this?
Note, my installation of VS2017 Pro Preview, 15.8.0 preview 5.0, does the same thing and running VS2017 as Administrator does not fix it.
Update:
Visual Studio 2015 has no problem checking out the same files in the same local workspace. That is, if I open a solution in VS2017, edit a file and go to save it, I get the above messages. If I then cancel the edits and try the same thing on the same file in VS2015, the file gets checked out. Hence the problem is with VS2017 and not the files themselves.
OK. After further searching I found a pointer to the answer in this answer. Somehow, my VS2017 instances have gone offline from the TFS server. The menu option File->Source_Control->Advanced->Go_Online sorted things out.
My solution had become unbound from the source control server.
To resolve I used menu options File->Source Control->Advanced->Change source control... Select project or solution without Server Name or Server Binding. Click Bind.

What happened to TFS knowing that "The files are identical"?

I recently installed Visual Studio 2013, and I’ve noticed the Pending-Changes screen no longer informs me that “The files are identical” when appropriate.
I often have a list of files displayed in my Pending-Changes screen. Some of those files have been unnecessarily checked-out by me, so I try to clean-up my list daily. In Visual Studio 2010, I can right-click on a file in Pending Changes, and click Compare > With Latest Version. When my local version matches the Latest Version, I get a notification saying, “The files are identical”.
However, in VS2013, when I compare a local file w/ Latest, the file-comparison window opens and displays two identical files side-by-side with no changes highlighted (because there ARE no changes to highlight). Is this an option/feature I can change in VS2013?
It's a change in behavior in VS 2013. I'd suggest entering it on Connect.

Visual Studio - Error when clicking on Solution -> Properties (Object reference not set to an instance of an object)

When i try to access my solution Properties, i get the following error:
Object reference not set to an instance of an object
I am using VS 2012. What could be the cause of this?
Some extensions may cause this.
Try disabling extensions and restarting Visual Studio.
Quite often error will be gone even if you re-enable extensions after this.
There's a bug report on Microsoft Connect (link).
It is marked there as "Closed as External", but it seems that it may occur randomly with any extension, so would be worth voting it there to bring it to Microsofts attention.
In my case, the problem was solution-specific. NuGet was causing this error, but not the extension itself but a NuGet package that generated an error on VS load. When I opened NuGet Package Manager Console I saw a big red text with a description of the error. In my case it was T4Scaffolding.Core package, which in turn is a dependency of MVCMailer.
If this is your case, you will probably see what package generates an error in PM Console.
I faced this dialog too and i'm not sure what exactly causes this as i couldn't even open the NuGet console to see detailed error messages.
Closing Visual Studio, deleting %AppData%\Microsoft\VisualStudio and restarting Visual Studio worked for me as it causes a reset of various things like window configurations.
I think if this dialog is displayed some files may be corrupt in %AppData%\Microsoft\VisualStudio and by deleting that folder Visual Studio can start normally again.
Update:
The issue arises on my machine when i start Visual Studio by using "run as administator" whereas Visual Studio has been started before without that option and %AppData%\Microsoft\VisualStudio had been created without the administator association.
Visual Studio 2013: I had this issue when I tried opening TOOLS -> Extensions and Updates.
I used #ViRuSTriNiTy idea, but only cleaned the files from:
C:\Users[myUserName]\AppData\Local\Microsoft\VisualStudio\12.0\Extensions
There are 2 cache files over there.
Deleted them and restarted VS2013 and it was fixed
The way it was happening for me might be unique to me/my setup, but I'd love to know if anyone else has this happen, and if they find out why:
If I launch an .sln file by double-clicking it, it will load VS and I can right-click the Solution and get Properties to come up no problem.
If I go to "Open Project" on the Visual Studio welcome page or from File > Open > Project/Solution, navigate to the .sln file and launch it by selecting it and clicking "Open" in the File dialog, that's when I have this issue.
I'm going to just always launch the .sln file from now on, but I'd love to know why this happens when using "Open Project" from the welcome page or from File > Open > Project/Solution! I tried going into Tools > NuGet Package Manager > General and I unchecked the options for allowing NuGet to download missing packages and Skip applying binding redirects, and under Package Sources I de-selected the checkboxes (my dev machine does not connect to the internet). Environment > Extensions and Updates: I tried it with and without "Load per user extensions when running as administrator" and running it as an Admin and without running as Admin. Also tried just deleting everything at C:\Users\me\AppData\Local\Microsoft\VisualStudio. No change from those 2 bullets above.

Resources