Skip to content

Commit

Permalink
.NET 5
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolayPianikov authored and NikolayPianikov committed Nov 10, 2020
1 parent d2d00fd commit 564d587
Show file tree
Hide file tree
Showing 15 changed files with 1,722 additions and 1,616 deletions.
4 changes: 2 additions & 2 deletions IoC.AspNetCore.Source/IoC.AspNetCore.Source.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp3.1'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.9" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.10" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net5.0' AND '$(Configuration)'=='Debug'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0-preview.7.20364.11" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net45' or '$(TargetFramework)'=='netstandard1.0'">
Expand Down
4 changes: 2 additions & 2 deletions IoC.AspNetCore/IoC.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp3.1'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.9" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.10" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net5.0'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0-preview.7.20364.11" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net45' or '$(TargetFramework)'=='netstandard1.0'">
Expand Down
2 changes: 1 addition & 1 deletion IoC.Performance.Tests/IoC.Performance.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2">
<PrivateAssets>all</PrivateAssets>
Expand Down
6 changes: 3 additions & 3 deletions IoC.Tests/IoC.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

<Otherwise>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Include="Moq" Version="4.10.1" />
<PackageReference Include="xunit" Version="2.4.1" />
</ItemGroup>
Expand All @@ -49,15 +49,15 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.2.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp3.1'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.9" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.10" />
<ProjectReference Include="..\IoC.AspNetCore\IoC.AspNetCore.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net48'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="1.1.1" />
<ProjectReference Include="..\IoC.AspNetCore\IoC.AspNetCore.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net5.0' AND '$(Configuration)'=='Debug'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0-preview.7.20364.11" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
<ProjectReference Include="..\IoC.AspNetCore\IoC.AspNetCore.csproj" />
</ItemGroup>
<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions Samples/BlazorServerApp/BlazorServerApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0-preview.7.20364.11" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="5.0.0-preview.7.20364.11" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.9" />
</ItemGroup>

Expand Down
3 changes: 3 additions & 0 deletions Samples/BlazorServerApp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build
WORKDIR /src
COPY ["Samples/BlazorServerApp/BlazorServerApp.csproj", "Samples/BlazorServerApp/"]
COPY ["IoC.AspNetCore/IoC.AspNetCore.csproj", "IoC.AspNetCore/"]
COPY ["IoC/IoC.csproj", "IoC/"]
COPY ["Samples/Clock/Clock.csproj", "Samples/Clock/"]
RUN dotnet restore "Samples/BlazorServerApp/BlazorServerApp.csproj"
COPY . .
WORKDIR "/src/Samples/BlazorServerApp"
Expand Down
14 changes: 9 additions & 5 deletions Samples/BlazorWebAssemblyApp/BlazorWebAssemblyApp.csproj
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<UseBlazorWebAssembly>true</UseBlazorWebAssembly>
<BlazorCacheBootResources>false</BlazorCacheBootResources>
<UserSecretsId>e1a1f684-8f14-4777-b56d-0f6526dc6727</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..</DockerfileContext>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0-preview.7.20365.19" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.0-preview.7.20365.19" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="5.0.0-preview.7.20364.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.9" />
<PackageReference Include="System.Net.Http.Json" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
25 changes: 25 additions & 0 deletions Samples/BlazorWebAssemblyApp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build
WORKDIR /src
COPY ["Samples/BlazorWebAssemblyApp/BlazorWebAssemblyApp.csproj", "Samples/BlazorWebAssemblyApp/"]
COPY ["IoC.AspNetCore/IoC.AspNetCore.csproj", "IoC.AspNetCore/"]
COPY ["IoC/IoC.csproj", "IoC/"]
COPY ["Samples/Clock/Clock.csproj", "Samples/Clock/"]
RUN dotnet restore "Samples/BlazorWebAssemblyApp/BlazorWebAssemblyApp.csproj"
COPY . .
WORKDIR "/src/Samples/BlazorWebAssemblyApp"
RUN dotnet build "BlazorWebAssemblyApp.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "BlazorWebAssemblyApp.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "BlazorWebAssemblyApp.dll"]
19 changes: 13 additions & 6 deletions Samples/BlazorWebAssemblyApp/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,26 @@
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"
},
"BlazorWebAssemblyApp": {
"commandName": "Project",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
"publishAllPorts": true,
"useSSL": true
}
}
}
}
6 changes: 3 additions & 3 deletions Samples/Clock.Tests/Clock.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
<PackageReference Include="Moq" Version="4.14.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Include="Moq" Version="4.15.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="Shouldly" Version="3.0.2" />
<PackageReference Include="Shouldly" Version="4.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Samples/EntityFrameworkCore/EntityFrameworkCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.0-rc.1.20451.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion Samples/WpfAppNetCore/WpfAppNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<StartupObject>WpfAppNetCore.App</StartupObject>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit 564d587

Please sign in to comment.