CheapASPNETHostingReview.com | Best and cheap ASP.NET Core 1.1 hosting. This blog shows how to setup a basic ASP.NET Core 1.1 application using Visual studio 2017 and Docker.
Now the application needs to be updated to ASP.NET Core 1.1. Open the csproj file and update the PackageReference and also the TargetFramework to the 1.1 packages and target. At present, there is no help when updating the packages, like the project.json file had, so you need to know exactly what packages to use when updating directly.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | <Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>netcoreapp1.1</TargetFramework> <PreserveCompilationContext>true</PreserveCompilationContext> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.0" /> <PackageReference Include="Microsoft.AspNetCore.Routing" Version="1.1.0" /> <PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.1.0" /> <PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.1.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.1.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="1.1.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.0" /> <PackageReference Include="Microsoft.Extensions.Logging" Version="1.1.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.0" /> <PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="1.1.0" /> </ItemGroup> </Project> |
1 2 3 4 5 6 7 8 9 | version: '2' services: ci-build: image: microsoft/aspnetcore-build:1.1.0-msbuild volumes: - .:/src working_dir: /src command: /bin/bash -c "dotnet restore && dotnet publish -c Release -o ./bin/Release/PublishOutput" |
1 2 3 4 5 6 | FROM microsoft/aspnetcore:1.1.0 ARG source WORKDIR /app EXPOSE 80 COPY ${source:-bin/Release/PublishOutput} . ENTRYPOINT ["dotnet", "AspNetCoreVS2017Docker.dll"] |
Notes:
When setting up Docker, you need to share the C drive in Docker.