Automatically fix fixable errors
Some errors in the error list could be automatically fixed. For instance, you build your code and the error "The type 'bla' is not referenced. You must add a reference to assembly 'System.Data.Entity'" appears in the error pane. This error is easily fixed by adding the correct reference to the project, but since Studio already knows what it's looking for, it knows where it's located (GAC), why isn't there an option to fix it?
It would be nice if the error pane would have a column "Autoresolve" with for each error which migh be fixable a link "Try resolving". Studio would then try to autoresolve the problem, for instance by adding the correct reference to the project and all would be well. If there was a problem resolving the problem, Studio could display an error message telling the user the autofix didn't work and he should correct the problem himself.
In the same category, auto fixes could be applied for things like missing/extra parentheses, ; characters, etc. etc. I think the list of autoresolvable things is actually pretty long.
But please note: VS should NEVER do this on it's own. It should always be the developers action to perform an autoresolve.
Hi supporters of this issue
As has been noted by some commenters to this issue, we introduced the Light Bulb capability in Visual Studio:
This addresses some of the feedback on this thread, and new lightbulb “fixers” are appearing with every release. The lightbulb allows you to apply the same fix to other issues of the same type in the document, project or solution too, so bulk fixing is easy.
We don’t currently expose this feature directly in the error list, but you can always use F8/Shift-F8 to move between errors in the list and Ctrl+. to invoke the light bulb.
I’m resolving this item as completed since the main thrust of the request has been met, so you can all have your votes back for other items. If you have other feedback, e.g. about fixers you’d like to see implemented or having the ability to fix items directly from the error list (“lightbulbs in the error list”), please feel free to create a new item and vote it up.
Program Manager, Visual Studio IDE Team
If Bali > RiodeJaneiro And Bali > GoldCoast And Bali > Paris And Bali > Zurich And Bali > Tokyo And Bali > Beijing And Bali > LosAngeles And Bali > London And Bali > PortMoresby Then
MessageBox.Show("You should travel to Bali, Indonesia. You should stay at the Mansion Resot Hotel & Spa!", "Holiday Destination")
please help fix this!
The table below contains measured data of a property Y for different X conditions
Write a VB function that receives this data as input, as well as an arbitrary X condition
The function should produce a value which is a linear interpolation between the two closest data points
The function must return "data not sorted" if the X-values of the data table is not sorted
The function must receive a third parameter that gives the choice to extrapolate points that are outside the data table or not.
If the user choose not to extrapolate, then the function must return "outside limits" for points outside the data table
Now apply the function to the list of arbitrary X points given so that it is plotted on the same graph.
Corrects interpolation calculation
No hardcoded inputs
Robustness (check input data / handle exceptions)
Neat and logical structure
Efficient program (no unnecessary steps / calculations)
Condition X Property Y
Arbitrary X Interpolated Y
GUYS please help me how to write this programme,because i am tired of trying on my own,
Brylle Pogi Daw Sya commented
Please Fix this **** I can't Take Any Longer This Thing
/*C++ Program - Print Prime Numbers*/
using namespace std;
int start, end, i, j, count=0;
//to print all the prime number between any range
//enter the two number(starting and ending)
cout<<"Enter Starting Number:";
cout<<"Enter Ending Number:";
cout<<"Prime Number Between"<<Start<<"and"<<"is:\n";
Martijn Hoekstra commented
VS already has some autofix (press ctrl-. on the line with the error and autofixes show up) but I do like the addition of being able to do this in the problems window (with some sensible behaviour: focus the window on the line in question, show a dialog with options), and I very very much would like adding a reference to a project in the current solution to be autofixible.
Benjamin Howarth commented
Also add missing using; statements. I'm walking through 200 build errors simply adding one line to each and every single file, and the IDE knows where to find the class already.
Add missing included in C++ code. In that case, it could be added at the end by default and the line be automatically selected so that we can move it elsewhere easily if desired.
Madushan Siriwardena commented
remove unused using statements when building.. (They're pretty easy to add ... just CTRL+. but normally forget to remove and gets the top of the file cluttered.)
Also, 'fix ';' expected' compile error automatically..
Also remove unused references automatically (or add that option in the tools) upon pre-release builds.
David Ledbetter commented
In VB some some references are given, others you have to figure them out on your own.