Skip to content
This repository has been archived by the owner on Jan 24, 2020. It is now read-only.

Commit

Permalink
upgraded to .NET Core SDK 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mrellipse committed Apr 21, 2017
1 parent 37f82b6 commit 8085843
Show file tree
Hide file tree
Showing 18 changed files with 235 additions and 222 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"**/obj": true,
"**/*.Designer.cs": true,
"**/*.lock.json": true
}
},
"terminal.integrated.setLocaleVariables": true
}
68 changes: 26 additions & 42 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,79 +1,63 @@
{
"version": "0.1.0",
"command": "cmd",
"isShellCommand": true,
"args": [
"/C"
],
"options": {
"cwd": "${workspaceRoot}/src/ui"
},
"showOutput": "always",
"suppressTaskName": true,
"tasks": [
{
"taskName": "dev build",
"command": "cmd",
"isShellCommand": true,
"args": [
"/C",
"dotnet",
"build",
"${workspaceRoot}/src/server/project.json"
"${workspaceRoot}/src/server/server.csproj"
],
"isBuildCommand": false,
"problemMatcher": "$msCompile"
},
{
"taskName": "test",
"command": "cmd",
"isShellCommand": true,
"args": [
"/C",
"dotnet",
"test",
"${workspaceRoot}/test/common.tests"
"${workspaceRoot}/test/test-common/test-common.csproj"
],
"isTestCommand": true,
"problemMatcher": "$msCompile"
},
{
"taskName": "dev build ui",
"command": "webpack",
"isShellCommand": true,
"args": [
"webpack",
"-p",
"--config",
"webpack/development.js"
],
"showOutput": "always",
"options": {
"cwd": "${workspaceRoot}/src/ui"
},
"isBuildCommand": true
},
{
"taskName": "publish",
"command": "cmd",
"isShellCommand": true,
"args": [
"dotnet",
"publish",
"${workspaceRoot}/src/server/project.json",
"-o",
"${workspaceRoot}/dist",
"--configuration",
"release"
"/C",
"powershell",
"Set-ExecutionPolicy -ExecutionPolicy Bypass",
"|",
"powershell",
"${workspaceRoot}/build/production.ps1"
],
"isBuildCommand": false,
"problemMatcher": "$msCompile"
},
{
"taskName": "publish ui",
"args": [
"webpack",
"-p",
"--config",
"webpack/production.js"
],
"isBuildCommand": true
},
{
"taskName": "watch",
"args": [
"node",
"node_modules/webpack-build/lib/bin/webpack-build.js",
"--c",
"./webpack/watch.js",
"--watch"
]
"options": {
"cwd": "${workspaceRoot}/src/ui"
},
"isBuildCommand": false
}
]
}
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ These instructions will get a copy of the project up and running on your local m

### Prerequisites

* [.NET Core SDK](https://www.microsoft.com/net/core/#windowscmd)
* [.NET Core SDK 1.0.1](https://www.microsoft.com/net/core/#windowscmd)
* [Visual Studio Code](https://code.visualstudio.com/download/) (or a similar text-based editor like Sublime)
* [TypeScript](https://www.typescriptlang.org/)
* [Node.js](https://nodejs.org/en/)
Expand All @@ -27,11 +27,11 @@ These instructions will get a copy of the project up and running on your local m
### Installing

#### Project Dependencies
Update and build the .NET Core projects by switching to the root directory of the solution and running
Update and build the .NET Core projects by switching to to ./src/server and running

```DOS
dotnet restore ./src
dotnet build ./src/server/project.json
dotnet restore
dotnet build
```

Update and build the TypeScript UI project by switching to ./src/ui and running
Expand All @@ -58,6 +58,7 @@ dotnet ef --startup-project ../server migrations add Initial -c NpgSqlContext
```

##### For SQL Server

* update <data:connectionString>* configuration key inside *./src/server/app.development.json*
* update the `ConfigureServices()` method in *./src/server/startup.cs*, and uncomment the code block starting `services.AddDbContext<MsSqlContext>`
* add the same connection string details to *./src/data/mssql.json* (required for EF tooling)
Expand Down Expand Up @@ -85,9 +86,10 @@ To configure the
To remove a provider from appearing the UI, edit `externalProviders` class property in *login.ts*

##### Startup
Run the following command
Run the project by switching to ./src/server and running

```DOS
dotnet run -p ./src/server/project.json -c Development
dotnet run -p server.csproj -c Development
```
You should now be able to load the site at [https://localhost:5000/](https://localhost:5000/)

Expand Down
6 changes: 6 additions & 0 deletions build/production.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Push-Location ../server
dotnet publish server.csproj -f netcoreapp1.1 -o ../../dist --configuration Release
Pop-Location
Push-Location ../ui
webpack -p --config webpack/production.js
Pop-Location
20 changes: 20 additions & 0 deletions src/common/common.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard1.6</TargetFramework>
<DebugType>portable</DebugType>
<AssemblyName>Toucan.Common</AssemblyName>
<PackageId>common</PackageId>
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\contract\contract.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="1.1.1" />
<PackageReference Include="StructureMap.Microsoft.DependencyInjection" Version="1.2.0" />
</ItemGroup>

</Project>
21 changes: 0 additions & 21 deletions src/common/project.json

This file was deleted.

15 changes: 15 additions & 0 deletions src/contract/contract.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard1.6</TargetFramework>
<DebugType>portable</DebugType>
<AssemblyName>Toucan.Contract</AssemblyName>
<PackageId>contract</PackageId>
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Security.Claims" Version="4.3.0" />
</ItemGroup>

</Project>
17 changes: 0 additions & 17 deletions src/contract/project.json

This file was deleted.

33 changes: 33 additions & 0 deletions src/data/data.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard1.6</TargetFramework>
<DebugType>portable</DebugType>
<AssemblyName>Toucan.Data</AssemblyName>
<PackageId>data</PackageId>
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\common\common.csproj" />
<ProjectReference Include="..\contract\contract.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="1.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="1.1.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="1.1.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.Design" Version="1.1.0" />
<PackageReference Include="StructureMap.Microsoft.DependencyInjection" Version="1.2.0" />
</ItemGroup>

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

</Project>
2 changes: 1 addition & 1 deletion src/data/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
}
},
"tools": {
"Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final"
"Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0"
}
}
73 changes: 0 additions & 73 deletions src/server/project.json

This file was deleted.

Loading

0 comments on commit 8085843

Please sign in to comment.