Skip to content

Commit ad6b759

Browse files
jpennimanfredericDelaporte
authored andcommitted
Support NetStandard 2.0 (#12)
* Added a license file. Package now targets netStandard2.0 and net461 to support older tooling.
1 parent 59484aa commit ad6b759

23 files changed

+1215
-719
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*.suo
66
*.user
77
*.sln.docstates
8+
*.sln.GhostDoc.xml
89

910
# Build results
1011
[Dd]ebug/

LICENSE.md

Lines changed: 504 additions & 0 deletions
Large diffs are not rendered by default.

src/.nuget/NuGet.exe

3.25 MB
Binary file not shown.

src/Generator/AssemblyInfo.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,5 @@
22
// NHibernate.Mapping.Attributes.Generator
33
// This product is under the terms of the GNU Lesser General Public License.
44
//
5-
using System.Reflection;
6-
7-
[assembly: AssemblyProduct("NHibernate.Mapping.Attributes.Generator")]
8-
[assembly: AssemblyTitle("NHibernate.Mapping.Attributes.Generator for Microsoft .NET Framework 4.0")]
9-
[assembly: AssemblyDescription("Generate NHibernate.Mapping.Attributes.")]
10-
[assembly: AssemblyCompany("nhibernate.org")]
11-
[assembly: AssemblyCopyright("Under the terms of the GNU Lesser General Public License.")]
12-
13-
[assembly: AssemblyVersion("4.0.0.0")]
14-
155
[assembly: System.CLSCompliant(true)]
166
[assembly: System.Runtime.InteropServices.ComVisible(false)]

src/Generator/Generator.csproj

Lines changed: 10 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -1,151 +1,18 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="../NHibernate.Mapping.Attributes.props" />
33
<PropertyGroup>
4-
<ProjectType>Local</ProjectType>
5-
<ProductVersion>9.0.30729</ProductVersion>
6-
<SchemaVersion>2.0</SchemaVersion>
7-
<ProjectGuid>{22CADD56-EF07-4040-A171-BC5A3AB896FD}</ProjectGuid>
8-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
9-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
10-
<ApplicationIcon>App.ico</ApplicationIcon>
11-
<AssemblyKeyContainerName>
12-
</AssemblyKeyContainerName>
13-
<AssemblyName>NHibernate.Mapping.Attributes.Generator</AssemblyName>
14-
<AssemblyOriginatorKeyFile>
15-
</AssemblyOriginatorKeyFile>
16-
<DefaultClientScript>JScript</DefaultClientScript>
17-
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
18-
<DefaultTargetSchema>IE50</DefaultTargetSchema>
19-
<DelaySign>false</DelaySign>
4+
<Product>NHibernate.Mapping.Attributes.Generator</Product>
5+
<Description>NHibernate.Mapping.Attributes code generator.</Description>
6+
<TargetFramework>net461</TargetFramework>
207
<OutputType>Exe</OutputType>
21-
<RootNamespace>NHibernate.Mapping.Attributes.Generator</RootNamespace>
22-
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
23-
<StartupObject>
24-
</StartupObject>
25-
<FileUpgradeFlags>
26-
</FileUpgradeFlags>
27-
<UpgradeBackupLocation>
28-
</UpgradeBackupLocation>
29-
<OldToolsVersion>3.5</OldToolsVersion>
30-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
31-
<TargetFrameworkProfile />
32-
<PublishUrl>publish\</PublishUrl>
33-
<Install>true</Install>
34-
<InstallFrom>Disk</InstallFrom>
35-
<UpdateEnabled>false</UpdateEnabled>
36-
<UpdateMode>Foreground</UpdateMode>
37-
<UpdateInterval>7</UpdateInterval>
38-
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
39-
<UpdatePeriodically>false</UpdatePeriodically>
40-
<UpdateRequired>false</UpdateRequired>
41-
<MapFileExtensions>true</MapFileExtensions>
42-
<ApplicationRevision>0</ApplicationRevision>
43-
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
44-
<IsWebBootstrapper>false</IsWebBootstrapper>
45-
<UseApplicationTrust>false</UseApplicationTrust>
46-
<BootstrapperEnabled>true</BootstrapperEnabled>
47-
</PropertyGroup>
48-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
49-
<OutputPath>bin\Debug\</OutputPath>
50-
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
51-
<BaseAddress>285212672</BaseAddress>
52-
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
53-
<ConfigurationOverrideFile>
54-
</ConfigurationOverrideFile>
55-
<DefineConstants>DEBUG;TRACE</DefineConstants>
56-
<DocumentationFile>
57-
</DocumentationFile>
58-
<DebugSymbols>true</DebugSymbols>
59-
<FileAlignment>4096</FileAlignment>
60-
<NoStdLib>false</NoStdLib>
61-
<NoWarn>
62-
</NoWarn>
63-
<Optimize>false</Optimize>
64-
<RegisterForComInterop>false</RegisterForComInterop>
65-
<RemoveIntegerChecks>false</RemoveIntegerChecks>
66-
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
67-
<WarningLevel>4</WarningLevel>
68-
<DebugType>full</DebugType>
69-
<ErrorReport>prompt</ErrorReport>
70-
</PropertyGroup>
71-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
72-
<OutputPath>bin\Release\</OutputPath>
73-
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
74-
<BaseAddress>285212672</BaseAddress>
75-
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
76-
<ConfigurationOverrideFile>
77-
</ConfigurationOverrideFile>
78-
<DefineConstants>TRACE</DefineConstants>
79-
<DocumentationFile>
80-
</DocumentationFile>
81-
<DebugSymbols>false</DebugSymbols>
82-
<FileAlignment>4096</FileAlignment>
83-
<NoStdLib>false</NoStdLib>
84-
<NoWarn>
85-
</NoWarn>
86-
<Optimize>true</Optimize>
87-
<RegisterForComInterop>false</RegisterForComInterop>
88-
<RemoveIntegerChecks>false</RemoveIntegerChecks>
89-
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
90-
<WarningLevel>4</WarningLevel>
91-
<DebugType>none</DebugType>
92-
<ErrorReport>prompt</ErrorReport>
8+
<AssemblyName>NHibernate.Mapping.Attributes.Generator</AssemblyName>
9+
<IsPackable>false</IsPackable>
10+
<ApplicationIcon>App.ico</ApplicationIcon>
9311
</PropertyGroup>
9412
<ItemGroup>
95-
<Reference Include="log4net">
96-
<HintPath>..\..\lib\net\4.0\log4net.dll</HintPath>
97-
</Reference>
98-
<Reference Include="System">
99-
<Name>System</Name>
100-
</Reference>
101-
<Reference Include="System.Data">
102-
<Name>System.Data</Name>
103-
</Reference>
104-
<Reference Include="System.Xml">
105-
<Name>System.XML</Name>
106-
</Reference>
107-
<ProjectReference Include="..\Refly\Refly.csproj">
108-
<Name>Refly</Name>
109-
<Project>{53086B22-3A6C-4017-ADB7-F22BF49FFF58}</Project>
110-
</ProjectReference>
111-
</ItemGroup>
112-
<ItemGroup>
113-
<None Include="app.config" />
114-
<Content Include="App.ico" />
115-
<Compile Include="AssemblyInfo.cs">
116-
<SubType>Code</SubType>
117-
</Compile>
118-
<Compile Include="AttributeAndEnumGenerator.cs">
119-
<SubType>Code</SubType>
120-
</Compile>
121-
<Compile Include="HbmWriterGenerator.cs">
122-
<SubType>Code</SubType>
123-
</Compile>
124-
<Compile Include="Program.cs">
125-
<SubType>Code</SubType>
126-
</Compile>
127-
<Compile Include="Utils.cs">
128-
<SubType>Code</SubType>
129-
</Compile>
130-
<None Include="packages.config" />
13+
<ProjectReference Include="..\Refly\Refly.csproj" />
13114
</ItemGroup>
13215
<ItemGroup>
133-
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
134-
<Visible>False</Visible>
135-
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
136-
<Install>false</Install>
137-
</BootstrapperPackage>
138-
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
139-
<Visible>False</Visible>
140-
<ProductName>.NET Framework 3.5 SP1</ProductName>
141-
<Install>true</Install>
142-
</BootstrapperPackage>
16+
<PackageReference Include="log4net" Version="2.0.8" />
14317
</ItemGroup>
144-
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
145-
<PropertyGroup>
146-
<PreBuildEvent>
147-
</PreBuildEvent>
148-
<PostBuildEvent>
149-
</PostBuildEvent>
150-
</PropertyGroup>
15118
</Project>

src/Generator/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ static void Main()
238238
log.Info("Generation of NHibernate.Mapping.Attributes");
239239

240240
// Open the Schema (in /NHMA/ directory)
241-
System.Xml.XmlTextReader reader = new System.Xml.XmlTextReader("../../../NHibernate.Mapping.Attributes/nhibernate-mapping.xsd");
241+
System.Xml.XmlTextReader reader = new System.Xml.XmlTextReader("../../../../NHibernate.Mapping.Attributes/nhibernate-mapping.xsd");
242242
schema = System.Xml.Schema.XmlSchema.Read(reader, null);
243243

244244
Refly.CodeDom.NamespaceDeclaration nd = new Refly.CodeDom.NamespaceDeclaration("NHibernate.Mapping.Attributes", conformer);
@@ -371,7 +371,7 @@ the code is regenerated.
371371
#endregion
372372

373373
log.Info("CodeGenerator.GenerateCode()... Classes=" + nd.Classes.Count + ", Enums=" + nd.Enums.Count);
374-
gen.GenerateCode(@"../../../NHibernate.Mapping.Attributes", nd);
374+
gen.GenerateCode(@"../../../../NHibernate.Mapping.Attributes", nd);
375375
log.Info("Done !");
376376
}
377377
catch(System.Exception ex)

src/Generator/packages.config

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
Microsoft Visual Studio Solution File, Format Version 12.00
2-
# Visual Studio 2013
3-
VisualStudioVersion = 12.0.31101.0
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio 15
3+
VisualStudioVersion = 15.0.27130.2027
44
MinimumVisualStudioVersion = 10.0.40219.1
55
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E454F68D-C4C2-4D44-8761-E1E6C6276EB8}"
66
ProjectSection(SolutionItems) = preProject
77
NHibernate.snk = NHibernate.snk
8+
NHibernate.Mapping.Attributes.props = NHibernate.Mapping.Attributes.props
89
EndProjectSection
910
EndProject
1011
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generator", "Generator\Generator.csproj", "{22CADD56-EF07-4040-A171-BC5A3AB896FD}"
1112
EndProject
1213
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Refly", "Refly\Refly.csproj", "{53086B22-3A6C-4017-ADB7-F22BF49FFF58}"
1314
EndProject
14-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.Mapping.Attributes", "NHibernate.Mapping.Attributes\NHibernate.Mapping.Attributes.csproj", "{AE0F3023-0ED6-45BE-8995-8C3B2E585A20}"
15-
EndProject
1615
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.Mapping.Attributes.Test", "NHibernate.Mapping.Attributes.Test\NHibernate.Mapping.Attributes.Test.csproj", "{A6585067-79C1-41A9-A006-A83C3A800B21}"
1716
EndProject
17+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NHibernate.Mapping.Attributes", "NHibernate.Mapping.Attributes\NHibernate.Mapping.Attributes.csproj", "{BA0B9218-3A5D-4842-9E75-D71DF3BDE65F}"
18+
EndProject
1819
Global
1920
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2021
Debug|Any CPU = Debug|Any CPU
@@ -29,16 +30,19 @@ Global
2930
{53086B22-3A6C-4017-ADB7-F22BF49FFF58}.Debug|Any CPU.Build.0 = Debug|Any CPU
3031
{53086B22-3A6C-4017-ADB7-F22BF49FFF58}.Release|Any CPU.ActiveCfg = Release|Any CPU
3132
{53086B22-3A6C-4017-ADB7-F22BF49FFF58}.Release|Any CPU.Build.0 = Release|Any CPU
32-
{AE0F3023-0ED6-45BE-8995-8C3B2E585A20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33-
{AE0F3023-0ED6-45BE-8995-8C3B2E585A20}.Debug|Any CPU.Build.0 = Debug|Any CPU
34-
{AE0F3023-0ED6-45BE-8995-8C3B2E585A20}.Release|Any CPU.ActiveCfg = Release|Any CPU
35-
{AE0F3023-0ED6-45BE-8995-8C3B2E585A20}.Release|Any CPU.Build.0 = Release|Any CPU
3633
{A6585067-79C1-41A9-A006-A83C3A800B21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
3734
{A6585067-79C1-41A9-A006-A83C3A800B21}.Debug|Any CPU.Build.0 = Debug|Any CPU
3835
{A6585067-79C1-41A9-A006-A83C3A800B21}.Release|Any CPU.ActiveCfg = Release|Any CPU
3936
{A6585067-79C1-41A9-A006-A83C3A800B21}.Release|Any CPU.Build.0 = Release|Any CPU
37+
{BA0B9218-3A5D-4842-9E75-D71DF3BDE65F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
38+
{BA0B9218-3A5D-4842-9E75-D71DF3BDE65F}.Debug|Any CPU.Build.0 = Debug|Any CPU
39+
{BA0B9218-3A5D-4842-9E75-D71DF3BDE65F}.Release|Any CPU.ActiveCfg = Release|Any CPU
40+
{BA0B9218-3A5D-4842-9E75-D71DF3BDE65F}.Release|Any CPU.Build.0 = Release|Any CPU
4041
EndGlobalSection
4142
GlobalSection(SolutionProperties) = preSolution
4243
HideSolutionNode = FALSE
4344
EndGlobalSection
45+
GlobalSection(ExtensibilityGlobals) = postSolution
46+
SolutionGuid = {5BB0227F-ECE1-4DC7-8F89-3FF67E0484CB}
47+
EndGlobalSection
4448
EndGlobal

0 commit comments

Comments
 (0)