|
title: Put the knife down and take a green herb, dude. |
descrip: One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com Using 89% of the same design the blog had in 2001. |
||||||||||||||||||
|
FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike, always wear white. As an Amazon Associate, I earn from qualifying purchases. Affiliate links in green. |
|||||||||||||||||||
|
x
MarkUpDown is the best Markdown editor for professionals on Windows 10. It includes two-pane live preview, in-app uploads to imgur for image hosting, and MultiMarkdown table support. Features you won't find anywhere else include...
You've wasted more than $15 of your time looking for a great Markdown editor. Stop looking. MarkUpDown is the app you're looking for. Learn more or head over to the 'Store now! |
|||||||||||||||||||
| Wednesday, March 17, 2021 | |||||||||||||||||||
|
How do you Prettier on save in Visual Studio 2019? You use Mads Kristensen's extension, JavaScript Prettier. It lets you set it to run on save, which you absolutely must do. It's an 100% godsend. "But Mads' extension only runs Prettier 1.12.1 if another Prettier isn't installed locally in my project!" I hear you say. "That doesn't put in the extra space between function and () in anonymous declarations! I can't use it!" you complain. Well, thanks to your resident hacker (maybe not my best separation of concerns, but it works), that's not a problem any more. Open Tools >>> settings, choose Prettier, type in the version you want to use. Poof. The embedded version is the version you entered and you're Prettier-ing. Why did I bother updating a Prettier extension for Visual Studio? With my current team, I'm the only dev using, um, modern
client-side tooling (mostly VS Code). Most folks are using Visual Studio 2019. That's
fine. I love VS2019 for C# work. I can see how familiarity sometimes
breeds not contempt but content. -Edness. Or something. But we need to use Prettier as a team. The tool's that good. So update it is! You're welcome. ;^) Btw, I really owe Rackis a whiskey of his choice for this one. Being OCD about whitespace myself, I complained at first (okay, I complained like a cat getting a bath) when he told me years ago that I had to use a tool that automatically "corrected" whitespace for me, reformatting the entire file without apology, before I could check in my code. What the heck?! I know how to format code to make it easiest to read and understand. How dare a tool mess with my art?!!? Then, very quickly, I dropped the pretense and became addicted. In a team using Prettier, I never got a file with craptastic whitespace from another coder. And, more important selfishly, I found I never wasted another moment making sure the whitespace for my code was perfect. Get lazy, type some code, hit save, WHAM, competent whitespace is inserted for you. It's instant. It's mindless. It's magical. Anything that makes coding easier and standardizes something subjective in a way that's Not Wrong is a very good thing. You should use it. Now. You can thank me later for the recommendation... and the extension, if you're still a Visual Studio 2019 addict.Labels: devtools, extension, javascript, visual studio posted by ruffin at 3/17/2021 10:43:00 PM |
|||||||||||||||||||
| Tuesday, February 09, 2021 | |||||||||||||||||||
|
In one place so I don't have to look it all up (and invariably get the wrong app's shortcuts first) when I forget again Code folding for Visual Studio 2019 (the old lady):
Code folding for Visual Studio Code (the upstart) from stackoverflow.com:
Labels: noteToSelf, visual studio, vs code posted by ruffin at 2/09/2021 11:42:00 AM |
|||||||||||||||||||
| Saturday, June 22, 2019 | |||||||||||||||||||
|
TL;DR
… from the directory of the csproj you want to add the reference to. Today’s issue: Visual Studio is giving me some Solution: Use VS Code for now (which I usually only use for TypeScript). Issue #2: I need to add a reference to a local project. Solution #2: It’s really that easy. I’m on macOS, so I Then I
Go back to the location of the csproj you’re adding the reference to. Now hit up add ref:
And it’ll put it in that csproj, with a path relative to your current csproj.
That’s good enough for now. When I’m back in full VS mode with good net access, I’ll replace with a nuget, but this was a good temporary solution. Keep on codin’… Labels: .NET, noteToSelf, visual studio posted by ruffin at 6/22/2019 09:52:00 AM |
|||||||||||||||||||
| Wednesday, March 15, 2017 | |||||||||||||||||||
|
Remember how I took the time to show how to map Gvim to F1 in Visual Studio? I think there's probably a much better way: VsVim. I installed it, forgot, had Win10 "helpfully" reboot, and suddenly saw a phat cursor in Visual Studio. Took me a second, but then it hit me -- I'm VImming in VS. Only gotcha -- I needed to create a new environment variable, But after that, so far, beautiful. Embarrassed I didn't hear about this one sooner. Would've saved me some time. That's one of the big reasons I use Sublime Text. I mean, it's a great text editor in lots of other ways, particularly fast searches, multiple cursors, and nice plugins, but it's vintage mode that hooked me quickly. In any event, a nice upgrade for VS so far. And 281 reviews averaging essentially five stars ain't bad. My only complaint so far? No EDIT (20170901): Let's add a picture of what I mean. You literally make an environment variable pointing to the folder that holds your vimrc. In other news, got word of my second MarkUpDown Microsoft Store payout today. That's always fun to get, even if it won't cover my already exceptionally trivial marketing budget. But it is growing. That's cool. Labels: markupdown, noteToSelf, vim, visual studio posted by ruffin at 3/15/2017 09:44:00 PM |
|||||||||||||||||||
| Sunday, January 29, 2017 | |||||||||||||||||||
|
From Visual Studio - Command to collapse all sections of code? - Stack Overflow:
I keep forgetting these. Labels: noteToSelf, visual studio posted by ruffin at 1/29/2017 10:24:00 PM |
|||||||||||||||||||
| Monday, January 02, 2017 | |||||||||||||||||||
|
Argh. Fun day of setting up LocalDB. First, you have to have it installed. Unfortunately, our friend http://downloadsqlserverexpress.com/ is busted, and one of the more promising links from MSDN is busted too. If I'm remembering correctly, the new location seems to be here: But the real sticking point for me is that the default connection string for LocalDB from the Web App Template in Visual Studio 2015U3 -- at least if you've installed LocalDB from SQL Server Express 2016 -- doesn't work. The real pain was that I trusted the template, but SQL Server Management Studio was working with LocalDB just fine. Here are the steps I used to create the solution... From microsoft.com:
Now if I did everything correctly (yes, I took the default name instead of changing it to ContosoUniversity, for instance), here's the appsettings.json file's connection string that came out of that template...
... and here's what actually works...
It's just an extra backslash, as far as I can tell. Not sure how I could've introduced that, but perhaps I did? I ended up getting the correct format from here, which is the github repo for the completed Contoso U example I referenced earlier. Enjoy. Your Labels: noteToSelf, SQL Server, visual studio posted by ruffin at 1/02/2017 03:34:00 PM |
|||||||||||||||||||
|
Where is the "ASP.NET Core Web Application" template in Visual Studio? It'll show up once you've installed the ".NET Core tools preview for Visual Studio". Makes sense. ;^) It's never fun when a hard drive dies. Labels: mvc, noteToSelf, visual studio posted by ruffin at 1/02/2017 09:09:00 AM |
|||||||||||||||||||
| Wednesday, November 16, 2016 | |||||||||||||||||||
|
I went to build an app package for my newest app -- Podcasters' RSS Feed Generator, which does, not surprisingly, exactly what it says it does -- I got the following error in Visual Studio.
Turns out this is a pretty cryptic error. We get a partial answer from hololens.com:
... but it's not quite that easy. You can't simply rename the file; the images also have to be exactly the right size. Painfully, all the Anyhow, the three I had complaints about with their "correct" sizes are:
Blasting all the old ones with Or so I thought. Now I get...
Which is it, dang it?
Answer: Apparently we wanted the sizes the error window wanted. Ignore errors like the ones pictured, above. Labels: images, noteToSelf, visual studio, windows store posted by ruffin at 11/16/2016 01:56:00 PM |
|||||||||||||||||||
| Monday, November 14, 2016 | |||||||||||||||||||
|
In other news, from stackoverflow.com:
Well, of course. /sigh I was trying to evaluate I like Visual Studio a lot -- and, somewhat unrelatedly, though I guess it speaks to the general quality of MS IDE tools, have started using Visual Studio Code to debug Node apps -- but there are some edge cases that really surprise me. Labels: noteToSelf, visual studio posted by ruffin at 11/14/2016 12:32:00 PM |
|||||||||||||||||||
| Friday, November 11, 2016 | |||||||||||||||||||
|
When I'm on a laptop without an external monitor, I often want my external tool windows in Visual Studio where I usually have my Output, Error, and Find windows situated, to stop floating over the main VS edit windows. I keep thinking I've forgotten how to do it, though it's not difficult. You just open your preferences, search for "window", and up it comes.
This really is a better way to get around on a small-screened setup. I have a super-cheap Lenovo 100S that I keep around for when I don't have a computer with me (har har), as it has great battery life and a screen that'll go to 180 degrees on its hinge. It's small, fits nicely on my lap, and there's plenty of space to fit this little thing in front of the steering wheel when I'm sitting around for a while and want to hack a bit. The keyboard and trackpad are pretty crappy, but for the price, I'll manage. (Occasionally, yes, I couple it with my ThinkPad Compact USB keyboard. That thing is wonderful, even if it isn't backlit.) I consider the 100S my off-brand MacBook Air. But the 1366x768 screen is pretty small. When I'm using Visual Studio [sic], it's nice to keep those three tool windows somewhere else so that I can still see the code. Much easier than all the window rearranging I used to do. Labels: noteToSelf, visual studio posted by ruffin at 11/11/2016 07:39:00 PM |
|||||||||||||||||||
| Wednesday, August 24, 2016 | |||||||||||||||||||
|
Perhaps the most important Visual Studio trick to know about the Immediate Window: To print something with all the newlines and carriage returns "invoked", so to speak, you suffix the string in question with Say you're debugging some SQL. This isn't horribly useful...
It's all on one line with Let's try it again with
For some reason, I've got the SQL indented like mad (okay, okay, it's so it lines up in Visual Studio. This is a quick and dirty utility service that has embedded SQL), but you get the point. It's actually legible with the I could've sworn I'd posted this before, but couldn't google it up in my own blog in a minute or less, so here we go again, proper keywords attached. Labels: noteToSelf, visual studio posted by ruffin at 8/24/2016 10:46:00 AM |
|||||||||||||||||||
| Tuesday, August 18, 2015 | |||||||||||||||||||
You can customize your Find in Files results to show what you want to see and how you want to see it. Surely he jests. Right? No, fellow mere mortals, he does not. Gamechanger. ;^) It’s the little things, man, the little things. UPDATE 6 July 2018: This got a lot more complicated. From that answer (and, now, personal experience): You now have to load what’s essentially a compressed version of a registry key set that lives in But it’s even more bizarre that this isn’t a “real”, supported setting in Visual Studio yet. Labels: noteToSelf, visual studio posted by ruffin at 8/18/2015 04:32:00 PM |
|||||||||||||||||||
| Saturday, September 27, 2014 | |||||||||||||||||||
|
Look, I appreciate that you're trying to save me keystrokes when I type try[tab][tab]. That you put the selection onto Exception so that I can immediately overwrite it is exceptionally thoughtful as well. But come on, you can just check the prefs to see that I don't want you polluting my source with tab characters. Might be nice if you smart-tabbed[-as-spaces] the try-catch block to the context of the code around it too, you know? Sometimes I feel you only pretend to care. It's a complicated relationship we have, isn't it? ;^) Labels: visual studio, whine posted by ruffin at 9/27/2014 01:11:00 PM |
|||||||||||||||||||
| Tuesday, April 29, 2014 | |||||||||||||||||||
|
People. Paper. Electrons | Visual Studio: Show active file in solution explorer: There is actually a setting in Visual Studio that does this automatically. That works, but it's awfully Solution Explorer spammy. I've installed the "Collapse Selection in Solution Explorer" add-on already just to combat my own spam... we'll see, I guess. Update 20150730: This function is in VS 2012+ by default, as advertised. Labels: noteToSelf, visual studio posted by ruffin at 4/29/2014 09:59:00 AM |
|||||||||||||||||||
| Saturday, November 02, 2013 | |||||||||||||||||||
|
suo file, what is this ?: NO, do not add it to your CM system. More than that, if you keep your files in your Document's folder on Windows, it's got your login name in it as well. /sigh Labels: noteToSelf, visual studio posted by ruffin at 11/02/2013 08:41:00 PM |
|||||||||||||||||||
| Tuesday, September 24, 2013 | |||||||||||||||||||
|
Can I save the window layout in Visual Studio 2010/2012? - Stack Overflow: There's a nice Visual Studio plugin that lets you save and load custom window layouts: http://perspectives.codeplex.com (you can also find it in the VS gallery). Wish I'd googled that a little earlier on. I've driven myself crazy rearranging windows when I go from three screens docked in the office to one with the laptop on its own to two at home (where I don't have my usb video out... at some point, I should consider getting another usb to video, but my personal Lenovo can output to two more displays and its built-in display doesn't stink like my work computer's does. (Overshare alert.)) Labels: noteToSelf, visual studio posted by ruffin at 9/24/2013 10:08:00 AM |
|||||||||||||||||||
| Friday, June 14, 2013 | |||||||||||||||||||
|
Collapse Selection In Solution Explorer extension Many Visual Studio users have a solution tree structure with multiple projects and solution folders that are organized as a deep hierarchy. To avoid visual pollution, users want only those projects expanded that are being actively developed (often with many of the projectโs child nodes recursively collapsed). To accomplish this task, they have to manually collapse each node recursively โ an onerous chore if one has a deeply nested solution tree. The Collapse Selection in Solution Explorer extension addresses this particular issue by enabling the user to recursively collapse multiple nodes with a single click. Thank heavens (and SO). Wonder why it took me that long to Google it up. Labels: noteToSelf, visual studio posted by ruffin at 6/14/2013 11:40:00 AM |
|||||||||||||||||||
| Tuesday, May 14, 2013 | |||||||||||||||||||
|
customization - How to exclude private members from StyleCop rule SA1600 - Stack Overflow: Right click on your project node in Visual Studio, select StyleCop Settings. On the Rules tab, select the Documentation Rules node. In the right-hand pane, select the Ignore privates checkbox, and\or unselect the Include fields box. Either of these will achieve the desired effect. Thab bu berry buch. Labels: noteToSelf, visual studio posted by ruffin at 5/14/2013 09:18:00 AM |
|||||||||||||||||||
| Monday, May 13, 2013 | |||||||||||||||||||
|
Hide the Status Bar - The Ultimate Visual Studio Tips and Tricks Blog - Site Home - MSDN Blogs: This one falls into the โHuh?โ category. If you go to Tools >>> Options >>> Environment >>> General and uncheck the โShow status barโ option. It will remove the status bar from view. Awesomepants, especially on under-pixeled laptop displays. Labels: noteToSelf, visual studio posted by ruffin at 5/13/2013 02:59:00 PM |
|||||||||||||||||||
| Thursday, January 03, 2013 | |||||||||||||||||||
|
Javascript .NET - Documentation: This section provides documentation to get quickly started to embed and run Javascript .NET in your application. The project you were looking for is Javascript.NET, which is/uses (?) Noesis.Javascript, which embeds the "Google V8" javascript engine. Enjoy, profit, whatever. Found that by chasing down how the JSLint plugin for Visual Studio worked. Labels: Google, javascript, JSLint, visual studio posted by ruffin at 1/03/2013 09:51:00 AM |
|||||||||||||||||||
|
| |||||||||||||||||||
|
|
All posts can be accessed here: Just the last year o' posts: |
|||||||||||||||||||||
|
||||||||||||||||||||||
|
|
|
|