Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c51ccc6

Browse files
author
Peter Santiago
committedNov 20, 2017
updated project to .net standard 2.0, and multi-targeting net 4.5 and .net 40 still. Didn't yet update the test/website projects
1 parent 5fea7e0 commit c51ccc6

11 files changed

+646
-821
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,4 @@ _UpgradeReport_Files/
109109
Backup*/
110110
UpgradeLog*.XML
111111
/.vs/config/applicationhost.config
112+
/.vs

‎Dapper.SimpleCRUD NET45/Dapper.SimpleCRUD NET45.csproj

-75
This file was deleted.

‎Dapper.SimpleCRUD NET45/packages.config

-4
This file was deleted.

‎Dapper.SimpleCRUD.sln

+19-26
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 2013
4-
VisualStudioVersion = 12.0.31101.0
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27004.2009
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dapper.SimpleCRUD", "Dapper.SimpleCRUD\Dapper.SimpleCRUD.csproj", "{D88D1D75-0BBD-4E66-ABE0-A077C85DC302}"
7-
EndProject
86
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dapper.SimpleCRUDTests", "Dapper.SimpleCRUDTests\Dapper.SimpleCRUDTests.csproj", "{A4F4A06E-D179-4251-A232-AEF4CE9AD9B5}"
97
EndProject
108
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{4C0A1156-5B42-4415-9306-39E265A360EC}"
@@ -14,10 +12,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{4C0A11
1412
.nuget\NuGet.targets = .nuget\NuGet.targets
1513
EndProjectSection
1614
EndProject
17-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dapper.SimpleCRUD NET45", "Dapper.SimpleCRUD NET45\Dapper.SimpleCRUD NET45.csproj", "{A54F7AB7-F6DE-43AA-9B31-2065CC6F16D8}"
18-
EndProject
1915
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoWebsite", "DemoWebsite\DemoWebsite.csproj", "{BCF52CCE-03CF-443E-BC02-7D92A1E78D60}"
2016
EndProject
17+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dapper.SimpleCRUD", "Dapper.SimpleCRUD\Dapper.SimpleCRUD.csproj", "{9C42445F-4A30-43A1-A480-445B25CE2BD8}"
18+
EndProject
2119
Global
2220
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2321
Debug|Any CPU = Debug|Any CPU
@@ -28,16 +26,6 @@ Global
2826
Release|x86 = Release|x86
2927
EndGlobalSection
3028
GlobalSection(ProjectConfigurationPlatforms) = postSolution
31-
{D88D1D75-0BBD-4E66-ABE0-A077C85DC302}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
32-
{D88D1D75-0BBD-4E66-ABE0-A077C85DC302}.Debug|Any CPU.Build.0 = Debug|Any CPU
33-
{D88D1D75-0BBD-4E66-ABE0-A077C85DC302}.Debug|Mixed Platforms.ActiveCfg = Release|Any CPU
34-
{D88D1D75-0BBD-4E66-ABE0-A077C85DC302}.Debug|Mixed Platforms.Build.0 = Release|Any CPU
35-
{D88D1D75-0BBD-4E66-ABE0-A077C85DC302}.Debug|x86.ActiveCfg = Debug|Any CPU
36-
{D88D1D75-0BBD-4E66-ABE0-A077C85DC302}.Release|Any CPU.ActiveCfg = Release|Any CPU
37-
{D88D1D75-0BBD-4E66-ABE0-A077C85DC302}.Release|Any CPU.Build.0 = Release|Any CPU
38-
{D88D1D75-0BBD-4E66-ABE0-A077C85DC302}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
39-
{D88D1D75-0BBD-4E66-ABE0-A077C85DC302}.Release|Mixed Platforms.Build.0 = Release|Any CPU
40-
{D88D1D75-0BBD-4E66-ABE0-A077C85DC302}.Release|x86.ActiveCfg = Release|Any CPU
4129
{A4F4A06E-D179-4251-A232-AEF4CE9AD9B5}.Debug|Any CPU.ActiveCfg = Debug|x86
4230
{A4F4A06E-D179-4251-A232-AEF4CE9AD9B5}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
4331
{A4F4A06E-D179-4251-A232-AEF4CE9AD9B5}.Debug|Mixed Platforms.Build.0 = Debug|x86
@@ -48,16 +36,6 @@ Global
4836
{A4F4A06E-D179-4251-A232-AEF4CE9AD9B5}.Release|Mixed Platforms.Build.0 = Release|x86
4937
{A4F4A06E-D179-4251-A232-AEF4CE9AD9B5}.Release|x86.ActiveCfg = Release|x86
5038
{A4F4A06E-D179-4251-A232-AEF4CE9AD9B5}.Release|x86.Build.0 = Release|x86
51-
{A54F7AB7-F6DE-43AA-9B31-2065CC6F16D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
52-
{A54F7AB7-F6DE-43AA-9B31-2065CC6F16D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
53-
{A54F7AB7-F6DE-43AA-9B31-2065CC6F16D8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
54-
{A54F7AB7-F6DE-43AA-9B31-2065CC6F16D8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
55-
{A54F7AB7-F6DE-43AA-9B31-2065CC6F16D8}.Debug|x86.ActiveCfg = Debug|Any CPU
56-
{A54F7AB7-F6DE-43AA-9B31-2065CC6F16D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
57-
{A54F7AB7-F6DE-43AA-9B31-2065CC6F16D8}.Release|Any CPU.Build.0 = Release|Any CPU
58-
{A54F7AB7-F6DE-43AA-9B31-2065CC6F16D8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
59-
{A54F7AB7-F6DE-43AA-9B31-2065CC6F16D8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
60-
{A54F7AB7-F6DE-43AA-9B31-2065CC6F16D8}.Release|x86.ActiveCfg = Release|Any CPU
6139
{BCF52CCE-03CF-443E-BC02-7D92A1E78D60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
6240
{BCF52CCE-03CF-443E-BC02-7D92A1E78D60}.Debug|Any CPU.Build.0 = Debug|Any CPU
6341
{BCF52CCE-03CF-443E-BC02-7D92A1E78D60}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -68,8 +46,23 @@ Global
6846
{BCF52CCE-03CF-443E-BC02-7D92A1E78D60}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
6947
{BCF52CCE-03CF-443E-BC02-7D92A1E78D60}.Release|Mixed Platforms.Build.0 = Release|Any CPU
7048
{BCF52CCE-03CF-443E-BC02-7D92A1E78D60}.Release|x86.ActiveCfg = Release|Any CPU
49+
{9C42445F-4A30-43A1-A480-445B25CE2BD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50+
{9C42445F-4A30-43A1-A480-445B25CE2BD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
51+
{9C42445F-4A30-43A1-A480-445B25CE2BD8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
52+
{9C42445F-4A30-43A1-A480-445B25CE2BD8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
53+
{9C42445F-4A30-43A1-A480-445B25CE2BD8}.Debug|x86.ActiveCfg = Debug|Any CPU
54+
{9C42445F-4A30-43A1-A480-445B25CE2BD8}.Debug|x86.Build.0 = Debug|Any CPU
55+
{9C42445F-4A30-43A1-A480-445B25CE2BD8}.Release|Any CPU.ActiveCfg = Release|Any CPU
56+
{9C42445F-4A30-43A1-A480-445B25CE2BD8}.Release|Any CPU.Build.0 = Release|Any CPU
57+
{9C42445F-4A30-43A1-A480-445B25CE2BD8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
58+
{9C42445F-4A30-43A1-A480-445B25CE2BD8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
59+
{9C42445F-4A30-43A1-A480-445B25CE2BD8}.Release|x86.ActiveCfg = Release|Any CPU
60+
{9C42445F-4A30-43A1-A480-445B25CE2BD8}.Release|x86.Build.0 = Release|Any CPU
7161
EndGlobalSection
7262
GlobalSection(SolutionProperties) = preSolution
7363
HideSolutionNode = FALSE
7464
EndGlobalSection
65+
GlobalSection(ExtensibilityGlobals) = postSolution
66+
SolutionGuid = {6D7DEFD4-79ED-4D07-8527-FA62F312BCD4}
67+
EndGlobalSection
7568
EndGlobal
+44-101
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,55 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
43
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{D88D1D75-0BBD-4E66-ABE0-A077C85DC302}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>Dapper.SimpleCRUD</RootNamespace>
11-
<AssemblyName>Dapper.SimpleCRUD</AssemblyName>
12-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<TargetFrameworkProfile />
15-
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
16-
<RestorePackages>true</RestorePackages>
17-
<PublishUrl>publish\</PublishUrl>
18-
<Install>true</Install>
19-
<InstallFrom>Disk</InstallFrom>
20-
<UpdateEnabled>false</UpdateEnabled>
21-
<UpdateMode>Foreground</UpdateMode>
22-
<UpdateInterval>7</UpdateInterval>
23-
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
24-
<UpdatePeriodically>false</UpdatePeriodically>
25-
<UpdateRequired>false</UpdateRequired>
26-
<MapFileExtensions>true</MapFileExtensions>
27-
<ApplicationRevision>0</ApplicationRevision>
28-
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
29-
<IsWebBootstrapper>false</IsWebBootstrapper>
30-
<UseApplicationTrust>false</UseApplicationTrust>
31-
<BootstrapperEnabled>true</BootstrapperEnabled>
4+
<TargetFrameworks>netstandard2.0;net45;net40</TargetFrameworks>
325
</PropertyGroup>
33-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
34-
<DebugSymbols>true</DebugSymbols>
35-
<DebugType>full</DebugType>
36-
<Optimize>false</Optimize>
37-
<OutputPath>bin\Debug\</OutputPath>
38-
<DefineConstants>DEBUG;TRACE</DefineConstants>
39-
<ErrorReport>prompt</ErrorReport>
40-
<WarningLevel>4</WarningLevel>
41-
<Prefer32Bit>false</Prefer32Bit>
42-
</PropertyGroup>
43-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
44-
<DebugType>pdbonly</DebugType>
45-
<Optimize>true</Optimize>
46-
<OutputPath>bin\Release\</OutputPath>
47-
<DefineConstants>TRACE</DefineConstants>
48-
<ErrorReport>prompt</ErrorReport>
49-
<WarningLevel>4</WarningLevel>
50-
<DocumentationFile>bin\Release\Dapper.SimpleCRUD.XML</DocumentationFile>
51-
<Prefer32Bit>false</Prefer32Bit>
52-
</PropertyGroup>
53-
<ItemGroup>
54-
<Reference Include="Dapper, Version=1.40.0.0, Culture=neutral, processorArchitecture=MSIL">
55-
<SpecificVersion>False</SpecificVersion>
56-
<HintPath>..\packages\Dapper.1.42\lib\net40\Dapper.dll</HintPath>
57-
</Reference>
6+
7+
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0'">
8+
<PackageReference Include="Microsoft.CSharp" Version="4.4.0" />
9+
</ItemGroup>
10+
11+
<!-- .NET 4.5 references, compilation flags and build options -->
12+
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
13+
<Reference Include="mscorlib" />
5814
<Reference Include="System" />
5915
<Reference Include="System.Core" />
60-
<Reference Include="System.Xml.Linq" />
61-
<Reference Include="System.Data.DataSetExtensions" />
6216
<Reference Include="Microsoft.CSharp" />
6317
<Reference Include="System.Data" />
18+
<Reference Include="System.Web" />
19+
<Reference Include="System.Drawing" />
20+
<Reference Include="System.Security" />
6421
<Reference Include="System.Xml" />
22+
<Reference Include="System.Configuration" />
6523
</ItemGroup>
66-
<ItemGroup>
67-
<Compile Include="SimpleCRUD.cs" />
68-
<Compile Include="Properties\AssemblyInfo.cs" />
69-
</ItemGroup>
70-
<ItemGroup>
71-
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
72-
</ItemGroup>
73-
<ItemGroup>
74-
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
75-
<Visible>False</Visible>
76-
<ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
77-
<Install>true</Install>
78-
</BootstrapperPackage>
79-
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
80-
<Visible>False</Visible>
81-
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
82-
<Install>false</Install>
83-
</BootstrapperPackage>
84-
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
85-
<Visible>False</Visible>
86-
<ProductName>.NET Framework 3.5 SP1</ProductName>
87-
<Install>false</Install>
88-
</BootstrapperPackage>
89-
<BootstrapperPackage Include="Microsoft.SQL.Server.Compact.4.0">
90-
<Visible>False</Visible>
91-
<ProductName>SQL Server Compact 4.0 SP1</ProductName>
92-
<Install>true</Install>
93-
</BootstrapperPackage>
94-
<BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
95-
<Visible>False</Visible>
96-
<ProductName>Windows Installer 4.5</ProductName>
97-
<Install>true</Install>
98-
</BootstrapperPackage>
24+
25+
<!-- .NET 4.0 references, compilation flags and build options -->
26+
<ItemGroup Condition=" '$(TargetFramework)' == 'net40' ">
27+
<Reference Include="mscorlib" />
28+
<Reference Include="System" />
29+
<Reference Include="System.Core" />
30+
<Reference Include="Microsoft.CSharp" />
31+
<Reference Include="System.Data" />
32+
<Reference Include="System.Web" />
33+
<Reference Include="System.Drawing" />
34+
<Reference Include="System.Security" />
35+
<Reference Include="System.Xml" />
36+
<Reference Include="System.Configuration" />
9937
</ItemGroup>
38+
10039
<ItemGroup>
101-
<None Include="packages.config" />
40+
<PackageReference Include="Dapper" Version="1.50.2" />
10241
</ItemGroup>
103-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
104-
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
105-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
106-
Other similar extension points exist, see Microsoft.Common.targets.
107-
<Target Name="BeforeBuild">
108-
</Target>
109-
<Target Name="AfterBuild">
110-
</Target>
111-
-->
112-
</Project>
42+
43+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0'">
44+
<DefineConstants>NETCORE;NETSTANDARD;NETSTANDARD2_0</DefineConstants>
45+
</PropertyGroup>
46+
47+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45'">
48+
<DefineConstants>NET45;NETFULL</DefineConstants>
49+
</PropertyGroup>
50+
51+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net40'">
52+
<DefineConstants>NET40;NETFULL</DefineConstants>
53+
</PropertyGroup>
54+
55+
</Project>

‎Dapper.SimpleCRUD/Properties/AssemblyInfo.cs

-36
This file was deleted.

‎Dapper.SimpleCRUD/SimpleCRUD.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public static T Get<T>(this IDbConnection connection, object id, IDbTransaction
114114

115115
if (!idProps.Any())
116116
throw new ArgumentException("Get<T> only supports an entity with a [Key] or Id property");
117-
117+
118118
var name = GetTableName(currenttype);
119119
var sb = new StringBuilder();
120120
sb.Append("Select ");
@@ -387,7 +387,7 @@ public static TKey Insert<TKey, TEntity>(this IDbConnection connection, TEntity
387387
}
388388
return (TKey)r.First().id;
389389
}
390-
390+
391391
/// <summary>
392392
/// <para>Updates a record or records in the database with only the properties of TEntity</para>
393393
/// <para>By default updates records in the table matching the class name</para>
@@ -482,7 +482,7 @@ public static int Delete<T>(this IDbConnection connection, object id, IDbTransac
482482

483483
if (!idProps.Any())
484484
throw new ArgumentException("Delete<T> only supports an entity with a [Key] or Id property");
485-
485+
486486
var name = GetTableName(currenttype);
487487

488488
var sb = new StringBuilder();

‎Dapper.SimpleCRUD NET45/SimpleCRUDAsync.cs ‎Dapper.SimpleCRUD/SimpleCRUDAsync.cs

+569-564
Large diffs are not rendered by default.

‎Dapper.SimpleCRUD/packages.config

-4
This file was deleted.

‎Dapper.SimpleCRUDTests/Dapper.SimpleCRUDTests.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@
135135
<None Include="packages.config" />
136136
</ItemGroup>
137137
<ItemGroup>
138-
<ProjectReference Include="..\Dapper.SimpleCRUD NET45\Dapper.SimpleCRUD NET45.csproj">
139-
<Project>{a54f7ab7-f6de-43aa-9b31-2065cc6f16d8}</Project>
140-
<Name>Dapper.SimpleCRUD NET45</Name>
138+
<ProjectReference Include="..\Dapper.SimpleCRUD\Dapper.SimpleCRUD.csproj">
139+
<Project>{9c42445f-4a30-43a1-a480-445b25ce2bd8}</Project>
140+
<Name>Dapper.SimpleCRUD</Name>
141141
</ProjectReference>
142142
</ItemGroup>
143143
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

‎DemoWebsite/DemoWebsite.csproj

+7-5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<IISExpressUseClassicPipelineMode />
2323
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
2424
<RestorePackages>true</RestorePackages>
25+
<Use64BitIISExpress />
26+
<UseGlobalApplicationHostFile />
2527
</PropertyGroup>
2628
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2729
<DebugSymbols>true</DebugSymbols>
@@ -229,13 +231,13 @@
229231
<None Include="Project_Readme.html" />
230232
</ItemGroup>
231233
<ItemGroup>
232-
<ProjectReference Include="..\Dapper.SimpleCRUD NET45\Dapper.SimpleCRUD NET45.csproj">
233-
<Project>{a54f7ab7-f6de-43aa-9b31-2065cc6f16d8}</Project>
234-
<Name>Dapper.SimpleCRUD NET45</Name>
235-
</ProjectReference>
234+
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
236235
</ItemGroup>
237236
<ItemGroup>
238-
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
237+
<ProjectReference Include="..\Dapper.SimpleCRUD\Dapper.SimpleCRUD.csproj">
238+
<Project>{9c42445f-4a30-43a1-a480-445b25ce2bd8}</Project>
239+
<Name>Dapper.SimpleCRUD</Name>
240+
</ProjectReference>
239241
</ItemGroup>
240242
<PropertyGroup>
241243
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>

0 commit comments

Comments
 (0)
Please sign in to comment.