Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Commit

Permalink
Converted samples and test projects to run on netcoreapp2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kichalla committed Apr 4, 2017
1 parent 60f009f commit 200207b
Show file tree
Hide file tree
Showing 48 changed files with 65 additions and 55 deletions.
1 change: 1 addition & 0 deletions build/dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
<NowinVersion>0.11.0</NowinVersion>
<OwinVersion>3.0.1</OwinVersion>
<RuntimeFrameworkVersion>2.0.0-*</RuntimeFrameworkVersion>
<TestSdkVersion>15.0.0</TestSdkVersion>
<XunitVersion>2.2.0</XunitVersion>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/Antiforgery.Angular1/Antiforgery.Angular1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>netcoreapp1.1;net46</TargetFrameworks>
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/Builder.Filtering.Web/Builder.Filtering.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
<OutputType>Exe</OutputType>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/Config.Providers.Web/Config.Providers.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/Content.Upload.Files/Content.Upload.Files.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/Content.Upload.Form/Content.Upload.Form.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/Data.InMemory/Data.InMemory.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
<OutputType>Exe</OutputType>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion samples/Data.SqlServer/Data.SqlServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
<OutputType>Exe</OutputType>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 7 additions & 1 deletion samples/Localization.CustomResourceManager/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ public void Configure(
new CultureInfo("zh"),
new CultureInfo("zh-CN")
};
#if !NETCOREAPP1_1
#if NET46
supportedCultures.Add(new CultureInfo("zh-CHT"));
#elif NETCOREAPP2_0
#else
#error Target framework needs to be updated
#endif
var options = new RequestLocalizationOptions
{
Expand Down Expand Up @@ -174,6 +177,9 @@ private static async System.Threading.Tasks.Task WriteCultureSelectOptions(HttpC
await context.Response.WriteAsync($" <option value=\"{new CultureInfo("zh-CN").Name}\">{new CultureInfo("zh-CN").DisplayName}</option>");
#if NET46
await context.Response.WriteAsync($" <option value=\"{new CultureInfo("zh-CHT").Name}\">{new CultureInfo("zh-CHT").DisplayName}</option>");
#elif NETCOREAPP2_0
#else
#error Target framework needs to be updated
#endif
await context.Response.WriteAsync($" <option value=\"en-NOTREAL\">English (Not a real locale)</option>");
await context.Response.WriteAsync($" <option value=\"pp-NOTREAL\">Made-up (Not a real anything)</option>");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 6 additions & 0 deletions samples/Localization.EntityFramework/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public void Configure(IApplicationBuilder app, IStringLocalizerFactory localizer
};
#if NET46
supportedCultures.Add(new CultureInfo("zh-CHT"));
#elif NETCOREAPP2_0
#else
#error Target framework needs to be updated
#endif
var options = new RequestLocalizationOptions {
DefaultRequestCulture = new RequestCulture("en-US"),
Expand Down Expand Up @@ -148,6 +151,9 @@ private static async System.Threading.Tasks.Task WriteCultureSelectOptions(HttpC
await context.Response.WriteAsync($" <option value=\"{new CultureInfo("zh-CN").Name}\">{new CultureInfo("zh-CN").DisplayName}</option>");
#if NET46
await context.Response.WriteAsync($" <option value=\"{new CultureInfo("zh-HanT").Name}\">{new CultureInfo("zh-HanT").DisplayName}</option>");
#elif NETCOREAPP2_0
#else
#error Target framework needs to be updated
#endif
await context.Response.WriteAsync($" <option value=\"en-NOTREAL\">English (Not a real locale)</option>");
await context.Response.WriteAsync($" <option value=\"pp-NOTREAL\">Made-up (Not a real anything)</option>");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
<UserSecretsId>aspnet5-Localization.StarterWeb-4772c50f-56f3-4058-bd61-75f1352aeca7</UserSecretsId>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion samples/Logging.Elm/Logging.Elm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/MusicStore.Spa/MusicStore.Spa.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<IsPackable>false</IsPackable>
<Description>Music store application on ASP.NET Core as a SPA</Description>
<Authors>Microsoft</Authors>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/Mvc.FileUpload/Mvc.FileUpload.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFramework>netcoreapp1.1</TargetFramework>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/Mvc.Formatters/Mvc.Formatters.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFramework>netcoreapp1.1</TargetFramework>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>netcoreapp1.1;net46</TargetFrameworks>
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/Mvc.Modules/Mvc.Modules.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/Mvc.SubAreaSample.Web/Mvc.SubAreaSample.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit 200207b

Please sign in to comment.