Talk for the Vienna .NET User Group Meetup on Dec. 11th 2018.
License: MIT, based on dotnet-presentations/home presentations
| <Project> | |
| <ItemGroup> | |
| <FeatureFlag Include="SUPPORTS_ECDSA" MinimumTargetFrameworks="netstandard1.6;net47" /> | |
| <FeatureFlag Include="SUPPORTS_GENERIC_HOST" MinimumTargetFrameworks="netcoreapp2.2;netstandard2.1" /> | |
| <FeatureFlag Include="SUPPORTS_SERVICE_PROVIDER_IN_HTTP_MESSAGE_HANDLER_BUILDER" MinimumTargetFrameworks="netcoreapp2.2;netstandard2.1" /> | |
| <FeatureFlag Include="SUPPORTS_CERTIFICATE_HASHING_WITH_SPECIFIED_ALGORITHM" MinimumTargetFrameworks="netcoreapp2.1;netstandard2.1;net48" /> | |
| </ItemGroup> | |
| <!-- |
| <Project> | |
| <!-- | |
| neeeds to be in Directory.Build.targets to be included | |
| after SDK's TargetFrameworkIdentifier/-Version inference | |
| --> | |
| <PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NetCoreApp' | |
| and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '5.0'))"> | |
| <DefineConstants>$(DefineConstants);AT_LEAST_NET5_0</DefineConstants> | |
| </PropertyGroup> | |
| </Project> |
| <Project> | |
| <ItemGroup> | |
| <Projects Include="$(MSBuildStartupDirectory)\**\*.*proj" /> | |
| </ItemGroup> | |
| <Target Name="VSTest"> | |
| <Message Importance="High" Text="Found project: %(Projects.Identity)" /> | |
| <MSBuild Projects="@(Projects)" Targets="VSTest" BuildInParallel="true" SkipNonexistentTargets="true" /> | |
| </Target> | |
| <Target Name="Restore"> | |
| <Message Importance="High" Text="Found project: %(Projects.Identity)" /> |
| @echo off | |
| if "%~1"=="" GOTO PRINTNAMESPACE | |
| : SETNAMESPACE | |
| kubectl config set-context --current --namespace="%~1" | |
| : PRINTNAMESPACE |
| { | |
| "globals" : | |
| { | |
| "alwaysShowTabs" : true, | |
| "defaultProfile" : "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", | |
| "initialCols" : 160, | |
| "initialRows" : 40, | |
| "keybindings" : | |
| [ | |
| { |
| using Xamarin.Forms; | |
| public class MemoryLeakWorkaroundViewCell : ViewCell | |
| { | |
| protected override void OnDisappearing() | |
| { | |
| base.OnDisappearing(); | |
| base.Parent = null; | |
| } | |
| } |
| public class CountTruesBenchmarks | |
| { | |
| private readonly bool[] boolArray; | |
| public CountTruesBenchmarks() | |
| { | |
| var rnd = new Random(42); | |
| boolArray = Enumerable.Range(0, 500).Select(_ => rnd.NextBoolean()).ToArray(); | |
| } |
| <Project> | |
| <Target Name="_CollectPackagesToUpdate" Returns="@(_PackageToUpdate)"> | |
| <ItemGroup> | |
| <_PackageToUpdate Include="@(PackageReference)" Condition="'%(PackageReference.IsImplicitlyDefined)' != 'true' and '%(PackageReference.DoNotUpdate)' != 'true'" | |
| TargetFramework="$(TargetFramework)" /> | |
| </ItemGroup> | |
| </Target> | |
| <Target Name="_UpdatePackagesSingleTfm" DependsOnTargets="_CollectPackagesToUpdate" Condition="'$(TargetFramework)' != '' and '$(TargetFrameworks)' == ''"> |