Skip to content

Commit

Permalink
Migrated the solution projects to .net standard 1.6 and full .net 4.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
A-Sabet committed Jul 6, 2017
1 parent 2b8d9fe commit bf39440
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 33 deletions.
8 changes: 7 additions & 1 deletion SharpSimpleNLG.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.14
VisualStudioVersion = 15.0.26430.15
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Documentation", "Documentation", "{B3B6ECC4-364C-462E-ACEB-EA8304C04F1F}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -18,6 +18,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpSimpleNLGDotNet45", "S
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharpSimpleNLG", "SharpSimpleNLG\SharpSimpleNLG.csproj", "{16F344A8-B688-4D95-8DA6-2E207D47AECB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpSimpleNLGConsoleNetCore", "SharpSimpleNLGConsoleNetCore\SharpSimpleNLGConsoleNetCore.csproj", "{3E619416-20EC-429F-A467-9F7BFE8BACB1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -40,6 +42,10 @@ Global
{16F344A8-B688-4D95-8DA6-2E207D47AECB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{16F344A8-B688-4D95-8DA6-2E207D47AECB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{16F344A8-B688-4D95-8DA6-2E207D47AECB}.Release|Any CPU.Build.0 = Release|Any CPU
{3E619416-20EC-429F-A467-9F7BFE8BACB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3E619416-20EC-429F-A467-9F7BFE8BACB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3E619416-20EC-429F-A467-9F7BFE8BACB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3E619416-20EC-429F-A467-9F7BFE8BACB1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
31 changes: 14 additions & 17 deletions SharpSimpleNLG/SharpSimpleNLG.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<VersionPrefix>1.1.0</VersionPrefix>
<TargetFrameworks>net45;netstandard1.3</TargetFrameworks>
<TargetFrameworks>net462;netstandard1.6</TargetFrameworks>
<AssemblyName>SharpSimpleNLG</AssemblyName>
<PackageId>SharpSimpleNLG</PackageId>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
Expand All @@ -14,27 +14,24 @@
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.6'">
<OutputPath>bin\$(Configuration)\$(Framework)</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net462'">
<DefineConstants>FULLNET</DefineConstants>
<OutputPath>bin\$(Configuration)\$(Framework)</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>none</DebugType>
<DebugSymbols>False</DebugSymbols>
</PropertyGroup>

<ItemGroup>
<EmbeddedResource Include="lexicon\default-lexicon.xml" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<Reference Include="System.Runtime" />
<Reference Include="System.Xml" />
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<PackageReference Include="System.Collections" Version="4.0.11-*" />
<PackageReference Include="System.Console" Version="4.0.0-*" />
<PackageReference Include="System.Diagnostics.Debug" Version="4.0.11-*" />
<PackageReference Include="System.IO.FileSystem" Version="4.0.1-*" />
<PackageReference Include="System.Linq" Version="4.1.0-*" />
<PackageReference Include="System.Reflection.Extensions" Version="4.0.1-*" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.1.0-*" />
<PackageReference Include="System.Xml.XmlDocument" Version="4.0.1-*" />
<ItemGroup>
<PackageReference Include="System.Xml.XmlDocument" Version="4.3.0" />
</ItemGroup>

</Project>
46 changes: 46 additions & 0 deletions SharpSimpleNLGConsoleNetCore/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using SimpleNLG;
using System;
using System.Collections.Generic;

namespace SharpSimpleNLGConsoleNetCore
{
class Program
{
public static void Main(string[] args)
{
var ss = new XMLLexicon();
var Factory = new NLGFactory(ss);
var Realiser = new Realiser(ss);

// Instructions will be given to you by the director.

var verbp = Factory.createVerbPhrase("be given");
verbp.setFeature(Feature.TENSE.ToString(), Tense.FUTURE);
var subj = Factory.createNounPhrase("The Director");
var oobj = Factory.createNounPhrase("Instruction");
var ioobj = Factory.createNounPhrase("you");
subj.setPlural(false);
oobj.setPlural(true);

var s = new List<INLGElement>() { verbp, subj, oobj, ioobj };

var clause = Factory.createClause();

clause.setVerb(verbp);
clause.setSubject(subj);
clause.setObject(oobj);
clause.setIndirectObject(ioobj);


var sentence = Factory.createSentence(clause);
sentence.setFeature(Feature.TENSE.ToString(), Tense.FUTURE);

var active = Realiser.realise(sentence).ToString();

Console.WriteLine($"{active}");

Console.WriteLine("done");
Console.ReadLine();
}
}
}
12 changes: 12 additions & 0 deletions SharpSimpleNLGConsoleNetCore/SharpSimpleNLGConsoleNetCore.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.1</TargetFramework>
</PropertyGroup>

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

</Project>
20 changes: 8 additions & 12 deletions SharpSimpleNLGTests/SharpSimpleNLGTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,17 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="FluentAssertions, Version=4.9.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.9.0\lib\net45\FluentAssertions.dll</HintPath>
<Private>True</Private>
<Reference Include="FluentAssertions, Version=4.19.3.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.19.3\lib\net45\FluentAssertions.dll</HintPath>
</Reference>
<Reference Include="FluentAssertions.Core, Version=4.9.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.9.0\lib\net45\FluentAssertions.Core.dll</HintPath>
<Private>True</Private>
<Reference Include="FluentAssertions.Core, Version=4.19.3.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.19.3\lib\net45\FluentAssertions.Core.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.2.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.2.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
<Reference Include="nunit.framework, Version=3.7.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.7.1\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="Shouldly, Version=2.7.0.0, Culture=neutral, PublicKeyToken=6042cbcb05cbc941, processorArchitecture=MSIL">
<HintPath>..\packages\Shouldly.2.7.0\lib\net40\Shouldly.dll</HintPath>
<Private>True</Private>
<Reference Include="Shouldly, Version=2.8.3.0, Culture=neutral, PublicKeyToken=6042cbcb05cbc941, processorArchitecture=MSIL">
<HintPath>..\packages\Shouldly.2.8.3\lib\net451\Shouldly.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
Expand Down
6 changes: 3 additions & 3 deletions SharpSimpleNLGTests/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FluentAssertions" version="4.9.0" targetFramework="net452" />
<package id="NUnit" version="3.2.1" targetFramework="net452" />
<package id="Shouldly" version="2.7.0" targetFramework="net452" />
<package id="FluentAssertions" version="4.19.3" targetFramework="net462" />
<package id="NUnit" version="3.7.1" targetFramework="net462" />
<package id="Shouldly" version="2.8.3" targetFramework="net462" />
</packages>

0 comments on commit bf39440

Please sign in to comment.