Skip to content

Commit

Permalink
Fix net35 build error when performing 'dotnet build'
Browse files Browse the repository at this point in the history
  • Loading branch information
hanabi1224 committed Apr 15, 2019
1 parent 97b621e commit ee96667
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 4 deletions.
27 changes: 27 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: 1.0.0.{build}
image:
- Visual Studio 2017
pull_requests:
do_not_increment_build_number: true
branches:
only:
- master
skip_branch_with_pr: true
configuration: Release
before_build:
- cmd: dotnet restore Samples\Senparc.Weixin.MP.Sample.vs2017\Senparc.Weixin.MP.Sample.vs2017.sln
build:
verbosity: minimal
parallel: true
build_script:
- cmd: dotnet build -c Release Samples\Senparc.Weixin.MP.Sample.vs2017\Senparc.Weixin.MP.Sample.vs2017.sln
test_script:
- cmd: dotnet test -c Release Samples\Senparc.Weixin.MP.Sample.vs2017\Senparc.Weixin.MP.Sample.vs2017.sln
artifacts:
- path: '**\*.nupkg'
nuget:
disable_publish_on_pr: true
#deploy:
# provider: NuGet
# api_key:
# secure: <Your secret>
1 change: 1 addition & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<DebugType Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">full</DebugType>
<DebugType Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">portable</DebugType>
<IncludeSymbols>True</IncludeSymbols>
<Net35FrameworkPathOverride>$(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client;$(WINDIR)\Microsoft.NET\Framework\v2.0.50727</Net35FrameworkPathOverride>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
using Senparc.Weixin.CommonAPIs;
using Senparc.CO2NET.Helpers;

#if NET35 || NET40 || NET45
#if NET40 || NET45
using System.Web.Script.Serialization;
#endif

Expand Down Expand Up @@ -237,7 +237,7 @@ public static GetMenuResult GetMenu(string accessTokenOrAppId)
try
{
#if NET35 || NET40 || NET45
#if NET40 || NET45
JavaScriptSerializer js = new JavaScriptSerializer();
var jsonResult = js.Deserialize<GetMenuResultFull>(jsonString);
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net35;net40;net45;netstandard2.0</TargetFrameworks>
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net35'">$(Net35FrameworkPathOverride)</FrameworkPathOverride>
<Version>16.6.15</Version>
<AssemblyName>Senparc.Weixin.MP</AssemblyName>
<RootNamespace>Senparc.Weixin.MP</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net35;net40;net45;netstandard2.0</TargetFrameworks>
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net35'">$(Net35FrameworkPathOverride)</FrameworkPathOverride>
<Version>4.4.5.2</Version>
<AssemblyName>Senparc.Weixin.Open</AssemblyName>
<RootNamespace>Senparc.Weixin.Open</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net35;net40;net45;netstandard2.0</TargetFrameworks>
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net35'">$(Net35FrameworkPathOverride)</FrameworkPathOverride>
<Version>1.2.1</Version>
<AssemblyName>Senparc.Weixin.TenPay</AssemblyName>
<RootNamespace>Senparc.Weixin.TenPay</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net35;net40;net45;netstandard2.0</TargetFrameworks>
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net35'">$(Net35FrameworkPathOverride)</FrameworkPathOverride>
<Version>3.3.10.1</Version>
<AssemblyName>Senparc.Weixin.Work</AssemblyName>
<RootNamespace>Senparc.Weixin.Work</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net35;net40;net45;netstandard2.0</TargetFrameworks>
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net35'">$(Net35FrameworkPathOverride)</FrameworkPathOverride>
<Version>6.3.11</Version>
<AssemblyName>Senparc.Weixin</AssemblyName>
<RootNamespace>Senparc.Weixin</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
using System.Threading.Tasks;
#endif
using System.Text;
#if NET35 || NET40 || NET45
#if NET40 || NET45
using System.Web.Script.Serialization;
#endif
using Senparc.Weixin.Entities;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
using Senparc.Weixin.Exceptions;
using Senparc.CO2NET.Helpers;

#if NET35 || NET40 || NET45
#if NET40 || NET45
using System.Web.Script.Serialization;
using Senparc.Weixin.HttpUtility;
#endif
Expand Down

0 comments on commit ee96667

Please sign in to comment.