Scott Hanselman

Your dotnet outdated is outdated! Update and help keep your .NET projects up to date

November 12, 2020 Comment on this post [9] Posted in DotNetCore | Open Source
Sponsored By

I've talked about the dotnet-outdated tool before but now it's, ahem, outdated. It's moved to new owners so head over to your command line and update "dotnet-outdated" like this:

dotnet tool uninstall --global dotnet-outdated
dotnet tool install --global dotnet-outdated-tool

Just copy paste those and you'll be updated. Yes, it's changed it's moniker but the tool is the same and you still invoke it with "dotnet outdated." You can learn more about the wonderful dotnet outdated tool on their GitHub! Take a moment, Dear Reader, and give them a GitHub Star!

Now, here's the output of dotnet outdated on my own podcast's website

dotnet outdated finds older NuGet packages

I enjoy the use of color with this command line tool. Note that it's calling out that there may be some real Breaking Changes with some of these version number moves. Updating to a major version could be scary, so I'll take extra care there.

If I was feeling super lucky, I could do a dotnet outdated -u and have it automatically upgrade all my references and then test the resulting project. I could also update just a few, or do them one at a time. If you combine dotnet outdated with Github bots like Dependabot you can really get a handle all libraries updates once and for all.

dotnet outdated
No outdated dependencies were detected

Woohoo!


Sponsor: Have you tried developing in Rider yet? This fast and feature-rich cross-platform IDE improves your code for .NET, ASP.NET, .NET Core, Xamarin, and Unity applications on Windows, Mac, and Linux.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

How to change the background of your Windows Terminal settings

November 10, 2020 Comment on this post [4] Posted in Win10
Sponsored By

I've often asked for my Windows Terminal's settings.json (formerly profiles.json) so I keep it up on GitHub. The thing is, all my machines are different. I mix it up, I change it.

Remember that the Windows Terminal is approaching version 1.5 today! Make sure you upgrade and read about the new features! This version includes clickable hyperlinks! UPGRADE NOW.

Get Windows Terminal free from the Store. You can also get it from GitHub's releases but I recommend the store because it'll stay up to date automatically.

Here's what my Terminal looks like today! I've added transparent PNGs in the lower right corners of each shell so I can keep track, but it's also nice for teaching folks how to use the Command Line.

Here's the settings block for PowerShell, for example. Note the backgroundImage* items:

{
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"hidden": false,
"name": "PowerShell",
"source": "Windows.Terminal.PowershellCore",
"backgroundImage": "D:\\Dropbox\\utils\\TerminalBackgrounds\\powershell-2-400x225.png",
"backgroundImageStretchMode": "none",
"backgroundImageAlignment": "bottomRight",
"colorScheme": "Campbell Powershell"
},

I keep my background images in DropBox or OneDrive so they can be referred to from any of my computers. You can make stretch wallpaper-like images, or you can make subtle (or less subtle, like mine) logo watermarks.

Lovely backgrounds for your Windows Terminal

Here's the PNG backgrounds for these images. I also put this images at https://github.com/shanselman/PrettyWindowsTerminalThings and you're welcome to put nice ones and your own tips up there as well!

dos

powershell-2-400x225

ubuntu_white-orange_hex_su

Thanks to https://www.powershellmagazine.com/ for the use of their PowerShell Logo! Also check out How to make a pretty prompt in Windows Terminal with Powerline, Nerd Fonts, Cascadia Code, WSL, and oh-my-posh.


Sponsor: Have you tried developing in Rider yet? This fast and feature-rich cross-platform IDE improves your code for .NET, ASP.NET, .NET Core, Xamarin, and Unity applications on Windows, Mac, and Linux.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Creating a question friendly environment

November 05, 2020 Comment on this post [0] Posted in Musings
Sponsored By

christina-wocintechchat-com-MkxWUzCuYkE-unsplashA few years back I had a lovely podcast conversation with technical leader Keavy McMinn.

Sometimes I wonder if anyone listens to the show. Then a nice comment will come in when someone listen to an episode years ago and is still thinking about particular quote or line.

Last week I got an email asking about a blog post or podcast that I might have written, and the person wanted me to dig up the quote on a specific topic. It turns out it was from that podcast episode with Keavy. Keavy talks a lot about technical leadership on her blog and you should check it out.

I recently added Transcripts to all 400 HOURS of the podcast and you can search the entire 15 year episode archive in one place at Podscribe!

One of the topics around leadership I've been thinking about a lot lately is how to make work a "question friendly environment." You may hear the term "safe space" to refer to this kind of thing.

"We are missing out on valuable opportunities to connect and grow in our understanding of people if we aren’t giving one another permission to ask each other ignorant questions" - from Viewpoint

Some people come up at your later in career might say, "you should just ask your question don't be a wimp." However, when we do this I think we forget what it was like to be just a few years out of school. You know you don't know anything, but you really don't know how much you don't know.

In my opinion, the number one thing that we can do make more senior engineers, is to give the junior engineers a really good place to ask lots of dumb questions. That means replying to them with patience, providing them with resources to learn and explore, not scoffing or rolling our eyes. You too were once early in career, Dear Reader. Being given a place and permission to ask questions without judgment is a huge gift!

Permission to ask

As a manager, we need to explicitly offer the permission to ask. Talk about permission to ask questions up front, and model that behavior so that others know it's OK. Make sure that folks know you're not going to "flip the bozo bit" just because someone asked a question about DNS.

From Scott Ginsberg, If you want to build this type of environment, there are four key tasks ahead:

1. List the reasons why employees might (not) ask questions.
2. Maintain a question-friendly attitude.
3. Affirm your employees when they ask questions.
4. Reinforce a question-friendly environment.

Make it so that questions can also be asked anonymously. Take their technical questions and consider them from their perspective. They may be missing historical context but they add a new diverse point of view or a fresh technical spin.

What are you doing in your technical teams and at your company to make sure that folks feel they can ask technical questions without judgment?


Sponsor: Suffering from a lack of clarity around software bugs? Give your customers the experience they deserve and expect with error monitoring from Raygun.com. Installs in minutes, try it today!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

How to allow executable .exe files to be downloaded with ASP.NET Core and UseStaticFiles middleware

November 03, 2020 Comment on this post [9] Posted in ASP.NET | DotNetCore
Sponsored By

In the long process of upgrading this blog and moving it to Azure I've been slowly fixing small bugs and also dealing with the dozens of microsites I have hanging off of hanselman.com. Some were forgotten, and some just keep chugging along. https://www.babysmash.com/ is one of them.

BabySmash is a silly WPF app I wrote 15 years ago for my baby, natch. He's now learning to drive a car, but it still gets thousands of downloads a month. The code is on Github.

The ClickOnce application and manifests hangs off of http://hanselman.com/babysmash, but the /setup.exe returns a 404.

I had assumed that using this simple code in my Startup.cs's Configure() method would enable static files like setup.exe:

app.UseDefaultFiles();
app.UseStaticFiles();

This was naive I suppose as ASP.NET Core is very much locked down by default so you are really encouraged to be specific and there are few unsafe defaults.

UseStaticFiles includes a parameter for options, so I needed to update the list of mappings from extension to mime/type. So this little helper function:

private StaticFileOptions GetStaticFileOptions()
{
var p = new FileExtensionContentTypeProvider();
p.Mappings[".exe"] = "application/octet-stream";
return new StaticFileOptions { ContentTypeProvider = p };
}

and then you pass that StaticFileOptions class into UseStaticFiles.

app.UseStaticFiles(GetStaticFileOptions());

Clearly a "secure by default" decision, but also one that's easily extended for my needs.


Sponsor: Suffering from a lack of clarity around software bugs? Give your customers the experience they deserve and expect with error monitoring from Raygun.com. Installs in minutes, try it today!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Using an Xbox Adaptive Controller and Xbox Copilot to get back into gaming after surgery

October 29, 2020 Comment on this post [0] Posted in Gaming
Sponsored By

Xbox Adaptive Controller addonsThanks for the kind words on my post earlier this week. Lots of great tips both in the comments and were sent to me privately. I'm still alternating meds, struggling at physical therapy every day, but I'm fortunate to have my wife (a medical/surgical nurse) here to tell me when it's supposed to hurt and when it's not.

That said, BEFORE the pain started I had a nerve block in my neck and my right side was basically "turned off" for a week. It's definitely preferable to the current pain situation but one of the bright spots is that it give me extreme compassion for those who are missing or unable to use one or more limbs.

I was hoping to use some of my convalescent time to play Xbox but I quickly discovered that it's VERY hard to play a FPS (first-person shooter) with one hand. Of course, tell an engineer that they can't do something and they'll just take it as a challenge, right?

I happened to have an Xbox Adaptive Controller (I bought a few just in case I wanted to set up some relatives or new friends who might need one, never realizing it would be me that needed one) so I hooked it up and tried to figure out how I could game given my paralyzed arm and a lot of free time.

The easiest and clearest way I can example the Xbox Adaptive Controller this - It's an Xbox Controller that pairs and talks to an Xbox like any other controller...but it's not a controller.

It's an Xbox Adaptive Controller Construction Kit.

It has headphone jacks - just 1/8" standard jacks - for every possible input, along with USB ports for Joysticks. You build - adapt - a controller that's ideal for you! It's magical.

Then, combine it with built in Xbox software called Copilot and you can link two controllers so that two can play as one. I was able to use an a standard Xbox Controller in my left hand while using the Xbox Adaptive Controller with my feet. Within an hour I was playing Call of Duty quite competently, I might say.

I even recorded it and put it in my YouTube so I have proof that I got at least one shot in during this round, LOL.

Go learn all about it, the Xbox Adaptive Controller is an extraordinary advice. Then go set it up for a friend or family member, they'll appreciate it very much.

Please take a moment to explore and subscribe to my YouTube. I'm nearing 100k subscribers there and I was told there would be snacks.


Sponsor: Need a multi-cluster load balancer and API gateway? Try VoltMesh: built for modern and distributed apps that require automation, performance and visibility. Start for free today.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.