-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Add AddSystemd() and AddWindowsService() IServiceCollection extension methods #68580
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
0e4ef09
Add UseSystemd() IServiceCollection extension method
halter73 4c43f67
Add UseWindowsService() IServiceCollection extension method
halter73 f72c52a
Target Windows for UseWindowsServiceTests
halter73 ab98295
Stop throwing InvalidOperationExceptions from WindowsServiceLifetime
halter73 4fbef8a
Don't default to CWD if in C:\Windows\system32
halter73 2fa2074
Use* to Add* renames
halter73 e4f3717
Apply suggestions from code review
halter73 9c32c8f
UseSystemd to AddSystemd ref fixup
halter73 cc1ac58
UseWindowsService to AddWindowsService ref fixup
halter73 1f72a35
Remove extraneous code and outdated comments
halter73 decb55f
Fix more outdated comments
halter73 155fbe8
delete more
halter73 55dcac6
Complete comment in ApplyDefaultHostConfiguration
halter73 4cbc772
Keep the tests hygienic
halter73 fd7bf27
less var
halter73 aaf291e
Try fixing CreateDefaultBuilder_DoesNotChangeContentRootIfCurrentDire…
halter73 9bc0208
What's really going on?
halter73 2961686
Use RemoteExecutor
halter73 2df3de4
Update src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Hos…
halter73 ce29cd6
Skip test on Windows nano server
eerhardt 23e903d
Respond to PR feedback
eerhardt 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
9 changes: 7 additions & 2 deletions
9
...s.Hosting.WindowsServices/tests/Microsoft.Extensions.Hosting.WindowsServices.Tests.csproj
This file contains hidden or 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,12 +1,17 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>$(NetCoreAppCurrent);$(NetFrameworkMinimum)</TargetFrameworks> | ||
| <!-- Use "$(NetCoreAppCurrent)-windows" to avoid PlatformNotSupportedExceptions from ServiceController. --> | ||
| <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetFrameworkMinimum)</TargetFrameworks> | ||
| <EnableDefaultItems>true</EnableDefaultItems> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\src\Microsoft.Extensions.Hosting.WindowsServices.csproj" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'"> | ||
| <Reference Include="System.ServiceProcess" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
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.
Uh oh!
There was an error while loading. Please reload this page.