"Cannot get service name" because options for InstallContext need '-' prefix, not '/'.
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Empieza rastreando cómo InstallContext analiza las opciones que recibe de CreateTransactedInstaller, especialmente el valor de -assemblypath y el fallo notificado relacionado con el nombre del servicio. Reproduce el comportamiento con los prefijos de barra y guion, establece después el comportamiento de prefijos previsto y cubre el resultado con la prueba o documentación pertinente disponible en el proyecto.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I just ported some software from .NET FrameWork to .NET Core and gratefully used this Nuget package to allow it to install itself as Windows service. I wanted to minimize the amount of work so I didn't want to re-architect my service to the new Worker Service architecture, at least for now.
That didn't work: the install failed with "Cannot get service name" and then rolled back.
It turns out that the problem was that I used a slash '/' instead of a dash '-'.
I don't know if the slash was officially supported in the .NET FrameWork code; the code I'm working on was based on some sample code on the Internet about 10 years ago. So I don't know if I should request that '/' be an alternate prefix character to '-'. I just wanted to post this as an issue because it took me a long time to figure this out, and maybe this is useful for others who run into the same situation.
Fragment of my code after correcting the problem:
private static TransactedInstaller CreateTransactedInstaller(Type T)
{
TransactedInstaller result = new TransactedInstaller();
// NOTE: the path option must start with '-', not '/'. The path must be the .exe file, not a .dll file.
string path = "-assemblypath=" + System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
result.Installers.Add(new InstallerConsoleModule(T, null)); // Constructor checks the type
result.Context = new InstallContext(null, new[] { path });
return result;
}
- Lenguaje dominante
- C#
- Estrellas
- 26
- Forks
- 12
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de flamencist/Core.System.Configuration.Install
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
flamencist/Core.System.Configuration.Install#11 · 2 reacciones ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 20/100
flamencist/Core.System.Configuration.Install#9 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
flamencist/Core.System.Configuration.Install#8 · 3 comentarios ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
flamencist/Core.System.Configuration.Install#1 · 3 comentarios · 1 reacción ·
Todos los issues de flamencist/Core.System.Configuration.Install
Issues similares
-
type/automation type/tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
t/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
ci-failure-cause test-failure
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
area:auth FE mvp P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
klasolsson81/jobbliggaren#1788 ·