Skip to content

Instantly share code, notes, and snippets.

View refactorsaurusrex's full-sized avatar

refactorsaurusrex

View GitHub Profile
@refactorsaurusrex
refactorsaurusrex / nuget-update-fails.md
Last active March 13, 2018 20:41
Nuget 'update' command fails: 'Microsoft.CSharp.Core.targets' was not found

When running nuget update 'some.solution.sln' -id 'Some.Package.Id' yesterday, I got the following error:

Scanning for projects...
MSBuild auto-detection: using msbuild version '15.4.8.50001' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\
Enterprise\MSBuild\15.0\bin'.
The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\Roslyn\
Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the <Import> declaration is correct, 
and that the file exists on disk.  C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\
Microsoft.CSharp.CurrentVersion.targets
@refactorsaurusrex
refactorsaurusrex / .htaccess
Last active January 7, 2020 18:45
How to simultaneously 1) redirect http to https AND 2) remove 'www', if it exists, using an htaccess file
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://example.com%{REQUEST_URI} [R=301]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://example.com%{REQUEST_URI} [R=301]
@refactorsaurusrex
refactorsaurusrex / profile.ps1
Last active August 22, 2023 22:57
How to open the Windows environment variables dialog with PowerShell
function Get-EnvironmentVariablesDialog {
rundll32 sysdm.cpl,EditEnvironmentVariables
}
Set-Alias EnvGui Get-EnvironmentVariablesDialog

Keybase proof

I hereby claim:

  • I am refactorsaurusrex on github.
  • I am nickspreitzer (https://keybase.io/nickspreitzer) on keybase.
  • I have a public key ASAE7hZWzEh4jyEpkcRzsSpkH0ruZOi5nvuyQgKP9h_-Mgo

To claim this, I am signing this object: