Monday, June 21, 2021

Quick tip: don't forget to unblock downloaded source code files when using Visual Studio

A couple of weeks ago, I suddenly received below exceptions when trying to build a VS2019 solution that I downloaded from Github. 


The solution is indicated in the exception - you need to right click the file and uncheck the "Unblock tickbox" at the bottom of the dialog. But when you have a lot of files, this is quite tedious. Luckily there is a PowerShell cmdlet Unblock-File to help you solve this. Navigate to the folder where you sourcecode is located and just run "dir -recurse | Unblock-File".




No comments: