Skip to content

Commit 1226f84

Browse files
committed
update dotnet core tools, remove project.json
1 parent 5f56f24 commit 1226f84

19 files changed

Lines changed: 112 additions & 244 deletions

Hjson.sln

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
1+
22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26114.2
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hjson", "Hjson\Hjson.csproj", "{FF9E2637-8BD3-4F8D-B563-D105B10D5354}"
77
EndProject

Hjson/Hjson.csproj

100644100755
Lines changed: 17 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,22 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="14.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-
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
6-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
7-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
8-
<ProjectGuid>{FF9E2637-8BD3-4F8D-B563-D105B10D5354}</ProjectGuid>
9-
<OutputType>Library</OutputType>
10-
<AppDesignerFolder>Properties</AppDesignerFolder>
11-
<RootNamespace>Hjson</RootNamespace>
4+
<VersionPrefix>2.1.4</VersionPrefix>
5+
<TargetFramework>netstandard1.3</TargetFramework>
6+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
127
<AssemblyName>Hjson</AssemblyName>
13-
<DefaultLanguage>en-US</DefaultLanguage>
14-
<FileAlignment>512</FileAlignment>
15-
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
16-
<TargetFrameworkProfile>
17-
</TargetFrameworkProfile>
18-
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
8+
<PackageId>Hjson</PackageId>
9+
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
10+
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
11+
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
12+
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
13+
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
14+
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
15+
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
1916
</PropertyGroup>
20-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
21-
<DebugSymbols>true</DebugSymbols>
22-
<DebugType>full</DebugType>
23-
<Optimize>false</Optimize>
24-
<OutputPath>bin\Debug\</OutputPath>
25-
<DefineConstants>DEBUG;TRACE</DefineConstants>
26-
<ErrorReport>prompt</ErrorReport>
27-
<WarningLevel>4</WarningLevel>
28-
</PropertyGroup>
29-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
30-
<DebugType>pdbonly</DebugType>
31-
<Optimize>true</Optimize>
32-
<OutputPath>bin\Release\</OutputPath>
33-
<DefineConstants>TRACE</DefineConstants>
34-
<ErrorReport>prompt</ErrorReport>
35-
<WarningLevel>4</WarningLevel>
36-
<DocumentationFile>..\dist\Hjson.xml</DocumentationFile>
37-
</PropertyGroup>
38-
<ItemGroup>
39-
<!-- A reference to the entire .NET Framework is automatically included -->
40-
<None Include="project.json" />
41-
</ItemGroup>
17+
4218
<ItemGroup>
43-
<Compile Include="HjsonDsf.cs" />
44-
<Compile Include="HjsonOptions.cs" />
45-
<Compile Include="HjsonValue.cs" />
46-
<Compile Include="HjsonWsc.cs" />
47-
<Compile Include="IJsonReader.cs" />
48-
<Compile Include="JsonArray.cs" />
49-
<Compile Include="JsonObject.cs" />
50-
<Compile Include="JsonPrimitive.cs" />
51-
<Compile Include="HjsonReader.cs" />
52-
<Compile Include="BaseReader.cs" />
53-
<Compile Include="HjsonWriter.cs" />
54-
<Compile Include="JsonUtil.cs" />
55-
<Compile Include="JsonWriter.cs" />
56-
<Compile Include="JsonType.cs" />
57-
<Compile Include="JsonValue.cs" />
58-
<Compile Include="JsonReader.cs" />
59-
<Compile Include="Properties\AssemblyInfo.cs" />
19+
<PackageReference Include="Microsoft.NETCore.Portable.Compatibility" Version="1.0.1" />
6020
</ItemGroup>
61-
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
62-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
63-
Other similar extension points exist, see Microsoft.Common.targets.
64-
<Target Name="BeforeBuild">
65-
</Target>
66-
<Target Name="AfterBuild">
67-
</Target>
68-
-->
69-
</Project>
21+
22+
</Project>

Hjson/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
[assembly: System.Reflection.AssemblyDescription("Hjson.dll")]
33
[assembly: System.Reflection.AssemblyProduct("Hjson - https://github.com/hjson/hjson-cs")]
44
[assembly: System.Reflection.AssemblyCopyright("See LICENSE")]
5-
[assembly: System.Reflection.AssemblyFileVersion("2.1.3.0")]
5+
[assembly: System.Reflection.AssemblyFileVersion("2.1.4.0")]
66
[assembly: System.Reflection.AssemblyTitle("Hjson.dll")]
77
[assembly: System.CLSCompliant(true)]

Hjson/project.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

Hjsonc.sln

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
1+
22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26114.2
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Hjsonc", "cli\Hjsonc.xproj", "{30E9C2B9-CD8D-4BE8-9596-29831C4E034F}"
6+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Hjsonc", "cli\Hjsonc.csproj", "{30E9C2B9-CD8D-4BE8-9596-29831C4E034F}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hjson", "src\Hjson.csproj", "{FF9E2637-8BD3-4F8D-B563-D105B10D5354}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hjson", "Hjson\Hjson.csproj", "{FF9E2637-8BD3-4F8D-B563-D105B10D5354}"
99
EndProject
1010
Global
1111
GlobalSection(SolutionConfigurationPlatforms) = preSolution

Test.sln

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
1+
22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26114.2
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Test", "test\Test.xproj", "{51D33DF6-4DFE-4DED-9A06-098B8FE2B493}"
6+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Test", "test\Test.csproj", "{51D33DF6-4DFE-4DED-9A06-098B8FE2B493}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hjson", "src\Hjson.csproj", "{FF9E2637-8BD3-4F8D-B563-D105B10D5354}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hjson", "Hjson\Hjson.csproj", "{FF9E2637-8BD3-4F8D-B563-D105B10D5354}"
99
EndProject
1010
Global
1111
GlobalSection(SolutionConfigurationPlatforms) = preSolution

build-core

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
set -e # exit script on error
3+
BASE=`dirname "$(readlink -f "$0")"`
4+
cd $BASE
5+
6+
VERSION=`cat Hjson/Hjson.csproj | sed -rn 's/.*VersionPrefix>(.*)<\/.*/\1/p'`
7+
VERSION2=`cat Hjson/Properties/AssemblyInfo.cs | sed -rn 's/.*AssemblyFileVersion\("(.*).0"\).*/\1/p'`
8+
if [[ "$VERSION" != "$VERSION2" ]]; then echo error: version mismatch $VERSION:$VERSION2; exit; fi
9+
10+
echo ------------------
11+
echo build core
12+
13+
dotnet restore Hjson
14+
dotnet restore cli
15+
dotnet restore test
16+
dotnet restore sample/sample.csproj
17+
dotnet build Hjson -c Release
18+
dotnet build cli -c Release
19+
dotnet build test -c Release
20+
21+
# test
22+
dotnet run -p test/test.csproj -- test/assets
23+
24+
echo ------------------
25+
echo pkg
26+
27+
dotnet pack Hjson -c Release
28+

build renamed to build-mono

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,9 @@ set -e # exit script on error
33
BASE=`dirname "$(readlink -f "$0")"`
44
cd $BASE
55

6-
VERSION=`cat Hjson/project.json | sed -rn 's/.*version": "(.*)".*/\1/p'`
6+
VERSION=`cat Hjson/Hjson.csproj | sed -rn 's/.*VersionPrefix>(.*)<\/.*/\1/p'`
77
VERSION2=`cat Hjson/Properties/AssemblyInfo.cs | sed -rn 's/.*AssemblyFileVersion\("(.*).0"\).*/\1/p'`
8-
9-
if [[ "$VERSION" != "$VERSION2" ]]; then echo error: version mismatch; exit; fi
10-
11-
echo ------------------
12-
echo build core
13-
14-
dotnet restore
15-
dotnet build Hjson -c Release
16-
dotnet build cli -c Release
17-
dotnet build test -c Release
18-
19-
# test
20-
dotnet run -p test -- test/assets
8+
if [[ "$VERSION" != "$VERSION2" ]]; then echo error: version mismatch $VERSION:$VERSION2; exit; fi
219

2210
echo ------------------
2311
echo build .net

cli/Hjsonc.xproj

Lines changed: 0 additions & 22 deletions
This file was deleted.

cli/cli.csproj

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp1.1</TargetFramework>
5+
<AssemblyName>cli</AssemblyName>
6+
<OutputType>Exe</OutputType>
7+
<PackageId>cli</PackageId>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<ProjectReference Include="..\Hjson\Hjson.csproj" />
12+
</ItemGroup>
13+
14+
</Project>

0 commit comments

Comments
 (0)