Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NET Core 1.1 Update #19

Merged
merged 14 commits into from
Oct 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DapperSample/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"projects": [ "src" ],
"sdk": {
"version": "1.0.0"
"version": "1.1.0"
}
}
51 changes: 26 additions & 25 deletions DapperSample/src/DapperSample/DapperSample.csproj
Original file line number Diff line number Diff line change
@@ -1,45 +1,46 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
<TargetFramework>netcoreapp1.1</TargetFramework>
<PreserveCompilationContext>true</PreserveCompilationContext>
<AssemblyName>DapperSample</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>DapperSample</PackageId>
<RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion>1.1.2</RuntimeFrameworkVersion>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapper" Version="1.50.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Routing" Version="1.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.0.3" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="1.0.2" />
<PackageReference Include="Swashbuckle" Version="6.0.0-beta902" />
<PackageReference Include="Swashbuckle.Swagger" Version="6.0.0-beta902" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="1.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Design" Version="1.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.Design" Version="1.0.3" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="1.0.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.Design" Version="1.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="1.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.0.3">
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Routing" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="1.1.2" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0" />

<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="1.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Design" Version="1.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.Design" Version="1.1.2" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="1.1.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.Design" Version="1.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="1.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.1.2">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0-preview3-final" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.1" />
<PackageReference Include="Microsoft.Extensions.PlatformAbstractions" Version="1.1.0" />
</ItemGroup>

<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0" />
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.1" />
</ItemGroup>

</Project>
43 changes: 29 additions & 14 deletions DapperSample/src/DapperSample/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Microsoft.Extensions.PlatformAbstractions;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Swashbuckle.Swagger.Model;
using Swashbuckle.AspNetCore.Swagger;
using Swashbuckle.AspNetCore.SwaggerGen;
using Swashbuckle.AspNetCore.SwaggerUI;
using WebApiSample.Models;
using Microsoft.EntityFrameworkCore;

Expand Down Expand Up @@ -68,18 +73,22 @@ public void ConfigureServices(IServiceCollection services)
}
// Add framework services.
services.AddMvc();
services.AddSwaggerGen();
services.ConfigureSwaggerGen(options =>
services.AddSwaggerGen(c =>
{
options.SingleApiVersion(new Info
{
Version = "v1",
Title = "Geo Search API",
Description = "A simple api to search using geo location in Elasticsearch",
TermsOfService = "None"
});
//options.IncludeXmlComments(pathToDoc);
options.DescribeAllEnumsAsStrings();
c.SwaggerDoc("v1",
new Info
{
Version = "v1",
Title = "Geo Search API",
Description = "A simple api to search using geo location in Elasticsearch",
TermsOfService = "None"
}
);

//var filePath = Path.Combine(PlatformServices.Default.Application.ApplicationBasePath, "MyApi.xml");
//c.IncludeXmlComments(filePath);
//c.IncludeXmlComments(pathToDoc);
c.DescribeAllEnumsAsStrings();
});
}

Expand All @@ -91,8 +100,14 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF

app.UseMvc();

app.UseSwagger();
app.UseSwaggerUi();
app.UseSwagger(c =>
{
c.RouteTemplate = "api-docs/{documentName}/swagger.json";
});
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/api-docs/v1/swagger.json", "My API V1");
});
}
}
}
2 changes: 1 addition & 1 deletion GroongaSample/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"projects": [ "src" ],
"sdk": {
"version": "1.0.0"
"version": "1.1.0"
}
}
40 changes: 26 additions & 14 deletions GroongaSample/src/WebApiSample/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Swashbuckle.Swagger.Model;
using Swashbuckle.AspNetCore.Swagger;
using Swashbuckle.AspNetCore.SwaggerGen;
using Swashbuckle.AspNetCore.SwaggerUI;
using WebApiSample.Models;
using Microsoft.EntityFrameworkCore;

Expand Down Expand Up @@ -87,18 +89,22 @@ public void ConfigureServices(IServiceCollection services)
}
// Add framework services.
services.AddMvc();
services.AddSwaggerGen();
services.ConfigureSwaggerGen(options =>
services.AddSwaggerGen(c =>
{
options.SingleApiVersion(new Info
{
Version = "v1",
Title = "Geo Search API",
Description = "A simple api to search using geo location in Elasticsearch",
TermsOfService = "None"
});
//options.IncludeXmlComments(pathToDoc);
options.DescribeAllEnumsAsStrings();
c.SwaggerDoc("v1",
new Info
{
Version = "v1",
Title = "Geo Search API",
Description = "A simple api to search using geo location in Elasticsearch",
TermsOfService = "None"
}
);

//var filePath = Path.Combine(PlatformServices.Default.Application.ApplicationBasePath, "MyApi.xml");
//c.IncludeXmlComments(filePath);
//c.IncludeXmlComments(pathToDoc);
c.DescribeAllEnumsAsStrings();
});
}

Expand All @@ -110,8 +116,14 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF

app.UseMvc();

app.UseSwagger();
app.UseSwaggerUi();
app.UseSwagger(c =>
{
c.RouteTemplate = "api-docs/{documentName}/swagger.json";
});
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/api-docs/v1/swagger.json", "My API V1");
});
}
}
}
48 changes: 24 additions & 24 deletions GroongaSample/src/WebApiSample/WebApiSample.csproj
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
<TargetFramework>netcoreapp1.1</TargetFramework>
<PreserveCompilationContext>true</PreserveCompilationContext>
<AssemblyName>WebApiSample</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>WebApiSample</PackageId>
<RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion>1.1.2</RuntimeFrameworkVersion>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Routing" Version="1.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="1.0.2" />
<PackageReference Include="Swashbuckle" Version="6.0.0-beta902" />
<PackageReference Include="Swashbuckle.Swagger" Version="6.0.0-beta902" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="1.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Design" Version="1.0.3">
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Routing" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="1.1.2" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0" />

<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="1.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Design" Version="1.1.2">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.Design" Version="1.0.3" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="1.0.2" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.Design" Version="1.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="1.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.0.3">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.Design" Version="1.1.2" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="1.1.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.Design" Version="1.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="1.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.1.2">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0" />
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.1" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion PortableLib/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"projects": [ "src" ],
"sdk": {
"version": "1.0.0"
"version": "1.1.0"
}
}
2 changes: 1 addition & 1 deletion PortableLib/src/Sample/Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<AssemblyName>Sample</AssemblyName>
<PackageId>Sample</PackageId>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.6' ">$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+net461+win8</PackageTargetFallback>
<NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard1.6' ">1.6.0</NetStandardImplicitPackageVersion>
<NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard1.6' ">1.6.1</NetStandardImplicitPackageVersion>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
Expand Down
2 changes: 1 addition & 1 deletion WebApiFileUploadSample/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"projects": [ "src" ],
"sdk": {
"version": "1.0.0"
"version": "1.1.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public IActionResult Get(string name)
{
try
{
// issue ? don't download
var val = _dbContext.Values.FirstOrDefault(d => d.Name == name);
return File(val.Image, "image/png");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Swashbuckle.Swagger.Model;
using Swashbuckle.SwaggerGen.Generator;
using Swashbuckle.AspNetCore.Swagger;
using Swashbuckle.AspNetCore.SwaggerGen;


namespace WebApiFileUploadSample
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:64244/swagger/ui/index.html",
"applicationUrl": "http://localhost:64244/swagger/index.html",
"sslPort": 0
}
},
Expand Down
Loading