Skip to content

Commit 511586e

Browse files
committed
feat (NetCore) Continue from previous fork to update build to run a .net core build.
1 parent de3122a commit 511586e

File tree

105 files changed

+202
-81613
lines changed

Some content is hidden

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

105 files changed

+202
-81613
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ _NCrunch*
1919
*.orig
2020
packages
2121
ConventionTests.sln.ide/
22+
/.vs/ConventionTests/DesignTimeBuild/.dtbcache.v2
23+
/.vs/ConventionTests/v16/TestStore/0/000.testlog
24+
/.vs/ConventionTests/v16/TestStore/0/testlog.manifest
25+
/artifacts/**

ConventionTests.sln.DotSettings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MQ/@EntryIndexedValue">MQ</s:String>
1111
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
1212
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
13+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
14+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
15+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
1316
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
1417
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
1518
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

ConventionTests.v2.ncrunchsolution

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

Samples/SampleApp.Tests/ProjectConfigurationTests.cs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
namespace SampleApp.Tests
22
{
3-
using System;
43
using System.IO;
4+
using System.Reflection;
55
using NUnit.Framework;
66
using TestStack.ConventionTests;
77
using TestStack.ConventionTests.ConventionData;
@@ -10,41 +10,46 @@
1010
[TestFixture]
1111
public class ProjectConfigurationTests
1212
{
13-
string projectLocation;
13+
readonly string projectLocation;
1414

1515
public ProjectConfigurationTests()
1616
{
17-
projectLocation = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, @"..\..\..\SampleApp\SampleApp.csproj"));
17+
projectLocation = Path.GetFullPath(Path.Combine(Assembly.GetExecutingAssembly().Location,
18+
@"..\..\..\..\SampleApp\SampleApp.csproj"));
1819
}
1920

2021
[Test]
2122
public void debug_configurations_should_have_debug_type_pdb_only()
2223
{
23-
var configurationHasSpecificValue = new ConfigurationHasSpecificValue(ConfigurationType.Debug, "DebugType", "full");
24+
var configurationHasSpecificValue =
25+
new ConfigurationHasSpecificValue(ConfigurationType.Debug, "DebugType", "full");
2426
var projectPropertyGroups = new ProjectPropertyGroups(projectLocation);
2527
Convention.Is(configurationHasSpecificValue, projectPropertyGroups);
2628
}
2729

2830
[Test]
2931
public void debug_configurations_should_have_optimize_false()
3032
{
31-
var configurationHasSpecificValue = new ConfigurationHasSpecificValue(ConfigurationType.Debug, "Optimize", "false");
33+
var configurationHasSpecificValue =
34+
new ConfigurationHasSpecificValue(ConfigurationType.Debug, "Optimize", "false");
3235
var projectPropertyGroups = new ProjectPropertyGroups(projectLocation);
3336
Convention.Is(configurationHasSpecificValue, projectPropertyGroups);
3437
}
3538

3639
[Test]
3740
public void release_configurations_should_have_debug_type_pdb_only()
3841
{
39-
var configurationHasSpecificValue = new ConfigurationHasSpecificValue(ConfigurationType.Release, "DebugType", "pdbonly");
42+
var configurationHasSpecificValue =
43+
new ConfigurationHasSpecificValue(ConfigurationType.Release, "DebugType", "pdbonly");
4044
var projectPropertyGroups = new ProjectPropertyGroups(projectLocation);
4145
Convention.Is(configurationHasSpecificValue, projectPropertyGroups);
4246
}
4347

4448
[Test]
4549
public void release_configurations_should_have_optimize_true()
4650
{
47-
var configurationHasSpecificValue = new ConfigurationHasSpecificValue(ConfigurationType.Release, "Optimize", "true");
51+
var configurationHasSpecificValue =
52+
new ConfigurationHasSpecificValue(ConfigurationType.Release, "Optimize", "true");
4853
var projectPropertyGroups = new ProjectPropertyGroups(projectLocation);
4954
Convention.Is(configurationHasSpecificValue, projectPropertyGroups);
5055
}

Samples/SampleApp.Tests/SampleApp.Tests.csproj

Lines changed: 42 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>SampleApp.Tests</RootNamespace>
1111
<AssemblyName>SampleApp.Tests</AssemblyName>
12-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
14-
<NuGetPackageImportStamp>208c48d3</NuGetPackageImportStamp>
14+
<NuGetPackageImportStamp>
15+
</NuGetPackageImportStamp>
16+
<TargetFrameworkProfile />
1517
</PropertyGroup>
1618
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1719
<DebugSymbols>true</DebugSymbols>
@@ -21,6 +23,7 @@
2123
<DefineConstants>DEBUG;TRACE</DefineConstants>
2224
<ErrorReport>prompt</ErrorReport>
2325
<WarningLevel>4</WarningLevel>
26+
<Prefer32Bit>false</Prefer32Bit>
2427
</PropertyGroup>
2528
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2629
<DebugType>pdbonly</DebugType>
@@ -29,73 +32,14 @@
2932
<DefineConstants>TRACE</DefineConstants>
3033
<ErrorReport>prompt</ErrorReport>
3134
<WarningLevel>4</WarningLevel>
35+
<Prefer32Bit>false</Prefer32Bit>
3236
</PropertyGroup>
3337
<ItemGroup>
34-
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
35-
<Private>True</Private>
36-
<HintPath>..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
37-
</Reference>
38-
<Reference Include="Mono.Cecil, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
39-
<SpecificVersion>False</SpecificVersion>
40-
<HintPath>..\..\packages\Mono.Cecil.0.9.5.4\lib\net40\Mono.Cecil.dll</HintPath>
41-
</Reference>
42-
<Reference Include="Mono.Cecil.Mdb">
43-
<HintPath>..\..\packages\Mono.Cecil.0.9.5.4\lib\net40\Mono.Cecil.Mdb.dll</HintPath>
44-
</Reference>
45-
<Reference Include="Mono.Cecil.Pdb">
46-
<HintPath>..\..\packages\Mono.Cecil.0.9.5.4\lib\net40\Mono.Cecil.Pdb.dll</HintPath>
47-
</Reference>
48-
<Reference Include="Mono.Cecil.Rocks">
49-
<HintPath>..\..\packages\Mono.Cecil.0.9.5.4\lib\net40\Mono.Cecil.Rocks.dll</HintPath>
50-
</Reference>
51-
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
52-
<SpecificVersion>False</SpecificVersion>
53-
<HintPath>..\..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll</HintPath>
54-
</Reference>
55-
<Reference Include="NSubstitute">
56-
<HintPath>..\..\packages\NSubstitute.1.6.1.0\lib\NET40\NSubstitute.dll</HintPath>
57-
</Reference>
58-
<Reference Include="nunit.framework">
59-
<HintPath>..\..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath>
60-
</Reference>
6138
<Reference Include="System" />
39+
<Reference Include="System.Configuration" />
6240
<Reference Include="System.Core" />
63-
<Reference Include="System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
64-
<HintPath>..\..\packages\Microsoft.Net.Http.2.0.20710.0\lib\net40\System.Net.Http.dll</HintPath>
65-
</Reference>
66-
<Reference Include="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
67-
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Client.4.0.30506.0\lib\net40\System.Net.Http.Formatting.dll</HintPath>
68-
</Reference>
69-
<Reference Include="System.Net.Http.WebRequest, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
70-
<HintPath>..\..\packages\Microsoft.Net.Http.2.0.20710.0\lib\net40\System.Net.Http.WebRequest.dll</HintPath>
71-
</Reference>
72-
<Reference Include="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
73-
<Private>True</Private>
74-
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.Helpers.dll</HintPath>
75-
</Reference>
76-
<Reference Include="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
77-
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Core.4.0.30506.0\lib\net40\System.Web.Http.dll</HintPath>
78-
</Reference>
79-
<Reference Include="System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
80-
<Private>True</Private>
81-
<HintPath>..\..\packages\Microsoft.AspNet.Mvc.4.0.40804.0\lib\net40\System.Web.Mvc.dll</HintPath>
82-
</Reference>
83-
<Reference Include="System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
84-
<Private>True</Private>
85-
<HintPath>..\..\packages\Microsoft.AspNet.Razor.2.0.20710.0\lib\net40\System.Web.Razor.dll</HintPath>
86-
</Reference>
87-
<Reference Include="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
88-
<Private>True</Private>
89-
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.dll</HintPath>
90-
</Reference>
91-
<Reference Include="System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
92-
<Private>True</Private>
93-
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Deployment.dll</HintPath>
94-
</Reference>
95-
<Reference Include="System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
96-
<Private>True</Private>
97-
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Razor.dll</HintPath>
98-
</Reference>
41+
<Reference Include="System.Net.Http" />
42+
<Reference Include="System.Net.Http.WebRequest" />
9943
<Reference Include="System.Xml.Linq" />
10044
<Reference Include="System.Data.DataSetExtensions" />
10145
<Reference Include="Microsoft.CSharp" />
@@ -123,11 +67,43 @@
12367
</ProjectReference>
12468
</ItemGroup>
12569
<ItemGroup>
126-
<None Include="packages.config" />
70+
<None Include="app.config" />
12771
</ItemGroup>
12872
<ItemGroup>
12973
<Content Include="__TryItOut__.txt" />
13074
</ItemGroup>
75+
<ItemGroup>
76+
<PackageReference Include="Microsoft.AspNet.Mvc">
77+
<Version>5.2.7</Version>
78+
</PackageReference>
79+
<PackageReference Include="Microsoft.AspNet.WebApi.Core">
80+
<Version>5.2.7</Version>
81+
</PackageReference>
82+
<PackageReference Include="Microsoft.Bcl.Build">
83+
<Version>1.0.21</Version>
84+
</PackageReference>
85+
<PackageReference Include="Microsoft.Net.Http">
86+
<Version>2.2.29</Version>
87+
</PackageReference>
88+
<PackageReference Include="Mono.Cecil">
89+
<Version>0.11.2</Version>
90+
</PackageReference>
91+
<PackageReference Include="Newtonsoft.Json">
92+
<Version>12.0.3</Version>
93+
</PackageReference>
94+
<PackageReference Include="NSubstitute">
95+
<Version>4.2.1</Version>
96+
</PackageReference>
97+
<PackageReference Include="NUnit">
98+
<Version>3.12.0</Version>
99+
</PackageReference>
100+
<PackageReference Include="System.Runtime.CompilerServices.Unsafe">
101+
<Version>4.7.0</Version>
102+
</PackageReference>
103+
<PackageReference Include="System.Threading.Tasks.Extensions">
104+
<Version>4.5.3</Version>
105+
</PackageReference>
106+
</ItemGroup>
131107
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
132108
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
133109
Other similar extension points exist, see Microsoft.Common.targets.

Samples/SampleApp.Tests/SqlScriptTests.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@
22
{
33
using System;
44
using System.IO;
5+
using System.Reflection;
56
using NUnit.Framework;
6-
using SampleApp.Domain;
77
using TestStack.ConventionTests;
88
using TestStack.ConventionTests.ConventionData;
99
using TestStack.ConventionTests.Conventions;
1010

1111
[TestFixture]
1212
public class SqlScriptTests
1313
{
14-
string projectLocation;
14+
readonly string projectLocation;
1515

1616
public SqlScriptTests()
1717
{
18-
projectLocation = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, @"..\..\..\SampleApp\SampleApp.csproj"));
18+
projectLocation =
19+
Path.GetFullPath(Path.Combine(Assembly.GetExecutingAssembly().Location,
20+
@"..\..\..\..\SampleApp\SampleApp.csproj"));
1921
}
2022

2123
[Test]
@@ -24,4 +26,4 @@ public void SqlScriptsShouldBeEmbeddedResources()
2426
Convention.Is(new FilesAreEmbeddedResources(".sql"), new ProjectFileItems(projectLocation));
2527
}
2628
}
27-
}
29+
}

Samples/SampleApp.Tests/app.config

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<runtime>
4+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5+
<dependentAssembly>
6+
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
7+
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
8+
</dependentAssembly>
9+
<dependentAssembly>
10+
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
11+
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
12+
</dependentAssembly>
13+
<dependentAssembly>
14+
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
15+
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
16+
</dependentAssembly>
17+
</assemblyBinding>
18+
</runtime>
19+
</configuration>

Samples/SampleApp.Tests/packages.config

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

0 commit comments

Comments
 (0)