Skip to content

Instantly share code, notes, and snippets.

View RussKie's full-sized avatar

Igor Velikorossov RussKie

  • Microsoft
  • Sydney, Australia
View GitHub Profile
@dotMorten
dotMorten / MSBuildCheatSheet.xml
Created January 14, 2019 23:19
MSBuild Cheat Sheet
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
How to define a variable.
Just stick a new node in a property group.
-->
<PropertyGroup>
<!-- This node in a property group will define a variable -->
<TestVariable>Test Variable Value</TestVariable>
@JonCanning
JonCanning / update.ps1
Last active May 12, 2020 21:15
dotnet nuget update packages
$regex = [regex] 'PackageReference Include="([^"]*)" Version="([^"]*)"'
ForEach ($file in get-childitem . -recurse | where {$_.extension -like "*proj"})
{
$proj = $file.fullname
$content = Get-Content $proj
$match = $regex.Match($content)
if ($match.Success) {
$name = $match.Groups[1].Value
$version = $match.Groups[2].Value
if ($version -notin "-") {