Skip to content

Commit cfa9715

Browse files
committed
Build and package a proper .NET Standard 1.0 binary
1 parent 7e19340 commit cfa9715

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

CommonMark.NET.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<file src="CommonMark\bin\$configuration$\net45\CommonMark.*" target="lib\net45\" />
2424
<file src="CommonMark\bin\$configuration$\portable-net4+sl5+win+wpa+wp8\CommonMark.*" target="lib\portable-net40+sl50+wp80+win+wpa81+MonoAndroid10+MonoTouch10\" />
2525
<file src="CommonMark\bin\$configuration$\portable-net45+win+wpa+wp8\CommonMark.*" target="lib\portable-net45+wp80+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\" />
26-
<file src="CommonMark\bin\$configuration$\portable-net45+win+wpa+wp8\CommonMark.*" target="lib\netstandard1.0\" />
26+
<file src="CommonMark\bin\$configuration$\netstandard1.0\CommonMark.*" target="lib\netstandard1.0\" />
2727
<file src="CommonMark.Console\bin\$configuration$\net45\CommonMark.Console.exe" target="tools\cmark.exe" />
2828
<file src="CommonMark.Console\App.nuget.config" target="tools\cmark.exe.config" />
2929
</files>

CommonMark/CommonMark.Base.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<PropertyGroup>
55
<_Profile328>portable-net4+sl5+win+wpa+wp8</_Profile328>
66
<_Profile259>portable-net45+win+wpa+wp8</_Profile259>
7-
<TargetFrameworks>net45;$(_Profile328);$(_Profile259);net40-client;net35-client;net20</TargetFrameworks>
7+
<TargetFrameworks>net45;$(_Profile328);$(_Profile259);netstandard1.0;net40-client;net35-client;net20</TargetFrameworks>
88

99
<RootNamespace>CommonMark</RootNamespace>
1010
<AssemblyName>CommonMark</AssemblyName>
@@ -57,7 +57,7 @@
5757
<Reference Include="System" />
5858
</ItemGroup>
5959
</When>
60-
<When Condition="'$(TargetFramework)' == 'net45'">
60+
<When Condition="'$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netstandard1.0'">
6161
<PropertyGroup>
6262
<DefineConstants>$(DefineConstants),OptimizeFor45</DefineConstants>
6363
</PropertyGroup>

CommonMark/CommonMarkConverter.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ private static Assembly Assembly
2222

2323
private static Assembly InitializeAssembly()
2424
{
25-
#if NETCore || portable_259
25+
#if portable_259 || NETSTANDARD1_0
2626
return typeof(CommonMarkConverter).GetTypeInfo().Assembly;
2727
#else
2828
return typeof(CommonMarkConverter).Assembly;
@@ -46,9 +46,6 @@ public static Version Version
4646

4747
private static Version InitializeVersion()
4848
{
49-
#if NETCore
50-
return new AssemblyName(Assembly.FullName).Version;
51-
#else
5249
// System.Xml is not available so resort to string parsing.
5350
using (var stream = Assembly.GetManifestResourceStream("CommonMark.Properties.CommonMark.NET.nuspec"))
5451
using (var reader = new System.IO.StreamReader(stream, Encoding.UTF8))
@@ -65,7 +62,6 @@ private static Version InitializeVersion()
6562
}
6663
}
6764
return null;
68-
#endif
6965
}
7066

7167
/// <summary>

CommonMark/Parser/Subject.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ public Subject(string buffer, DocumentData documentData)
7272
/// </summary>
7373
public readonly DocumentData DocumentData;
7474

75-
#if !NETCore
7675
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Used by [DebuggerDisplay]")]
77-
#endif
7876
// ReSharper disable once UnusedMethodReturnValue.Local
7977
private string DebugToString()
8078
{

0 commit comments

Comments
 (0)