
Week 11, 2025 - Tips I learned this week
.NET tip of the week: use the .NET Upgrade Assistant tool to upgrade your project to a new version of .NET
In case you don’t know, when you want to upgrade to a new version of .NET, instead of manually going through all your csproj
files to change the version and upgrade your dependencies you can use a dotnet tool to automate that: the .NET Upgrade assistant.
You can install it as a global .NET tool:
dotnet tool install -g upgrade-assistant
And then upgrade your project using the upgrade command:
upgrade-assistant upgrade
Vscode extension pack of the week: Remote Repositories
Sometimes, we don’t want to clone an entire git repository but just to have a look at it, see how the code is written and that’s it. Browsing code on GitHub is fine but let’s be honest when you start to spend some time in the repository, to search some code it’s not the best experience. Thanks to the Remote Repositories vscode extension pack, you can directly browse code in your vscode without having to clone anything. There are two separate extensions depending on where your git repository is located: GitHub Repositories and Azure Repos.
I find it particularly useful when you want to browse open source code samples.
Troubleshoot your HTTP requests using devtunnels echo
Recently, a colleague was trying to troubleshoot HTTP requests to an API that were failing when sent from some C# code but succeeding from another tool. The issue was due to a difference in the User Agent between the two requests. At the time, I didn't think of it, but he could have discovered the problem sooner by using the devtunnels echo
command. This command sets up a simple server that returns the content of a request. By sending the requests to the localhost echo
endpoint instead of the API, he could have easily compared the requests from his two tools.
Git tip I did know about
The other day, I was doing a lab with students and I wanted to share to them the correction of the parts we corrected together, but not the ones we did not correct. So I wanted to push only a part of the commits on my branch.
On the repository on GitLab there was on the main branch: A → B
On my local repository, I had the main branch: A → B → C → D → E → F
C and D were commits containing the corrections of the parts we did together, so I wanted to push them but not push E and F.
I just had to do git push 1ae242:main
where 1ae242
is the hash of the commit D.
git push
documentation to learn more about the different options.And that's it for this week, happy learning!