Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
An Amazon Elastic Beanstalk .ebextensions config to get .NET Core 2.0 working on existing AMIs (http://xm.x-infinity.com/2017/08/net-core-20-in-aws-elasticbeanstalk.html)
files:
"C:\\Users\\Administrator\\Documents\\installnetcore2.ps1":
content: |
if (!(Test-Path -path 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.0\')) {
$url = "https://download.microsoft.com/download/B/1/D/B1D7D5BF-3920-47AA-94BD-7A6E48822F18/DotNetCore.2.0.0-WindowsHosting.exe"
$path = "C:\Users\Administrator\Downloads\DotNetCore.2.0.0-WindowsHosting.exe"
(New-Object System.Net.WebClient).DownloadFile($url, $path)
&$path /quiet
Start-Sleep -s 5
Remove-Item $path
}
commands:
install_netcore2:
command: powershell.exe -ExecutionPolicy ByPass -File C:\Users\Administrator\Documents\installnetcore2.ps1
<ItemGroup>
<None Include=".ebextensions\netcore2.config" CopyToPublishDirectory="preserveNewest" />
</ItemGroup>
@onyxmaster

This comment has been minimized.

Show comment
Hide comment
@onyxmaster

onyxmaster Aug 17, 2017

When using AWS Toolikt for Visual Studio 2017 you can publish your ASP.NET Core apps to AWS using Elastic Beanstalk.
Unfortunately, at this time the AMIs do not support .NET Core 2.0.
Fortunately, you do not have to wait, just add netcore2.config to .ebextensions/netcore2.config in your project, and modify the .csproj as shown above.

Owner

onyxmaster commented Aug 17, 2017

When using AWS Toolikt for Visual Studio 2017 you can publish your ASP.NET Core apps to AWS using Elastic Beanstalk.
Unfortunately, at this time the AMIs do not support .NET Core 2.0.
Fortunately, you do not have to wait, just add netcore2.config to .ebextensions/netcore2.config in your project, and modify the .csproj as shown above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment