Supporting .NET Core 3.0 previews

Thomas Ardal's Avatar

Thomas Ardal

14 Aug, 2019 06:34 PM

Does anyone know if it is possible to target newer previews of .NET Core 3 when targeting the Visual Studio 2019 Preview image? I'm trying the following YAML:

image: Visual Studio 2019 Preview
before_build:
- ps: dotnet --list-sdks

which generates a long list of old .NET Core versions + this one from 3.0:

3.0.100-preview-009812

I would like to be able to target preview 7 (3.0.100-preview7-012821) or maybe even preview 8.

  1. 1 Posted by Christian Olsen on 21 Aug, 2019 02:08 PM

    Christian Olsen's Avatar

    I second that question, any insight or help to get a newer version of the .Net Core 3 preview SDK would be greatly appreciated.

  2. 2 Posted by mathieu.cartoix... on 14 Oct, 2019 03:03 PM

    mathieu.cartoixa's Avatar

    A bit late now, but might be useful for other versions. You can install your own version of .NET Core using the dotnet-install script. For instance:

    environment:
      _DOTNET_VERSION: "3.0.100-preview7-012821"
    
    install:
      - ps: "[Net.ServicePointManager]::SecurityProtocol = 'Tls12'"
      - ps: Invoke-WebRequest https://dot.net/v1/dotnet-install.ps1 -OutFile .tmp\dotnet-install.ps1
      - ps: if ((-Not (Test-Path .tmp\dotnet\dotnet.exe)) -or (((.tmp\dotnet\dotnet.exe --version) -Join '') -ne $Env:_DOTNET_VERSION)) { .tmp\dotnet-install.ps1 -Version $Env:_DOTNET_VERSION -InstallDir .tmp\dotnet } else { $Env:path = $Env:APPVEYOR_BUILD_FOLDER + "\.tmp\dotnet\dotnet.exe;" + $Env:path }
    

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac