Skip to content

Commit

Permalink
Improve .NET 2.0 configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
aaubry committed Jun 26, 2017
1 parent 1981724 commit 6383edb
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 39 deletions.
9 changes: 9 additions & 0 deletions YamlDotNet.Test/YamlDotNet.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-Net20-Unsigned|AnyCPU' ">
<TargetFrameworks>net452</TargetFrameworks>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release-Net20-Unsigned\</OutputPath>
<DefineConstants>TRACE;NET20</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-DotNetStandard-Unsigned|AnyCPU' ">
<TargetFrameworks>netcoreapp1.0</TargetFrameworks>
<DebugType>pdbonly</DebugType>
Expand Down
22 changes: 2 additions & 20 deletions YamlDotNet.sln
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ Global
{A9F67018-0240-4D16-A4EA-BCB780D0AF05}.Release-DotNetStandard-Signed|Any CPU.ActiveCfg = Release-DotNetStandard-Unsigned|Any CPU
{A9F67018-0240-4D16-A4EA-BCB780D0AF05}.Release-DotNetStandard-Unsigned|Any CPU.ActiveCfg = Release-DotNetStandard-Unsigned|Any CPU
{A9F67018-0240-4D16-A4EA-BCB780D0AF05}.Release-DotNetStandard-Unsigned|Any CPU.Build.0 = Release-DotNetStandard-Unsigned|Any CPU
{A9F67018-0240-4D16-A4EA-BCB780D0AF05}.Release-Net20-Unsigned|Any CPU.ActiveCfg = Release-Unsigned|Any CPU
{A9F67018-0240-4D16-A4EA-BCB780D0AF05}.Release-Net20-Unsigned|Any CPU.Build.0 = Release-Unsigned|Any CPU
{A9F67018-0240-4D16-A4EA-BCB780D0AF05}.Release-Net20-Unsigned|Any CPU.ActiveCfg = Release-Net20-Unsigned|Any CPU
{A9F67018-0240-4D16-A4EA-BCB780D0AF05}.Release-Net20-Unsigned|Any CPU.Build.0 = Release-Net20-Unsigned|Any CPU
{A9F67018-0240-4D16-A4EA-BCB780D0AF05}.Release-Portable-Signed|Any CPU.ActiveCfg = Release-Portable-Unsigned|Any CPU
{A9F67018-0240-4D16-A4EA-BCB780D0AF05}.Release-Portable-Unsigned|Any CPU.ActiveCfg = Release-Portable-Unsigned|Any CPU
{A9F67018-0240-4D16-A4EA-BCB780D0AF05}.Release-Portable-Unsigned|Any CPU.Build.0 = Release-Portable-Unsigned|Any CPU
Expand Down Expand Up @@ -216,24 +216,6 @@ Global
{CE856C44-2FE0-4AFA-99CE-F8A076F1BA11}.Release-Unsigned|Any CPU.ActiveCfg = Release|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Debug-AOT|Any CPU.ActiveCfg = Debug|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Debug-Net20|Any CPU.ActiveCfg = Debug|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Debug-UnitySubset-v35|Any CPU.ActiveCfg = Debug|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.PerformanceTests|Any CPU.ActiveCfg = Release-Unsigned|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.PerformanceTests|Any CPU.Build.0 = Release-Unsigned|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Release-DotNetStandard-Signed|Any CPU.ActiveCfg = Release-Unsigned|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Release-DotNetStandard-Signed|Any CPU.Build.0 = Release-Unsigned|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Release-DotNetStandard-Unsigned|Any CPU.ActiveCfg = Release-Unsigned|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Release-DotNetStandard-Unsigned|Any CPU.Build.0 = Release-Unsigned|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Release-Net20-Unsigned|Any CPU.ActiveCfg = Release-Unsigned|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Release-Portable-Signed|Any CPU.ActiveCfg = Release-Unsigned|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Release-Portable-Signed|Any CPU.Build.0 = Release-Unsigned|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Release-Portable-Unsigned|Any CPU.ActiveCfg = Release-Unsigned|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Release-Portable-Unsigned|Any CPU.Build.0 = Release-Unsigned|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Release-Signed|Any CPU.ActiveCfg = Release-Unsigned|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Release-Signed|Any CPU.Build.0 = Release-Unsigned|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Release-UnitySubset-v35|Any CPU.ActiveCfg = Release-Unsigned|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Release-UnitySubset-v35|Any CPU.Build.0 = Release-Unsigned|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Release-Unsigned|Any CPU.ActiveCfg = Release-Unsigned|Any CPU
{689D2A30-C52E-4CF8-8BA1-3178F4EB245A}.Release-Unsigned|Any CPU.Build.0 = Release-Unsigned|Any CPU
{747DD2E9-2A0A-4D5E-8D97-85AA9AC5A036}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down
7 changes: 4 additions & 3 deletions YamlDotNet/Helpers/ExpressionExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
using System;
#if !NET20

using System;
using System.Reflection;
using System.Linq.Expressions;

namespace YamlDotNet.Helpers
{
public static class ExpressionExtensions
{
#if !NET20
/// <summary>
/// Returns the <see cref="PropertyInfo" /> that describes the property that
/// is being returned in an expression in the form:
Expand Down Expand Up @@ -59,6 +60,6 @@ private static TMemberInfo TryGetMemberExpression<TMemberInfo>(LambdaExpression

return memberExpression.Member as TMemberInfo;
}
#endif
}
}
#endif
6 changes: 6 additions & 0 deletions YamlDotNet/Helpers/Portability.cs
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,12 @@ namespace YamlDotNet // To allow these to be public without clashing with the st
public delegate TResult Func<TArg1, TArg2, TArg3, TResult>(TArg1 arg1, TArg2 arg2, TArg3 arg3);
}

namespace System.Linq.Expressions
{
// Do not remove.
// Avoids code breaking on .NET 2.0 due to using System.Linq.Expressions.
}

namespace System.Linq
{
using YamlDotNet;
Expand Down
6 changes: 3 additions & 3 deletions YamlDotNet/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("0.0.1")]
[assembly: AssemblyFileVersion("0.0.0")]
[assembly: AssemblyInformationalVersion("0.0.0")]
[assembly: AssemblyVersion("4.2.2.0")]
[assembly: AssemblyFileVersion("4.2.2.0")]
[assembly: AssemblyInformationalVersion("4.2.2-net20.1+2.Branch.net20.Sha.7ac59dff59fc14c680d855f08c78cba8b9237931")]

[assembly: CLSCompliant(true)]

Expand Down
4 changes: 2 additions & 2 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Task("Build")
BuildSolution(solutionPath, configuration, buildVerbosity);
});

Task("Run-Unit-Tests")
Task("Test")
.IsDependentOn("Build")
.Does(() =>
{
Expand Down Expand Up @@ -239,7 +239,7 @@ Task("Document")

Task("Default")
// .IsDependentOn("Document");
.IsDependentOn("Run-Unit-Tests");
.IsDependentOn("Test");

//////////////////////////////////////////////////////////////////////
// EXECUTION
Expand Down
9 changes: 0 additions & 9 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,4 @@ RUN mono --aot=full /usr/lib/mono/gac/System.Security/4.0.0.0__b03f5f7f11d50a3a/
RUN mono --aot=full /usr/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll
RUN mono --aot=full /usr/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll

# # Add local user
# ARG groupId=1001
# RUN groupadd -g $groupId build

# ARG userId=1001
# RUN useradd -u $userId -g $groupId -ms /bin/bash build
# RUN ln -s /root/.nuget /home/build/.nuget
# USER $userId

CMD [ "bash" ]
3 changes: 2 additions & 1 deletion docker/Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ RUN groupadd -g $groupId build

ARG userId=1001
RUN useradd -u $userId -g $groupId -ms /bin/bash build
RUN ln -s /root/.nuget /home/build/.nuget
RUN mv /root/.nuget /home/build/.nuget
RUN chown -R build:build /home/build/.nuget
USER $userId

CMD [ "bash" ]
3 changes: 2 additions & 1 deletion docker/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash

docker build --build-arg userId=`id -u` --build-arg groupId=`id -g` -t "aaubry/yamldotnet" .
#docker build -t "aaubry/yamldotnet" .
docker build --build-arg userId=`id -u` --build-arg groupId=`id -g` -t "aaubry/yamldotnet.local" -f Dockerfile.local .

0 comments on commit 6383edb

Please sign in to comment.