Version 10.0.17134 Build 17134
- Settings -> Update & Security
- Install all updates
- launch Windows Powershell as administrator and execute:
| if ($env:TEAMCITY_VERSION) { | |
| # When PowerShell is started through TeamCity's Command Runner, the standard | |
| # output will be wrapped at column 80 (a default). This has a negative impact | |
| # on service messages, as TeamCity quite naturally fails parsing a wrapped | |
| # message. The solution is to set a new, much wider output width. It will | |
| # only be set if TEAMCITY_VERSION exists, i.e., if started by TeamCity. | |
| $host.UI.RawUI.BufferSize = New-Object System.Management.Automation.Host.Size(8192,50) | |
| } | |
| function TeamCity-Message([string]$text, [string]$status = 'NORMAL', [string]$errorDetails) { |
| <# | |
| Save to: Create-Kavita-Structure.ps1 | |
| and run it with: .\Create-Kavita-Structure.ps1 -sourceDir 'DriveLetter:\PathToBooks' -kavitaDir 'DriveLetter:\PathToKavitaWatchedDir" | |
| If sourceDir is not specified, assumes current directory (.) | |
| If kavitaDir is not specified, assumes @Kavita under the current directory (.\@Kavita) | |
| To test this without making any changes: Create-Kavita-Structure.ps1 -whatIf | |
| #> | |
| [CmdletBinding(SupportsShouldProcess = $true)] | |
| Param( |
| <# | |
| .NOTES | |
| How to use: Open Visual Studio, go to Tools – External Tools to bring up the External Tools dialog, add a new tools menu with the following configuration: | |
| Title: Manage User Secrets (Or whatever you want) | |
| Command: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe (Path to powershell.exe) | |
| Arguments: Path-to-this-script(e.g. D:\VisualStudioTools\usersecrets.ps1) | |
| Initial Directory: $(ProjectDir) | |
| .PARAMETER ProjectFilePath | |
| The csproj file's path, or keep it empty to search *.csproj file in initial directory |
| /// <summary> | |
| /// Checks if string is empty, null or white space | |
| /// </summary> | |
| /// <param name="value"></param> | |
| /// <returns></returns> | |
| public static bool IsEmpty(this string value) | |
| { | |
| return string.IsNullOrEmpty(value) || string.IsNullOrWhiteSpace(value); | |
| } |
| # Set to preview version if the source branch is not the master branch | |
| isPreviewVersion: ${{ | |
| ne(variables['Build.SourceBranch'], 'refs/heads/master') | |
| }} |
| - task: AzureCLI@2 | |
| name: generateToken | |
| displayName: Generating SAS Token | |
| inputs: | |
| azureSubscription: ${{variables.subscription}} | |
| scriptType: pscore | |
| scriptLocation: inlineScript | |
| inlineScript: | | |
| $sasToken = az storage blob generate-sas ` | |
| --account-name ${{variables.templateStorageAccount}} ` |
| $extensionDisplayName = "Wix Toolset Visual Studio 2017 Extension"; | |
| $extensionApiVersion = "api-version=3.2-preview.1" | |
| $marketplaceQueryUrl = "https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery"; | |
| $extensionQuery = "{`"flags`":`"262`"," + | |
| "`"filters`":[" + | |
| "{" + | |
| "`"criteria`":" + | |
| "[" + | |
| "{`"filterType`":`"14`",`"value`":`"1033`"}," + |
| $linkFilePath = "C:\Users\$([Environment]::UserName)\Desktop\WindowsTerminal.lnk" | |
| $bytes = [System.IO.File]::ReadAllBytes($linkFilePath) | |
| $bytes[0x15] = $bytes[0x15] -bor 0x20 #set byte 21 (0x15) bit 6 (0x20) ON | |
| [System.IO.File]::WriteAllBytes($linkFilePath, $bytes) |
| $EventLogSourceName = "Visual Studio Updater" | |
| if([System.Diagnostics.EventLog]::SourceExists($EventLogSourceName) -eq $false){ | |
| New-EventLog –LogName Application –Source $EventLogSourceName | |
| } | |
| $cacheDirs = @( | |
| "C:\Program Files (x86)\Microsoft Visual Studio\Installer" | |
| ); | |
| foreach($cacheDir in $cacheDirs){ |