-
Notifications
You must be signed in to change notification settings - Fork 458
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
Update Castle.Windsor.Extensions.DependencyInjection to support .NET8 #668
Open
alkampfergit
wants to merge
21
commits into
castleproject:master
Choose a base branch
from
alkampfergit:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,484
−114
Open
Changes from 19 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
08ad3dc
Refs: #646 Castle.Windsor.Extension.DepencencyInjection removed null
AGiorgetti a8347ea
ExtensionContainerRootsScopeAccessor might return a null root scope in
AGiorgetti ba03d1b
Added More failing test cases
AGiorgetti df9dd36
Added Threadpool.Unsafe... failing tests, added comments on critical
AGiorgetti 64df1b0
Improved tests and comments
AGiorgetti 28ac185
Option to map custom NetStatic to Castle Singleton lifestyle.
AGiorgetti a210c2a
RootScope AsyncLocal cache can be null when AspNetCore tries to create
AGiorgetti b390405
Improved Tests showing supported, unsupported and memory leaks scenarios
AGiorgetti b997da0
Added comments on WindsorScopedServiceProvider dispose
AGiorgetti 5532539
Updated Castle.Windsor reference to nuget package to create private
AGiorgetti 518cc84
Added NuGet package build instructions
AGiorgetti 81c6b05
added gitversion
alkampfergit 3707b52
Update to work with .NET 8 dependency registration.
alkampfergit 1830955
Fixed bug in missing root scope with orleans/kestrel.
alkampfergit 7437a7c
Added logic to support multiple container in .NET 8 DI
alkampfergit 36bbbf1
Changed constants in keyedregistration helper.
alkampfergit 17d1010
Updated nuget test adapter fixed a resolution bug
alkampfergit 9499d3a
Fixed IsDefault() usage in DependencyInjectionAdapter
alkampfergit b71829c
Fixed (again) resolution rules during resolve.
alkampfergit 495fc21
Cleanup from PR Requests
alkampfergit 3d01d65
Remove wrong disposal of container
alkampfergit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
branches: {} | ||
ignore: | ||
sha: [] | ||
merge-message-formats: {} | ||
mode: ContinuousDeployment | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"version": 1, | ||
"isRoot": true, | ||
"tools": { | ||
"nswag.consolecore": { | ||
"version": "14.0.0", | ||
"commands": [ | ||
"nswag" | ||
] | ||
}, | ||
"gitversion.tool": { | ||
"version": "5.2.4", | ||
"commands": [ | ||
"dotnet-gitversion" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ indent_size = 2 | |
[*.cs] | ||
indent_style = tab | ||
indent_size = 4 | ||
csharp_new_line_before_open_brace = all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
{ | ||
"version": "0.1.0", | ||
"version": "2.0.0", | ||
"command": "dotnet", | ||
"isShellCommand": true, | ||
"args": [], | ||
"tasks": [ | ||
{ | ||
"taskName": "build", | ||
"label": "build", | ||
"type": "shell", | ||
"command": "dotnet", | ||
"args": [ | ||
"build", | ||
"${workspaceRoot}/src/Castle.Windsor.Tests/Castle.Windsor.Tests.csproj" | ||
], | ||
"isBuildCommand": true, | ||
"problemMatcher": "$msCompile" | ||
"problemMatcher": "$msCompile", | ||
"group": { | ||
"_id": "build", | ||
"isDefault": false | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"version": "0.1.0", | ||
"command": "dotnet", | ||
"isShellCommand": true, | ||
"args": [], | ||
"tasks": [ | ||
{ | ||
"taskName": "build", | ||
"args": [ | ||
"${workspaceRoot}/src/Castle.Windsor.Tests/Castle.Windsor.Tests.csproj" | ||
], | ||
"isBuildCommand": true, | ||
"problemMatcher": "$msCompile" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@ECHO OFF | ||
REM **************************************************************************** | ||
REM Copyright 2004-2013 Castle Project - http://www.castleproject.org/ | ||
REM Licensed under the Apache License, Version 2.0 (the "License"); | ||
REM you may not use this file except in compliance with the License. | ||
REM You may obtain a copy of the License at | ||
REM | ||
REM http://www.apache.org/licenses/LICENSE-2.0 | ||
REM | ||
REM Unless required by applicable law or agreed to in writing, software | ||
REM distributed under the License is distributed on an "AS IS" BASIS, | ||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
REM See the License for the specific language governing permissions and | ||
REM limitations under the License. | ||
REM **************************************************************************** | ||
|
||
@call buildscripts\build_without_wcf_tests.cmd %* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
@ECHO OFF | ||
REM **************************************************************************** | ||
REM Copyright 2004-2013 Castle Project - http://www.castleproject.org/ | ||
REM Licensed under the Apache License, Version 2.0 (the "License"); | ||
REM you may not use this file except in compliance with the License. | ||
REM You may obtain a copy of the License at | ||
REM | ||
REM http://www.apache.org/licenses/LICENSE-2.0 | ||
REM | ||
REM Unless required by applicable law or agreed to in writing, software | ||
REM distributed under the License is distributed on an "AS IS" BASIS, | ||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
REM See the License for the specific language governing permissions and | ||
REM limitations under the License. | ||
REM **************************************************************************** | ||
|
||
if "%1" == "" goto no_config | ||
if "%1" NEQ "" goto set_config | ||
|
||
:set_config | ||
SET Configuration=%1 | ||
GOTO restore_packages | ||
|
||
:no_config | ||
SET Configuration=Release | ||
GOTO restore_packages | ||
|
||
:restore_packages | ||
dotnet restore ./tools/Explicit.NuGet.Versions/Explicit.NuGet.Versions.csproj | ||
dotnet restore ./buildscripts/BuildScripts.csproj | ||
dotnet restore ./src/Castle.Windsor/Castle.Windsor.csproj | ||
dotnet restore ./src/Castle.Facilities.Logging/Castle.Facilities.Logging.csproj | ||
dotnet restore ./src/Castle.Facilities.AspNet.SystemWeb/Castle.Facilities.AspNet.SystemWeb.csproj | ||
dotnet restore ./src/Castle.Facilities.AspNet.SystemWeb.Tests/Castle.Facilities.AspNet.SystemWeb.Tests.csproj | ||
dotnet restore ./src/Castle.Facilities.AspNet.Mvc/Castle.Facilities.AspNet.Mvc.csproj | ||
dotnet restore ./src/Castle.Facilities.AspNet.Mvc.Tests/Castle.Facilities.AspNet.Mvc.Tests.csproj | ||
dotnet restore ./src/Castle.Facilities.AspNet.WebApi/Castle.Facilities.AspNet.WebApi.csproj | ||
dotnet restore ./src/Castle.Facilities.AspNet.WebApi.Tests/Castle.Facilities.AspNet.WebApi.Tests.csproj | ||
dotnet restore ./src/Castle.Facilities.AspNetCore/Castle.Facilities.AspNetCore.csproj | ||
dotnet restore ./src/Castle.Facilities.AspNetCore.Tests/Castle.Facilities.AspNetCore.Tests.csproj | ||
dotnet restore ./src/Castle.Windsor.Extensions.DependencyInjection.Tests/Castle.Windsor.Extensions.DependencyInjection.Tests.csproj | ||
dotnet restore ./src/Castle.Windsor.Extensions.DependencyInjection/Castle.Windsor.Extensions.DependencyInjection.csproj | ||
dotnet restore ./src/Castle.Windsor.Extensions.Hosting/Castle.Windsor.Extensions.Hosting.csproj | ||
dotnet restore ./src/Castle.Facilities.WcfIntegration/Castle.Facilities.WcfIntegration.csproj | ||
dotnet restore ./src/Castle.Facilities.WcfIntegration.Demo/Castle.Facilities.WcfIntegration.Demo.csproj | ||
dotnet restore ./src/Castle.Facilities.WcfIntegration.Tests/Castle.Facilities.WcfIntegration.Tests.csproj | ||
dotnet restore ./src/Castle.Windsor.Tests/Castle.Windsor.Tests.csproj | ||
|
||
|
||
GOTO build | ||
|
||
:build | ||
dotnet build ./tools/Explicit.NuGet.Versions/Explicit.NuGet.Versions.sln | ||
dotnet build Castle.Windsor.sln -c %Configuration% | ||
GOTO test | ||
|
||
:test | ||
|
||
echo ------------- | ||
echo Running Tests | ||
echo ------------- | ||
|
||
dotnet test src\Castle.Windsor.Tests || exit /b 1 | ||
dotnet test src\Castle.Windsor.Extensions.DependencyInjection.Tests || exit /b 1 | ||
dotnet test src\Castle.Facilities.AspNetCore.Tests || exit /b 1 | ||
dotnet test src\Castle.Facilities.AspNet.SystemWeb.Tests || exit /b 1 | ||
dotnet test src\Castle.Facilities.AspNet.Mvc.Tests || exit /b 1 | ||
dotnet test src\Castle.Facilities.AspNet.WebApi.Tests || exit /b 1 | ||
rem dotnet test src\Castle.Facilities.WcfIntegration.Tests || exit /b 1 | ||
|
||
GOTO nuget_explicit_versions | ||
|
||
:nuget_explicit_versions | ||
|
||
.\tools\Explicit.NuGet.Versions\build\nev.exe ".\build" "castle.windsor" | ||
.\tools\Explicit.NuGet.Versions\build\nev.exe ".\build" "castle.loggingfacility" | ||
.\tools\Explicit.NuGet.Versions\build\nev.exe ".\build" "castle.windsor.extensions.dependencyinjection" | ||
.\tools\Explicit.NuGet.Versions\build\nev.exe ".\build" "castle.windsor.extensions.hosting" | ||
.\tools\Explicit.NuGet.Versions\build\nev.exe ".\build" "castle.facilities.aspnetcore" | ||
.\tools\Explicit.NuGet.Versions\build\nev.exe ".\build" "castle.facilities.aspnet.mvc" | ||
.\tools\Explicit.NuGet.Versions\build\nev.exe ".\build" "castle.facilities.aspnet.webapi" | ||
.\tools\Explicit.NuGet.Versions\build\nev.exe ".\build" "castle.facilities.aspnet.systemweb" | ||
.\tools\Explicit.NuGet.Versions\build\nev.exe ".\build" "castle.wcfintegrationfacility" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks> | ||
<TargetFrameworks>netcoreapp3.1;net6.0;net8.0</TargetFrameworks> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Others have said we can add support for keyed services without adding another compile target, that sounds like a good idea. Windsor should then support .NET 6 until at least end of support (November 12, 2024) and then upgrade to the next LTS. |
||
|
||
<IsPackable>false</IsPackable> | ||
|
||
|
@@ -11,11 +11,11 @@ | |
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" /> | ||
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.7.0" /> | ||
<PackageReference Include="xunit" Version="2.4.1" /> | ||
<PackageReference Include="xunit.assert" Version="2.4.1" /> | ||
<PackageReference Include="xunit.extensibility.core" Version="2.4.1" /> | ||
<PackageReference Include="xunit" Version="2.4.2" /> | ||
<PackageReference Include="xunit.assert" Version="2.4.2" /> | ||
<PackageReference Include="xunit.extensibility.core" Version="2.4.2" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" /> | ||
</ItemGroup> | ||
|
||
|
@@ -29,6 +29,15 @@ | |
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Specification.Tests" Version="6.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)'=='net8.0'"> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Specification.Tests" Version="8.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Castle.Windsor.Extensions.DependencyInjection\Castle.Windsor.Extensions.DependencyInjection.csproj" /> | ||
</ItemGroup> | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep the pull request to just adding support for .NET 8. The diff is 2600+ LOCs.