-
Notifications
You must be signed in to change notification settings - Fork 308
Cross-compile Windows Services hosting package #1189
Conversation
build/dependencies.props
Outdated
@@ -13,5 +13,6 @@ | |||
<SerilogExtensionsLoggingVersion>1.4.0</SerilogExtensionsLoggingVersion> | |||
<SerilogFileSinkVersion>3.2.0</SerilogFileSinkVersion> | |||
<SystemReflectionMetadataVersion>1.5.0-*</SystemReflectionMetadataVersion> | |||
<SystemServiceProcessVersion>4.5.0-*</SystemServiceProcessVersion> |
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.
Should we specify the package name completely? E.g. SystemServiceProcessServiceControllerVersion
. If this setting is desired/necessary at all.
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.
Should we specify the package name completely?
Either way is fine. I'll be deleting this file soon anyways as we move to a system called "lineups" to manage our package versions.
Any reason you need 4.5.0-* specifically? Or will 4.4.0 work?
cref https://github.com/aspnet/Universe/blob/dev/build/dependencies.props#L114
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.
Yeah, I saw a PR of you coming by where you implemented that. Figured it would be fine.
I've used the 4.5.0 packages because the API was added in .NET Core 2.1: dotnet/corefx#22920. I thought this maps to 4.5.0-* packages of the runtime.
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.
Seconded, it's easier if this can be 4.4.0, then we'll update to 4.5.0 at a later date in all repos at once.
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.
The 4.4.0 package only has a few types from System.ServiceProcess.* namespace. 4.5.0 adds more. Which version we need will depends which API is actually referenced from hosting. I haven't looked closely at what we use. If we need 4.5.0 that's no problem, we just need to setup our internal build processes to start using new packages from the corefx team.
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.
This package uses ServiceBase
, which was added in .NET Core 2.1.
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.
Good to know. Then yes, we'll need the 4.5.0 version of the package.
NuGet.config
Outdated
@@ -2,6 +2,7 @@ | |||
<configuration> | |||
<packageSources> | |||
<clear /> | |||
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" /> |
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.
We don't add these feeds directly, we mirror the packages to our feed. @ryanbrandenburg
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.
Yeah, System.ServiceProcess.ServiceController
is already being mirrored to aspnetcore-ci-dev
.
Talked with @Tratcher. It sounds like .NET Core 2.0 doesn't have an implementation of this API yet. We haven't started building for .NET Core 2.1 yet, so this may need to wait. |
I see. Feel free to ping me if we target .NET Core 2.1 and you want me to update this PR. 😄 |
NuGet.config
Outdated
@@ -2,6 +2,7 @@ | |||
<configuration> | |||
<packageSources> | |||
<clear /> | |||
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" /> |
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.
Yeah, System.ServiceProcess.ServiceController
is already being mirrored to aspnetcore-ci-dev
.
build/dependencies.props
Outdated
@@ -13,5 +13,6 @@ | |||
<SerilogExtensionsLoggingVersion>1.4.0</SerilogExtensionsLoggingVersion> | |||
<SerilogFileSinkVersion>3.2.0</SerilogFileSinkVersion> | |||
<SystemReflectionMetadataVersion>1.5.0-*</SystemReflectionMetadataVersion> | |||
<SystemServiceProcessVersion>4.5.0-*</SystemServiceProcessVersion> |
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.
Seconded, it's easier if this can be 4.4.0, then we'll update to 4.5.0 at a later date in all repos at once.
Ok. I'm going to assign this PR to @JunTaoLuo for now so we can follow up on it later. We'll hold off merging till we can build against .NET Core 2.1. Blocked on https://github.com/aspnet/Coherence-Signed/issues/657 |
We shouldn't be cross-compiling here. We should wait for 2.1 where the ServiceBase API is available. This was why I was asking about when we are taking the new runtime last week. |
How would we get access to the |
There are no plans for this AFAIK, however the API surface should be available when you target |
I see, but does that mean we drop .NET 4.6.1? |
Ah I mis-spoke, I meant we will need use netcoreapp2.1, not netcoreapp2.0. We plan to have it available for both core and framework. |
That makes sense, figured we need that. I was already looking for |
We should also update the ServiceBase sample for the new Generic Host.
And add a sample for the current RunAsService. |
FYI The current eta is for middle of November. |
@Tratcher I've updated with the new preview package of |
netstandard2.0 is preferred wherever possible. |
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.
The changes are correct and is ready to merge. However, there's a few infrastructure reactions I need to make (e.g. ingestion of system packages need to be marked in our Universe builds).
Merged in e03c6a7. Thanks @henkmollema for the contribution! |
🎉 |
Cross-compile
Microsoft.AspNetCore.Hosting.WindowsServices
for .NET 4.6.1 and .NET Core 2.0.I had the use the .NET Core MyGet feed as the
ServiceBase
API is only available in version4.5.0-*
. Perhaps the package in the ASP.NET Core MyGet feed can be updated as well?Resolves #904
/cc @muratg @JunTaoLuo