Skip to content

Commit

Permalink
Change frameworks to net45;netstandard2.0;net5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
generik0 committed Nov 25, 2020
1 parent 551fc2f commit 9fafb4d
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 17 deletions.
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
4 changes: 2 additions & 2 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;net5.0</TargetFrameworks>
</PropertyGroup>

<Import Project="..\..\buildscripts\common.props"></Import>
Expand Down Expand Up @@ -56,7 +56,7 @@
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="11.0.0" />
</ItemGroup>

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

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>
</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'">
<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>

<ItemGroup Condition="'$(TargetFramework)'=='net5.0'">
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="5.0.0" />
</ItemGroup>

</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

0 comments on commit 9fafb4d

Please sign in to comment.