HSTS says that the browser must not allow exceptions.
As a user I say that the browser must allow whatever I tell it to allow.
Add this to your userContent.css file to get the button back
<ItemGroup Condition="'$(WebPublishProfileFile)' != ''"> | |
<!-- When publishing, publish only the app settings that match the profile being published --> | |
<Content Update="appsettings.*.json" CopyToPublishDirectory="Never" /> | |
<Content Update="appsettings.$([System.IO.Path]::GetFileNameWithoutExtension('$(WebPublishProfileFile)')).json" CopyToPublishDirectory="Always" /> | |
</ItemGroup> |
HSTS says that the browser must not allow exceptions.
As a user I say that the browser must allow whatever I tell it to allow.
Add this to your userContent.css file to get the button back
<Project> | |
<ItemGroup> | |
<!-- Customise this section to list all the locally developed nugets and which locally built assembly they should be replaced by --> | |
<_ReplacePackageReference Include="Some.Locally.Developed.Nuget" HintPath="C:\Dev\SomeLocalDevFolder\bin\Debug\netstandard2.1\Some.Locally.Developed.Nuget.dll" /> | |
<_ReplacePackageReference Include="Another.Package" HintPath="C:\Dev\SomeOtherDevFolder\bin\Debug\netstandard2.1\Another.dll" /> | |
</ItemGroup> | |
<ItemGroup Condition="'$(Configuration)' == 'DEBUG'"> | |
<_UnwantedReplacements Include="@(_ReplacePackageReference)" Exclude="@(PackageReference)" /> | |
<_PackagesToReplace Include="@(_ReplacePackageReference)" Exclude="@(_UnwantedReplacements)" /> |
It's not obvious how to produce an intersection of two itemgroups in MSBuild. There's this brainteaser solution based on tricky metadata behaviour, but it only works inside a <target>
due to it's use of metadata.
There is another way. Algebra tells us that A ∩ B = A ∖ (A∖B): intersection of A and B is A excluding (A excluding B). This can be expressed in MSBuild as:
<ItemGroup>
<A Include="1" />
<A Include="2" />
<A Include="3" />
Note: .ConfigureAwait(false)
is omitted from all examples here, but due to poor design decisions in C# should be added to every await when writing library code.
Stephen Cleary, whose blog is an excellent resource for Async, describes The Asynchronous Initialization Pattern which is useful when your class has to do something async on construction. Contruction itself can't be async, but after construction (either by explicit new
or being passed an potentially newly constructed instance through DI), you await
the initialisation before using it. Note that the initialisation code starts executing on construction.
interface IAsyncInitialization
{
Task Initialization { get; }
$DownloadLocation = "$env:TEMP\TeamsDownload" | |
$ErrorActionPreference = 'Stop' | |
$DownloadLocation = $DownloadLocation -replace '\\', '/' #Electron wants paths with / | |
$teamsElectronAsar = "$env:LOCALAPPDATA\Microsoft\Teams\current\resources\electron.asar" | |
$tempFolderPath = Join-Path $env:TEMP $(New-Guid) | |
New-Item -Type Directory -Path $tempFolderPath | Out-Null | |
Push-Location $tempFolderPath | |
npm install asar --no-fund --no-audit --no-progress --loglevel=error | |
.\node_modules\.bin\asar extract $teamsElectronAsar .\electron |
Windows Registry Editor Version 5.00 | |
; Adds "Open command prompt" to folder context menu, | |
; and "Open elevated command prompt" to extended folder context menu (Shift+Right Click) | |
; | |
; For elevated command prompt, requires NirCmd <http://www.nirsoft.net/utils/nircmd.html> | |
; to be installed somewhere on the system path. | |
; | |
; Author: Alex Vallat |
export interface IObjectValue<T> { | |
set(value: T): void; | |
get(): T; | |
} | |
export class ObjectValue<K extends keyof T, T> implements IObjectValue<T[K]> { | |
constructor(private readonly object: T, private readonly key: K) {} | |
set(value: T[K]) { this.object[this.key] = value; } | |
get() { return this.object[this.key]; } | |
} |