Skip to content
Open
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
3 changes: 1 addition & 2 deletions PortableLib/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"projects": [ "src" ],
"sdk": {
"version": "1.1.0"
"version": "2.0.2"
}
}
8 changes: 5 additions & 3 deletions PortableLib/src/Sample/Sample.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard1.6;net461</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<DebugType>portable</DebugType>
<PreserveCompilationContext>true</PreserveCompilationContext>
<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.1</NetStandardImplicitPackageVersion>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard2.0' ">$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+net461+win8</PackageTargetFallback>
<NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard2.0' ">2.0.1</NetStandardImplicitPackageVersion>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
</ItemGroup>
</Project>
5 changes: 5 additions & 0 deletions PortableLib/src/WpfApplication/WpfApplication.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@
<Name>Sample</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="NETStandard.Library">
<Version>2.0.1</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
3 changes: 1 addition & 2 deletions cakebuild/NuGet.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!-- clear / -->
<add key="AspNetCore" value="https://dotnet.myget.org/F/aspnetcore-master/api/v3/index.json" />
<clear />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
4 changes: 2 additions & 2 deletions cakebuild/build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ var buildArtifacts = Directory("./artifacts/packages");

var isAppVeyor = AppVeyor.IsRunningOnAppVeyor;
var isWindows = IsRunningOnWindows();
var netcore = "netcoreapp1.1";
var netstandard = "netstandard1.6";
var netcore = "netcoreapp2.0";
var netstandard = "netstandard2.0";

///////////////////////////////////////////////////////////////////////////////
// Clean
Expand Down
3 changes: 1 addition & 2 deletions cakebuild/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.1.0"
"version": "2.0.2"
}
}
6 changes: 3 additions & 3 deletions cakebuild/src/Sample/Sample.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<TargetFramework>netcoreapp2.0</TargetFramework>
<DebugType>portable</DebugType>
<PreserveCompilationContext>true</PreserveCompilationContext>
<AssemblyName>Sample</AssemblyName>
<PackageId>Sample</PackageId>
<RuntimeFrameworkVersion>1.1.2</RuntimeFrameworkVersion>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.4;portable-net451+win8</PackageTargetFallback>
<RuntimeFrameworkVersion>2.0.0</RuntimeFrameworkVersion>
<PackageTargetFallback>$(PackageTargetFallback)</PackageTargetFallback>
</PropertyGroup>

</Project>
11 changes: 6 additions & 5 deletions cakebuild/test/Sample.Tests/Sample.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<TargetFramework>netcoreapp2.0</TargetFramework>
<DebugType>portable</DebugType>
<AssemblyName>Sample.Tests</AssemblyName>
<PackageId>Sample.Tests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.4;portable-net451+win8</PackageTargetFallback>
<RuntimeFrameworkVersion>1.1.2</RuntimeFrameworkVersion>
<PackageTargetFallback>$(PackageTargetFallback)</PackageTargetFallback>
<RuntimeFrameworkVersion>2.0.0</RuntimeFrameworkVersion>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Sample\Sample.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="xunit" Version="2.2.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.1.1" />
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
</ItemGroup>

</Project>
3 changes: 1 addition & 2 deletions console/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"projects": [ "src" ],
"sdk": {
"version": "1.1.0"
"version": "2.0.2"
}
}
8 changes: 4 additions & 4 deletions console/src/src.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<TargetFramework>netcoreapp2.0</TargetFramework>
<DebugType>portable</DebugType>
<AssemblyName>src</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>src</PackageId>
<PackageTargetFallback>$(PackageTargetFallback)</PackageTargetFallback>
<RuntimeFrameworkVersion>1.1.2</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion>2.0.0</RuntimeFrameworkVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.3.0" />
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.4.0" />
</ItemGroup>

</Project>
14 changes: 7 additions & 7 deletions ef/NuGet.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
3 changes: 1 addition & 2 deletions ef/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"projects": [ "src" ],
"sdk": {
"version": "1.1.0"
"version": "2.0.2"
}
}
22 changes: 11 additions & 11 deletions ef/src/Models/Company.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System.Collections.Generic;
namespace ef.Models
{
public class Company
{
public int id { get; set; }
public string Name { get; set; }
public int Capital { get; set; }
public List<Employee> Employees { get; set; }
}
using System.Collections.Generic;

namespace ef.Models
{
public class Company
{
public int id { get; set; }
public string Name { get; set; }
public int Capital { get; set; }
public List<Employee> Employees { get; set; }
}
}
4 changes: 3 additions & 1 deletion ef/src/Models/CoreExampleContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace ef.Models
{
using System;

public class CoreExampleContext : DbContext
{
public DbSet<Company> Company { get; set; }
Expand Down Expand Up @@ -42,7 +44,7 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
}
if (dbkind.Equals("inmemory"))
{
optionsBuilder.UseInMemoryDatabase();
optionsBuilder.UseInMemoryDatabase(Guid.NewGuid().ToString());
}
}
}
Expand Down
20 changes: 10 additions & 10 deletions ef/src/Models/Employee.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System.Collections.Generic;
namespace ef.Models
{
public class Employee
{
public int id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
}
using System.Collections.Generic;

namespace ef.Models
{
public class Employee
{
public int id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
}
}
5 changes: 4 additions & 1 deletion ef/src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ namespace ef
{
public class Program
{
/*
private static DbContextOptions<CoreExampleContext> CreateNewContextOptions()
{
var serviceProvider = new ServiceCollection()
Expand All @@ -27,6 +28,8 @@ private static DbContextOptions<CoreExampleContext> CreateNewContextOptions()

return builder.Options;
}
*/

private static IConfigurationRoot Configuration { get; set; }
private static IHostingEnvironment HostingEnvironment { get; set; }

Expand Down Expand Up @@ -73,7 +76,7 @@ public static void Main(string[] args)
service.AddEntityFrameworkInMemoryDatabase();
service.AddDbContext<CoreExampleContext>(options =>
{
options.UseInMemoryDatabase();
options.UseInMemoryDatabase(Guid.NewGuid().ToString());
});
}

Expand Down
2 changes: 1 addition & 1 deletion ef/src/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Data": {
"DefaultConnection": {
"ConnectionDBString": "sqlite",
"ConnectionString": "Data Source=..\\..\\..\\db.sqlite"
"ConnectionString": "Data Source=db.sqlite"
}
/*
"DefaultConnection": {
Expand Down
50 changes: 20 additions & 30 deletions ef/src/src.csproj
Original file line number Diff line number Diff line change
@@ -1,46 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<TargetFramework>netcoreapp2.0</TargetFramework>
<DebugType>portable</DebugType>
<AssemblyName>src</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>src</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;portable-net45+win8</PackageTargetFallback>
<RuntimeIdentifiers>win10-x64;osx.10.11-x64;ubuntu.16.04-x64</RuntimeIdentifiers>
<RuntimeFrameworkVersion>1.1.2</RuntimeFrameworkVersion>
<PackageTargetFallback>$(PackageTargetFallback);</PackageTargetFallback>
<RuntimeIdentifiers>win7-x86;win10-x64;osx.10.11-x64;ubuntu.16.04-x64</RuntimeIdentifiers>
<RuntimeFrameworkVersion>2.0.0</RuntimeFrameworkVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.1.2">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="1.1.2" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="1.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.1">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.Design" Version="1.1.2">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Design" Version="1.1.2">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.Design" Version="1.1.1">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.0.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.Design" Version="2.0.0-preview1-final" PrivateAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Design" Version="2.0.0-preview1-final" PrivateAssets="All" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.Design" Version="2.0.0-preview1" PrivateAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.0.0" />
</ItemGroup>

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

</Project>
3 changes: 1 addition & 2 deletions scaffold/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"projects": [ "src" ],
"sdk": {
"version": "1.1.0"
"version": "2.0.2"
}
}
4 changes: 3 additions & 1 deletion scaffold/src/scaffold.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
dotnet ef dbcontext scaffold "Data Source=..\..\..\db.sqlite" Microsoft.EntityFrameworkCore.Sqlite -o Models
dotnet ef dbcontext scaffold "Data Source=db.sqlite" Microsoft.EntityFrameworkCore.Sqlite -o Models
dotnet ef dbcontext scaffold "Data Source=db.sqlite" Microsoft.EntityFrameworkCore.Sqlite -o Models -t Company
dotnet ef dbcontext scaffold "Data Source=db.sqlite" Microsoft.EntityFrameworkCore.Sqlite -o Models -c AbcDbContext
Loading