Unverified Commit 68b5c358 authored by Lemon's avatar Lemon Committed by GitHub

Support ASP.NET Core v2.0.0 (#32)

* Fix sample

* Downgrade dependencies
parent 8cec412e
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
<ItemGroup> <ItemGroup>
<Folder Include="wwwroot\" /> <Folder Include="wwwroot\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.6" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.3" /> <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.3" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\src\SkyWalking.AspNetCore\SkyWalking.AspNetCore.csproj" /> <ProjectReference Include="..\..\src\SkyWalking.AspNetCore\SkyWalking.AspNetCore.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
</ItemGroup>
</Project> </Project>
\ No newline at end of file
using System; using System.Collections.Generic;
using System.Collections.Generic; using System.Net.Http;
using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using SkyWalking.AspNetCore;
namespace SkyWalking.Sample.Frontend.Controllers namespace SkyWalking.Sample.Frontend.Controllers
{ {
...@@ -12,9 +10,9 @@ namespace SkyWalking.Sample.Frontend.Controllers ...@@ -12,9 +10,9 @@ namespace SkyWalking.Sample.Frontend.Controllers
{ {
// GET api/values // GET api/values
[HttpGet] [HttpGet]
public async Task<IEnumerable<string>> Get([FromServices] TracingHttpClient httpClient) public async Task<IEnumerable<string>> Get()
{ {
await httpClient.HttpClient.GetAsync("http://localhost:5002/api/values"); await new HttpClient().GetAsync("http://localhost:5002/api/values");
return new string[] {"value1", "value2"}; return new string[] {"value1", "value2"};
} }
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
<ItemGroup> <ItemGroup>
<Folder Include="wwwroot\" /> <Folder Include="wwwroot\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.6" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.3" /> <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.3" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\src\SkyWalking.AspNetCore\SkyWalking.AspNetCore.csproj" /> <ProjectReference Include="..\..\src\SkyWalking.AspNetCore\SkyWalking.AspNetCore.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
</ItemGroup>
</Project> </Project>
\ No newline at end of file
...@@ -15,4 +15,7 @@ ...@@ -15,4 +15,7 @@
<ProjectReference Include="..\SkyWalking.NetworkProtocol.Trace\SkyWalking.NetworkProtocol.Trace.csproj" /> <ProjectReference Include="..\SkyWalking.NetworkProtocol.Trace\SkyWalking.NetworkProtocol.Trace.csproj" />
<ProjectReference Include="..\SkyWalking.NetworkProtocol\SkyWalking.NetworkProtocol.csproj" /> <ProjectReference Include="..\SkyWalking.NetworkProtocol\SkyWalking.NetworkProtocol.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="NETStandard.Library" Version="2.0.0" />
</ItemGroup>
</Project> </Project>
\ No newline at end of file
...@@ -12,14 +12,14 @@ ...@@ -12,14 +12,14 @@
<RootNamespace>SkyWalking.AspNetCore</RootNamespace> <RootNamespace>SkyWalking.AspNetCore</RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.1.0-preview2-final" /> <PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.1.0-preview2-final" /> <PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.1.0-preview2-final" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.DiagnosticAdapter" Version="2.1.0-preview2-final" /> <PackageReference Include="Microsoft.Extensions.DiagnosticAdapter" Version="2.1.0-preview2-final" />
<PackageReference Include="Microsoft.Extensions.Http" Version="2.1.0-preview2-final" /> <PackageReference Include="Microsoft.Extensions.Http" Version="2.1.0-preview2-final" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.1.0-preview2-final" /> <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.1.0-preview2-final" />
<PackageReference Include="Microsoft.Extensions.Options" Version="2.1.0-preview2-final" /> <PackageReference Include="Microsoft.Extensions.Options" Version="2.1.0-preview2-final" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.1.0-preview2-final" /> <PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\SkyWalking.Core\SkyWalking.Core.csproj" /> <ProjectReference Include="..\SkyWalking.Core\SkyWalking.Core.csproj" />
......
...@@ -20,6 +20,7 @@ using System; ...@@ -20,6 +20,7 @@ using System;
using System.Diagnostics; using System.Diagnostics;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using SkyWalking.Boot; using SkyWalking.Boot;
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<ProjectReference Include="..\SkyWalking.Abstractions\SkyWalking.Abstractions.csproj" /> <ProjectReference Include="..\SkyWalking.Abstractions\SkyWalking.Abstractions.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="NETStandard.Library" Version="2.0.0" />
<PackageReference Include="Nito.AsyncEx.Coordination" Version="5.0.0-pre-05" /> <PackageReference Include="Nito.AsyncEx.Coordination" Version="5.0.0-pre-05" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="4.4.1" /> <PackageReference Include="System.Diagnostics.DiagnosticSource" Version="4.4.1" />
</ItemGroup> </ItemGroup>
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.DiagnosticAdapter" Version="2.1.0-preview2-final" /> <PackageReference Include="Microsoft.Extensions.DiagnosticAdapter" Version="2.1.0-preview2-final" />
<PackageReference Include="NETStandard.Library" Version="2.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\SkyWalking.Abstractions\SkyWalking.Abstractions.csproj" /> <ProjectReference Include="..\SkyWalking.Abstractions\SkyWalking.Abstractions.csproj" />
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<ProjectReference Include="..\SkyWalking.Core\SkyWalking.Core.csproj" /> <ProjectReference Include="..\SkyWalking.Core\SkyWalking.Core.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.1.0-preview2-final" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.0.0" />
<PackageReference Include="NETStandard.Library" Version="2.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\build\common.props" /> <Import Project="..\..\build\common.props" />
<PropertyGroup> <PropertyGroup>
<Description>SkyWalking trace protocol.</Description> <Description>SkyWalking trace protocol.</Description>
<AssemblyTitle>SkyWalking.NetworkProtocol.Trace</AssemblyTitle> <AssemblyTitle>SkyWalking.NetworkProtocol.Trace</AssemblyTitle>
...@@ -9,7 +7,10 @@ ...@@ -9,7 +7,10 @@
<AssemblyName>SkyWalking.NetworkProtocol.Trace</AssemblyName> <AssemblyName>SkyWalking.NetworkProtocol.Trace</AssemblyName>
<PackageId>SkyWalking.NetworkProtocol.Trace</PackageId> <PackageId>SkyWalking.NetworkProtocol.Trace</PackageId>
<PackageTags>SkyWalking</PackageTags> <PackageTags>SkyWalking</PackageTags>
<PackageReleaseNotes></PackageReleaseNotes> <PackageReleaseNotes>
</PackageReleaseNotes>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
</Project> <PackageReference Include="NETStandard.Library" Version="2.0.0" />
</ItemGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\build\common.props" /> <Import Project="..\..\build\common.props" />
<PropertyGroup> <PropertyGroup>
<Description>SkyWalking gRPC protocol and generated codes.</Description> <Description>SkyWalking gRPC protocol and generated codes.</Description>
<AssemblyTitle>SkyWalking.NetworkProtocol</AssemblyTitle> <AssemblyTitle>SkyWalking.NetworkProtocol</AssemblyTitle>
...@@ -9,13 +7,14 @@ ...@@ -9,13 +7,14 @@
<AssemblyName>SkyWalking.NetworkProtocol</AssemblyName> <AssemblyName>SkyWalking.NetworkProtocol</AssemblyName>
<PackageId>SkyWalking.NetworkProtocol</PackageId> <PackageId>SkyWalking.NetworkProtocol</PackageId>
<PackageTags>SkyWalking</PackageTags> <PackageTags>SkyWalking</PackageTags>
<PackageReleaseNotes></PackageReleaseNotes> <PackageReleaseNotes>
</PackageReleaseNotes>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.5.1" /> <PackageReference Include="Google.Protobuf" Version="3.5.1" />
<PackageReference Include="Google.Protobuf.Tools" Version="3.5.1" /> <PackageReference Include="Google.Protobuf.Tools" Version="3.5.1" />
<PackageReference Include="Grpc" Version="1.9.0" /> <PackageReference Include="Grpc" Version="1.9.0" />
<PackageReference Include="Grpc.Tools" Version="1.9.0" /> <PackageReference Include="Grpc.Tools" Version="1.9.0" />
<PackageReference Include="NETStandard.Library" Version="2.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment