|
sometimes I use the option "only show build error"
|
|
|
|
|
Brady Kelly wrote: for things that - you think - are correct
FTFY
|
|
|
|
|
Well, if I only think they're correct while they're not, why does the website work 100%?
"'Do what thou wilt...' is to bid Stars to shine, Vines to bear grapes, Water to seek its level; man is the only being in Nature that has striven to set himself at odds with himself."
—Aleister Crowley
|
|
|
|
|
In many case, website still seems to work perfectly even though there are still some uglies in the code.
|
|
|
|
|
That's not necessarily a fix for him. I find it displaying things IT thinks are wrong but aren't just as often.
|
|
|
|
|
I never moved from 2013 - not quite as stable as 2010 but close enough to get work done without random events loosing work or it just going into la-la land.
I did try 2015 but it too had 'issues' and ms had way too soon stopped updating it in the rush to push out 2017.
Seems they are now too involved adding 'features' to the languages to bother with the IDE. (and let's face it, all those 'brand new' features really do is save is perhaps an extra line or 3 something that cant already be done anyway - and for readability as often those actions probably should be done longhand anyway.)
You realise soon it'll be 2018, ms' focus will move off vs2017 and into the already mentioned vs2019 - and just like 2015 (and even 2013 though at least it's safely usable) vs2017 will remain unfinished (no more updates). And yes, 2 years later 2019 too will become ignored and unfinished.
I really wish ms would return to a 3+ year major release cycle, they've amply demonstrated they cant manage anything less.
Installing Signature...
Do not switch off your computer.
|
|
|
|
|
Lopatir wrote: I really wish ms would return to a 3+ year major release cycle, they've amply demonstrated they cant manage anything less.
Maybe. Or they just have jumped the shark and friged the nuke.
I have lived with several Zen masters - all of them were cats.
|
|
|
|
|
Don't get me wrong. Except for this complaint, I absolutely love VS2017. I find it a much more comfortable IDE than VS2015. Then there is C#7, which as far as I know isn't handled by VS2013, and maybe not even VS2015.
"'Do what thou wilt...' is to bid Stars to shine, Vines to bear grapes, Water to seek its level; man is the only being in Nature that has striven to set himself at odds with himself."
—Aleister Crowley
|
|
|
|
|
I could not agree more. I am currently using VS2015 and other than sheer "greed" could never understand why Microsoft started bring out new versions every 2 years. Personally I wish they would go to a 4 year cycle and bring out VS versions that have been thoroughly de-bugged.
Just because you can... does not mean that you should....
An important lesson/truism/aphorism that has escaped our entire industry.
|
|
|
|
|
The only place I encounter that is the annoying XAML tendency to want rebuilds when items are added or namespaces changed.
Of course I'm running Resharper, so that might be a factor.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
I never code without ReSharper, so I doubt that's the differentiator.
"'Do what thou wilt...' is to bid Stars to shine, Vines to bear grapes, Water to seek its level; man is the only being in Nature that has striven to set himself at odds with himself."
—Aleister Crowley
|
|
|
|
|
Brady Kelly wrote: Or is this situation unique to my Visual Studio only
Yes, it's you. VS uses the web.config file in the Views folder to determine what assemblies to load to verify your razor code. If you are getting squiggles in the editor it is likely that your Views\web.config file is not correct.
|
|
|
|
|
MVC Core doesn't have any of the two older web.configs, and I get this problem as soon as I create a new MVC web app project, without adding or changing anything.
"'Do what thou wilt...' is to bid Stars to shine, Vines to bear grapes, Water to seek its level; man is the only being in Nature that has striven to set himself at odds with himself."
—Aleister Crowley
|
|
|
|
|
Sounds like, broken by design.
Common sense is admitting there is cause and effect and that you can exert some control over what you understand.
|
|
|
|
|
Why ever would MS do that? Do they want me to purchase a competing IDE?
"'Do what thou wilt...' is to bid Stars to shine, Vines to bear grapes, Water to seek its level; man is the only being in Nature that has striven to set himself at odds with himself."
—Aleister Crowley
|
|
|
|
|
I've never had that problem.
Brady Kelly wrote: yet the bloody text editor thinks there are 20 errors in one screen of a Razor view .cshtml file.
Ah, yes, there I've noticed that. It's weird, if I let VS mull it over for a few minutes (literally, on this POC machine I have at work) the squiggles go away. I also read somewhere that deleting the PDB files or something, don't remember what, refreshes "stuff" so the editor works again, at least for a while.
But then again, the whole idea of mixing server-side code inside an HTML file that is already polluted with Javascript that gets turned into "print" statements with embedded code that is then compiled and executed to generate the HTML, well, I know that was like the coolest thing since sliced bread when people started doing it, and certainly all those script-kiddie languages glommed onto the idea right away, but in actual practice, I find it a horrendous approach. I could elaborate, but I don't think it's necessary.
|
|
|
|
|
I don't mix real "server code" into my Razor pages, only that code that issues the "print statements" you mention.
"'Do what thou wilt...' is to bid Stars to shine, Vines to bear grapes, Water to seek its level; man is the only being in Nature that has striven to set himself at odds with himself."
—Aleister Crowley
|
|
|
|
|
I still use VS2015 and I never could wrap my head around MVC. To me it was just Classic ASP wrapped in a shiny new veneer.
I'll stick with Standard ASP.NET if I ever have to write a web application again...
Steve Naidamast
Sr. Software Engineer
Black Falcon Software, Inc.
blackfalconsoftware@outlook.com
|
|
|
|
|
I use VS 2017 every day and I cannot complain. Heck, Microsoft gave me this excellent IDE for free (At least the Community Edition.) Let's give MS some credit for that!
Get me coffee and no one gets hurt!
|
|
|
|
|
"Free" crap is still crap.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
FWIW, I see this every once in a while in purely C# code (WinForms project), so it's not unique to Razor. I might have legitimate errors, fix them, but the red squigglies don't go away. Sometimes restarting VS makes them go away, but at other times, they persist.
|
|
|
|
|
If you were getting this behavior on code, then I'd say your intellisense database is corrupt. Its been a problem in VS ever since they introduced it. I dunno.. maybe intellisense also builds a database for cshtml files too. You might try deleting the old database to force it to regenerate and see if that fixes the problem.
|
|
|
|
|
Yes, this looks to be a likely cause, because my Intellisense is really sick, whatever I am working on.
Could you please tell me how to delete that database?
"'Do what thou wilt...' is to bid Stars to shine, Vines to bear grapes, Water to seek its level; man is the only being in Nature that has striven to set himself at odds with himself."
—Aleister Crowley
|
|
|
|
|
I can tell you the incantation(s) I use. I'm sure I have a lot of unneeded steps in them all, but I've never been able to trim it down to less because whenever I leave a step out, it seems that incantation doesn't work.
The shotgun incantation that seems to work when all others fail is this:
(this is on VS2015) close all tabs of all files, clean the solution (release and debug builds), exit VS, watch the disk activity and wait until the activity from VS ends, find and remove the .suo file, reopen VS, wait until it's disk activity ends, open the project, wait until its disk activity ends (sometimes this takes a while), rebuild the solution. Open a file of the project, wait until VS's disk activity ends.
Sometimes, I can get away with just closing all the tabs, cleaning the generated files, exiting and then restarting VS.
On older versions of VS (e.g. 2005), there were ways to bind intellisense controls to menu entries, but I either quit looking for them because they stopped helping, or they took them away.
Hope that helps.
|
|
|
|
|
Thanks, but as someone said above, for them it was ReSharper, and I strongly suspect for me as well. I've told R# to ignore Razor files when analyzing. Any rare false errors when editing plane C# vanish after a few seconds. Razor is the only place I these errors take hours to go away, or don't, but my app still works fine.
Intellisense is another troubled tool for me, even in plain C# files. As has been suggested, I will try clearing the Intellisence db as soon as I know where to find this database.
"'Do what thou wilt...' is to bid Stars to shine, Vines to bear grapes, Water to seek its level; man is the only being in Nature that has striven to set himself at odds with himself."
—Aleister Crowley
|
|
|
|