Closed cmaslen closed 7 years ago
Can you share your csproj file as well?
Hi @natemcmaster,
Thanks for the reply. Below is the project file:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.3" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.2" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.1" />
</ItemGroup>
</Project>
Also the output of dotnet --info from my own machine which I've noticed is different to the version in the Docker container.
.NET Command Line Tools (2.0.0-preview2-006497)
Product Information:
Version: 2.0.0-preview2-006497
Commit SHA-1 hash: 06a2093335
Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.0.0-preview2-006497\
Microsoft .NET Core Shared Framework Host
Version : 2.0.0-preview2-25407-01
Build : 40c565230930ead58a50719c0ec799df77bddee9
You project is still using AspNetCore 1.1 packages. Upgrade your PackageReference's to 2.0.0-preview2.
Hi @natemcmaster,
That appears to have fixed it although the exact versions are not all preveiw2. Below is my corrected project file:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.0.0-preview2-final" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.0.0-preview2-final" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.0.0-preview2-final" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.1" />
</ItemGroup>
</Project>
Thanks again. I'll try to track down a VS forum to raise the bug in since a project file should not require manual editing when using VS.
After updating my SDK (and companion VS version) to Core 2.0 preview 2 running any ASP.NET Core app in the aspnet-docker container fails. I have tried the following images:
Steps to reproduce the issue
(e.g. copy your Dockerfile or docker-compose.yml file here)
Expected behavior
The application runs as before. The browser window launches pointing to the running app inside the Docker container.
Actual behavior
We get the following exception: System.AggregateException occurred HResult=0x80131500 Message=One or more errors occurred. Source=
StackTrace: