Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change target framework from .NET Standard 1.6 to 2.0, and move .NET Core tests to .NET 5 #572

Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions buildscripts/BuildScripts.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net461;netcoreapp1.1</TargetFrameworks>
<TargetFramework>net5.0</TargetFramework>
jonorossi marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>

<PropertyGroup>
<SignAssembly>False</SignAssembly>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<AssemblyOriginatorKeyFile>CastleKey.snk</AssemblyOriginatorKeyFile>
<FrameworkPathOverride Condition="'$(OS)'=='Unix'AND'$(TargetFramework)'=='net461'">$(NuGetPackageFolders)microsoft.targetingpack.netframework.v4.6.1\1.0.1\lib\net461\</FrameworkPathOverride>
</PropertyGroup>

<ItemGroup>
<PackageReference Condition="'$(OS)'=='Unix'AND'$(TargetFramework)'=='net461'" Include="Microsoft.TargetingPack.NETFramework.v4.6.1" Version="1.0.1" ExcludeAssets="All" PrivateAssets="All" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net45;netstandard1.6</TargetFrameworks>
<TargetFrameworks>net45;netstandard2.0;net5.0</TargetFrameworks>
</PropertyGroup>

<Import Project="..\..\buildscripts\common.props"></Import>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Castle.Core" Version="4.3.1" />
<PackageReference Include="Castle.Core-log4net" Version="4.3.1" />
<PackageReference Include="Castle.Core" Version="4.4.1" />
<PackageReference Include="Castle.Core-log4net" Version="4.4.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="11.0.0" />
<PackageReference Include="NUnit" Version="3.8.1" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net461</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.2;netcoreapp3.1;net5.0;</TargetFrameworks>

<IsPackable>false</IsPackable>

Expand Down
20 changes: 8 additions & 12 deletions src/Castle.Windsor.Tests/Castle.Windsor.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net45;netcoreapp1.0</TargetFrameworks>
<TargetFrameworks>net45;netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>

<Import Project="..\..\buildscripts\common.props"></Import>
Expand Down Expand Up @@ -43,23 +43,19 @@
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<PackageReference Include="NUnit" Version="3.8.1" />
<ItemGroup>
<PackageReference Include="Castle.Core" Version="4.4.1" />
<PackageReference Include="Castle.Core-log4net" Version="4.4.1" />
<PackageReference Include="Castle.Core-NLog" Version="4.4.1" />
<PackageReference Include="NUnit" Version="3.8.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
</ItemGroup>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net45'">
<PackageReference Include="Castle.Core" Version="4.3.1" />
<PackageReference Include="Castle.Core-log4net" Version="4.3.1" />
<PackageReference Include="Castle.Core-NLog" Version="4.3.1" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="11.0.0" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="11.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp1.0'">
<PackageReference Include="System.Reflection.Extensions" Version="4.3.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Castle.Facilities.Logging\Castle.Facilities.Logging.csproj" />
<ProjectReference Include="..\Castle.Windsor\Castle.Windsor.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.Windsor.Tests/CircularDependencyTestCase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public string Path
{
get
{
var uriPath = new Uri(typeof(AssemblyPath).GetTypeInfo().Assembly.CodeBase);
var uriPath = new Uri(typeof(AssemblyPath).GetTypeInfo().Assembly.Location);
return uriPath.LocalPath;
}
}
Expand Down
22 changes: 15 additions & 7 deletions src/Castle.Windsor/Castle.Windsor.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net45;netstandard1.6</TargetFrameworks>
<TargetFrameworks>net45;netstandard2.0;net5.0</TargetFrameworks>
jonorossi marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>

<Import Project="..\..\buildscripts\common.props"></Import>
Expand Down Expand Up @@ -33,10 +33,18 @@
<Reference Include="System.Web" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netstandard1.6'">
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="4.3.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="1.1.2" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0' OR '$(TargetFramework)'=='net5.0'">
generik0 marked this conversation as resolved.
Show resolved Hide resolved
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="4.3.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="2.1.0" />
</ItemGroup>
generik0 marked this conversation as resolved.
Show resolved Hide resolved

<ItemGroup Condition="'$(TargetFramework)'=='net5.0'">
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="5.0.0" />
</ItemGroup>
generik0 marked this conversation as resolved.
Show resolved Hide resolved

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,17 @@ private static void SetCurrentScope(CallContextLifetimeScope lifetimeScope)
[SecuritySafeCritical]
public static CallContextLifetimeScope ObtainCurrentScope()
{
object scopeKey;
#if FEATURE_REMOTING
var scopeKey = CallContext.LogicalGetData(callContextKey);
scopeKey = CallContext.LogicalGetData(callContextKey);
#else
var scopeKey = asyncLocal.Value;
scopeKey = asyncLocal.Value;
#endif
if (scopeKey == null)
if (!(scopeKey is Guid))
{
return null;
}

CallContextLifetimeScope scope;
allScopes.TryGetValue((Guid)scopeKey, out scope);
allScopes.TryGetValue((Guid)scopeKey, out var scope);
return scope;
}
}
Expand Down