Today I find myself with yet another bit of functionality that only works when you are running in Administrator Mode. A while back I had Full Admin Mode always enabled, downside of this is the store apps don't work at all. Up side is your PC works as expected Smile with tongue out. I created a PowerShell script to download Channel 9 videos as described in my post Easily download Ch9 videos, this script worked perfectly but recently started breaking with the error

Start-BitsTransfer : Object reference not set to an instance of an object.
At C:\s\ch9$\Download All.ps1:90 char:21
+                     Start-BitsTransfer $url $($destination + $mp4fileName)
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Start-BitsTransfer], NullReferenceException
    + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.BackgroundIntelligentTransfer.Management.NewBitsTransferCommand

What changed? Only switching back to not full admin mode, before realizing this however I added a bit switch into my script so that it would use the WebClient object for downloads if set to 1. But today is when I thought to myself, maybe this is just another one of those "needs to be admin mode" things.

And guess what, it was. Switched to run as Administrator and everything works great.


Today I got a weird error on code that should just work.

Cryptographic failure while signing assembly '<Debug Assembly Full Path>' -- 'Error signing assembly -- Unknown error (8013141c)'    <Solution Full Path>\CSC

The reason why I say this was weird was because it was working before I rebooted my machine. So it was obvious from reading this error that the signing of the assembly was causing the projects build to fail.

So first thing I did was open the project properties, go to the Signing Tab and uncheck the Sign the assembly checkbox.


This fixed my issue, but felt wrong and I knew it would bite me later. I thought a bit more about what was different before I rebooted and now and eventually remembered that before I rebooted I was running Visual Studio in Administrator mode before.

So I re-checked the Sign the assembly checkbox closed Visual Studio and then opened the project again with a new instance of Visual Studio that was running in Administrator mode


Rebuilt the solution and everything built as expected