tag:help.appveyor.com,2012-11-13:/discussions/questions/40585-supporting-net-core-30-previewsAppVeyor: Discussion 2019-10-14T15:03:49Ztag:help.appveyor.com,2012-11-13:Comment/475275162019-08-14T18:34:53Z2019-08-14T18:34:55ZSupporting .NET Core 3.0 previews<div><p>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:</p>
<p>image: Visual Studio 2019 Preview<br>
before_build:<br>
- ps: dotnet --list-sdks</p>
<p>which generates a long list of old .NET Core versions + this one from 3.0:</p>
<p>3.0.100-preview-009812</p>
<p>I would like to be able to target preview 7 (3.0.100-preview7-012821) or maybe even preview 8.</p></div>Thomas Ardaltag:help.appveyor.com,2012-11-13:Comment/475275162019-08-21T14:08:35Z2019-08-21T14:08:37ZSupporting .NET Core 3.0 previews<div><p>I second that question, any insight or help to get a newer version of the .Net Core 3 preview SDK would be greatly appreciated.</p></div>Christian Olsentag:help.appveyor.com,2012-11-13:Comment/475275162019-10-14T15:03:47Z2019-10-14T15:03:47ZSupporting .NET Core 3.0 previews<div><p>A bit late now, but might be useful for other versions. You can install your own version of .NET Core using the <a href="https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script"><code>dotnet-install</code> script</a>. For instance:</p>
<pre>
<code>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 }</code>
</pre></div>mathieu.cartoixa