diff --git a/runtime/CSharp/runtime/CSharp/Antlr4.DotNetCore.sln b/runtime/CSharp/runtime/CSharp/Antlr4.DotNetCore.sln
index 024c7681b..b1c3a1a81 100644
--- a/runtime/CSharp/runtime/CSharp/Antlr4.DotNetCore.sln
+++ b/runtime/CSharp/runtime/CSharp/Antlr4.DotNetCore.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Antlr4.Runtime.DotNetCore", "Antlr4.Runtime.DotNetCore.xproj", "{12962409-846E-4B80-933A-BC484D264132}"
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Antlr4.Runtime.DotNetCore", "Antlr4.Runtime\Antlr4.Runtime.DotNetCore.xproj", "{12962409-846E-4B80-933A-BC484D264132}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime.DotNetCore.xproj b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.DotNetCore.xproj
similarity index 100%
rename from runtime/CSharp/runtime/CSharp/Antlr4.Runtime.DotNetCore.xproj
rename to runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.DotNetCore.xproj
diff --git a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Atn/OrderedATNConfigSet.cs b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Atn/OrderedATNConfigSet.cs
deleted file mode 100644
index f2f8468e5..000000000
--- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Atn/OrderedATNConfigSet.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
- * Use of this file is governed by the BSD 3-clause license that
- * can be found in the LICENSE.txt file in the project root.
- */
-using Antlr4.Runtime.Atn;
-using Antlr4.Runtime.Sharpen;
-
-namespace Antlr4.Runtime.Atn
-{
- /// Sam Harwell
- public class OrderedATNConfigSet : ATNConfigSet
- {
- public OrderedATNConfigSet()
- {
- }
-
- public OrderedATNConfigSet(ATNConfigSet set, bool @readonly)
- : base(set, @readonly)
- {
- }
-
- public override ATNConfigSet Clone(bool @readonly)
- {
- Antlr4.Runtime.Atn.OrderedATNConfigSet copy = new Antlr4.Runtime.Atn.OrderedATNConfigSet(this, @readonly);
- if (!@readonly && this.IsReadOnly)
- {
- copy.AddAll(this);
- }
- return copy;
- }
-
- protected internal override long GetKey(ATNConfig e)
- {
- return e.GetHashCode();
- }
-
- protected internal override bool CanMerge(ATNConfig left, long leftKey, ATNConfig right)
- {
- return left.Equals(right);
- }
- }
-}
diff --git a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Dfa/SparseEdgeMap.cs b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Dfa/SparseEdgeMap.cs
index 8250b2963..22df21487 100644
--- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Dfa/SparseEdgeMap.cs
+++ b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Dfa/SparseEdgeMap.cs
@@ -4,6 +4,7 @@
*/
using System;
using System.Collections.Generic;
+using System.Collections.ObjectModel;
using Antlr4.Runtime.Sharpen;
namespace Antlr4.Runtime.Dfa
diff --git a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Misc/DoubleKeyMap.cs b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Misc/DoubleKeyMap.cs
deleted file mode 100644
index 809b10cc9..000000000
--- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Misc/DoubleKeyMap.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace Antlr4.Runtime.Misc
-{
- public class DoubleKeyMap
- {
- Dictionary> data = new Dictionary>();
-
- public V put(K1 k1, K2 k2, V v)
- {
- Dictionary data2 = data.get(k1);
- V prev = null;
- if (data2 == null)
- {
- data2 = new Dict();
- data.put(k1, data2);
- }
- else {
- prev = data2.get(k2);
- }
- data2.put(k2, v);
- return prev;
- }
-
- public V get(K1 k1, K2 k2)
- {
- Dictionary data2 = data.get(k1);
- if (data2 == null) return null;
- return data2.get(k2);
- }
-
- public Dictionary get(K1 k1) { return data.get(k1); }
-
- /** Get all values associated with primary key */
- public ICollection values(K1 k1)
- {
- Dictionary data2 = data.get(k1);
- if (data2 == null) return null;
- return data2.values();
- }
-
- /** get all primary keys */
- public HashSet keySet()
- {
- return data.keySet();
- }
-
- /** get all secondary keys associated with a primary key */
- public HashSet keySet(K1 k1)
- {
- Dictionary data2 = data.get(k1);
- if (data2 == null) return null;
- return data2.keySet();
- }
- }
-
-}
diff --git a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Misc/MultiMap.cs b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Misc/MultiMap.cs
index ec4e930ee..d7a336a20 100644
--- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Misc/MultiMap.cs
+++ b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Misc/MultiMap.cs
@@ -2,6 +2,7 @@
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
+using System;
using System.Collections.Generic;
using Antlr4.Runtime.Sharpen;
diff --git a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Misc/RuleDependencyChecker.cs b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Misc/RuleDependencyChecker.cs
index 2b7c912ee..4191b1f79 100644
--- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Misc/RuleDependencyChecker.cs
+++ b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Misc/RuleDependencyChecker.cs
@@ -354,7 +354,7 @@ namespace Antlr4.Runtime.Misc
}
foreach (Transition transition in state.transitions)
{
- if (transition.TransitionType != TransitionType.Rule)
+ if (transition.TransitionType != TransitionType.RULE)
{
continue;
}
@@ -459,7 +459,7 @@ namespace Antlr4.Runtime.Misc
{
}
-#if PORTABLE
+#if PORTABLE || DOTNETCORE
public interface ICustomAttributeProvider
{
object[] GetCustomAttributes(Type attributeType, bool inherit);
diff --git a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Tree/ParseTreeProperty.cs b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Tree/ParseTreeProperty.cs
index f7fb9b744..c11d3129a 100644
--- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Tree/ParseTreeProperty.cs
+++ b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Tree/ParseTreeProperty.cs
@@ -2,7 +2,11 @@
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
+#if NET40PLUS
+using System.Collections.Concurrent;
+#else
using Antlr4.Runtime.Sharpen;
+#endif
namespace Antlr4.Runtime.Tree
{
diff --git a/runtime/CSharp/runtime/CSharp/project.json b/runtime/CSharp/runtime/CSharp/project.json
index 50367b60b..baeb6d632 100644
--- a/runtime/CSharp/runtime/CSharp/project.json
+++ b/runtime/CSharp/runtime/CSharp/project.json
@@ -1,16 +1,23 @@
{
- "buildOptions": {
- "define": [ "DEBUG", "TRACE", "DOTNETCORE", "NET40PLUS", "NET45PLUS" ],
- "keyFile": "../Antlr4.snk",
- "xmlDoc": true
- },
- "dependencies": {
- "NETStandard.Library": "1.6.0"
- },
+ "version": "4.5.3-*",
"frameworks": {
- "netstandard1.5": {
- "imports": "dnxcore50"
+ "netstandard1.3": {
+ "dependencies": {
+ "NETStandard.Library": "1.6.1"
+ }
}
},
- "version": "4.5.3-*"
-}
\ No newline at end of file
+ "dependencies": {},
+ "buildOptions": {
+ "xmlDoc": true,
+ "keyFile": "../Antlr4.snk",
+ "define": [
+ "DOTNETCORE",
+ "NET40PLUS",
+ "NET45PLUS"
+ ],
+ "nowarn": [
+ "CS1591"
+ ]
+ }
+}