Skip to content

Commit b67104f

Browse files
authored
Merge pull request #33 from JSkimming/dotnet-core-update
.NET Core Update
2 parents f09adf7 + 68a0993 commit b67104f

File tree

185 files changed

+1295
-1794
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+1295
-1794
lines changed

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
**/obj
2+
**/bin
3+
.vs
4+
*.sh
5+
.git
6+
.gitignore

.editorconfig

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
indent_style = space
5+
insert_final_newline = true
6+
7+
# CSharp and Visual Basic code style settings:
8+
[*.{cs,vb}]
9+
10+
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#this_and_me
11+
dotnet_style_qualification_for_field = false:error
12+
dotnet_style_qualification_for_property = false:error
13+
dotnet_style_qualification_for_method = false:error
14+
dotnet_style_qualification_for_event = false:error
15+
16+
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#language_keywords
17+
dotnet_style_predefined_type_for_locals_parameters_members = true:error
18+
dotnet_style_predefined_type_for_member_access = true:error
19+
20+
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#expression_level
21+
dotnet_style_object_initializer = true:suggestion
22+
dotnet_style_collection_initializer = true:suggestion
23+
dotnet_style_explicit_tuple_names = true:suggestion
24+
dotnet_style_coalesce_expression = true:suggestion
25+
dotnet_style_null_propagation = true:suggestion
26+
27+
# CSharp code style settings:
28+
[*.cs]
29+
30+
max_line_length=119
31+
32+
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#var
33+
csharp_style_var_for_built_in_types = false:error
34+
csharp_style_var_when_type_is_apparent = true:suggestion
35+
csharp_style_var_elsewhere = false:error
36+
37+
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#pattern_matching
38+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
39+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
40+
41+
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#inlined_variable_declarations
42+
csharp_style_inlined_variable_declaration = true:suggestion
43+
44+
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#expression_level_csharp
45+
csharp_prefer_simple_default_expression = true:error
46+
47+
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#null_checking
48+
csharp_style_throw_expression = true:suggestions:
49+
csharp_style_conditional_delegate_call = true:suggestion
50+
51+
# .NET formatting settings:
52+
[*.{cs,vb}]
53+
54+
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#usings
55+
dotnet_sort_system_directives_first = true
56+
57+
# CSharp formatting settings:
58+
[*.cs]
59+
60+
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#newline
61+
csharp_new_line_before_open_brace = methods, properties, control_blocks, types
62+
csharp_new_line_before_else = true
63+
csharp_new_line_before_catch = true
64+
csharp_new_line_before_finally = true
65+
csharp_new_line_before_members_in_object_initializers = true
66+
csharp_new_line_before_members_in_anonymous_types = true
67+
csharp_new_line_between_query_expression_clauses = true
68+
69+
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#indent
70+
csharp_indent_case_contents = true
71+
csharp_indent_switch_labels = true
72+
csharp_indent_labels = flush_left
73+
74+
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#wrapping
75+
csharp_preserve_single_line_statements = false
76+
csharp_preserve_single_line_blocks = true

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto detect text files and perform LF normalization
1+
# Auto detect text files and perform LF normalisation
22
* text=auto
33

44
# Custom for Visual Studio

.gitignore

Lines changed: 59 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## Ignore Visual Studio temporary files, build results, and
22
## files generated by popular Visual Studio add-ons.
3+
##
4+
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
35

46
# User-specific files
57
*.suo
@@ -40,10 +42,14 @@ TestResult.xml
4042
[Rr]eleasePS/
4143
dlldata.c
4244

43-
# DNX
45+
# Benchmark Results
46+
BenchmarkDotNet.Artifacts/
47+
48+
# .NET Core
4449
project.lock.json
4550
project.fragment.lock.json
4651
artifacts/
52+
**/Properties/launchSettings.json
4753

4854
*_i.c
4955
*_p.c
@@ -90,6 +96,9 @@ ipch/
9096
*.vspx
9197
*.sap
9298

99+
# Visual Studio Trace Files
100+
*.e2e
101+
93102
# TFS 2012 Local Workspace
94103
$tf/
95104

@@ -110,6 +119,14 @@ _TeamCity*
110119
# DotCover is a Code Coverage Tool
111120
*.dotCover
112121

122+
# AxoCover is a Code Coverage Tool
123+
.axoCover/*
124+
!.axoCover/settings.json
125+
126+
# Visual Studio code coverage results
127+
*.coverage
128+
*.coveragexml
129+
113130
# NCrunch
114131
_NCrunch_*
115132
.*crunch*.local.xml
@@ -141,7 +158,7 @@ publish/
141158
# Publish Web Output
142159
*.[Pp]ublish.xml
143160
*.azurePubxml
144-
# TODO: Comment the next line if you want to checkin your web deploy settings
161+
# Note: Comment the next line if you want to checkin your web deploy settings,
145162
# but database connection strings (with potential passwords) will be unencrypted
146163
*.pubxml
147164
*.publishproj
@@ -152,15 +169,14 @@ publish/
152169
PublishScripts/
153170

154171
# NuGet Packages
155-
[Nn]u[Gg]et.exe
156172
*.nupkg
157173
# The packages folder can be ignored because of Package Restore
158-
**/packages/*
174+
**/[Pp]ackages/*
159175
# except build/, which is used as an MSBuild target.
160-
!**/packages/build/
176+
!**/[Pp]ackages/build/
161177
# Uncomment if necessary however generally it will be regenerated when needed
162-
#!**/packages/repositories.config
163-
# NuGet v3's project.json files produces more ignoreable files
178+
#!**/[Pp]ackages/repositories.config
179+
# NuGet v3's project.json files produces more ignorable files
164180
*.nuget.props
165181
*.nuget.targets
166182

@@ -177,6 +193,7 @@ AppPackages/
177193
BundleArtifacts/
178194
Package.StoreAssociation.xml
179195
_pkginfo.txt
196+
*.appx
180197

181198
# Visual Studio cache files
182199
# files ending in .cache can be ignored
@@ -190,9 +207,9 @@ ClientBin/
190207
*~
191208
*.dbmdl
192209
*.dbproj.schemaview
210+
*.jfm
193211
*.pfx
194212
*.publishsettings
195-
node_modules/
196213
orleans.codegen.cs
197214

198215
# Since there are multiple workflows, uncomment next line to ignore bower_components
@@ -213,6 +230,7 @@ UpgradeLog*.htm
213230
# SQL Server files
214231
*.mdf
215232
*.ldf
233+
*.ndf
216234

217235
# Business Intelligence projects
218236
*.rdl.data
@@ -227,13 +245,20 @@ FakesAssemblies/
227245

228246
# Node.js Tools for Visual Studio
229247
.ntvs_analysis.dat
248+
node_modules/
249+
250+
# TypeScript v1 declaration files
251+
typings/
230252

231253
# Visual Studio 6 build log
232254
*.plg
233255

234256
# Visual Studio 6 workspace options file
235257
*.opt
236258

259+
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
260+
*.vbw
261+
237262
# Visual Studio LightSwitch build output
238263
**/*.HTMLClient/GeneratedArtifacts
239264
**/*.DesktopClient/GeneratedArtifacts
@@ -253,6 +278,32 @@ paket-files/
253278
.idea/
254279
*.sln.iml
255280

281+
# CodeRush
282+
.cr/
283+
284+
# Python Tools for Visual Studio (PTVS)
285+
__pycache__/
286+
*.pyc
287+
288+
# Cake - Uncomment if you are using it
289+
# tools/**
290+
# !tools/packages.config
291+
292+
# Tabs Studio
293+
*.tss
294+
295+
# Telerik's JustMock configuration file
296+
*.jmconfig
297+
298+
# BizTalk build output
299+
*.btp.cs
300+
*.btm.cs
301+
*.odx.cs
302+
*.xsd.cs
303+
304+
# OpenCover UI analysis results
305+
OpenCover/
306+
256307
# =========================
257308
# Operating System Files
258309
# =========================

.travis.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
language: csharp
2+
3+
matrix:
4+
fast_finish: true
5+
allow_failures:
6+
- os: osx
7+
8+
include:
9+
- os: linux
10+
dist: trusty
11+
dotnet: 2.0.0
12+
mono: none
13+
- os: osx
14+
osx_image: xcode8.2
15+
dotnet: 2.0.0
16+
mono: none
17+
18+
branches:
19+
only:
20+
- master
21+
script:
22+
- dotnet test -c Release -f netcoreapp2.0 test/AutoTest.ArgumentNullException.Tests/AutoTest.ArgumentNullException.Tests.csproj
23+
- dotnet test -c Release -f netcoreapp2.0 test/AutoTest.ExampleLibrary.Tests/AutoTest.ExampleLibrary.Tests.csproj

CiVersion.ps1

Lines changed: 0 additions & 35 deletions
This file was deleted.

Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM microsoft/aspnetcore-build:2.0.0
2+
3+
ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
4+
5+
WORKDIR /work
6+
7+
# Copy just the solution and proj files to make best use of docker image caching
8+
COPY ./autotest.argumentnullexception.sln .
9+
COPY ./src/AutoTest.ArgumentNullException/AutoTest.ArgumentNullException.csproj ./src/AutoTest.ArgumentNullException/AutoTest.ArgumentNullException.csproj
10+
COPY ./src/AutoTest.ArgumentNullException.Xunit/AutoTest.ArgumentNullException.Xunit.csproj ./src/AutoTest.ArgumentNullException.Xunit/AutoTest.ArgumentNullException.Xunit.csproj
11+
COPY ./test/AutoTest.ArgumentNullException.Tests/AutoTest.ArgumentNullException.Tests.csproj ./test/AutoTest.ArgumentNullException.Tests/AutoTest.ArgumentNullException.Tests.csproj
12+
COPY ./test/AutoTest.ExampleLibrary/AutoTest.ExampleLibrary.csproj ./test/AutoTest.ExampleLibrary/AutoTest.ExampleLibrary.csproj
13+
COPY ./test/AutoTest.ExampleLibrary.Tests/AutoTest.ExampleLibrary.Tests.csproj ./test/AutoTest.ExampleLibrary.Tests/AutoTest.ExampleLibrary.Tests.csproj
14+
15+
# Run restore on just the project files, this should cache the image after restore.
16+
RUN dotnet restore
17+
18+
COPY . .
19+
20+
# Build to ensure the tests are their own distinct step
21+
RUN dotnet build -f netcoreapp2.0 -c Debug ./test/AutoTest.ArgumentNullException.Tests/AutoTest.ArgumentNullException.Tests.csproj
22+
RUN dotnet build -f netcoreapp2.0 -c Debug ./test/AutoTest.ExampleLibrary.Tests/AutoTest.ExampleLibrary.Tests.csproj
23+
24+
# Run unit tests
25+
RUN dotnet test --no-restore --no-build -c Debug -f netcoreapp2.0 test/AutoTest.ArgumentNullException.Tests/AutoTest.ArgumentNullException.Tests.csproj
26+
RUN dotnet test --no-restore --no-build -c Debug -f netcoreapp2.0 test/AutoTest.ExampleLibrary.Tests/AutoTest.ExampleLibrary.Tests.csproj

0 commit comments

Comments
 (0)