estoy tratando de crear un ejecutable de mi proyecto, ya que se trata de un proyecto de fin de grado y necesito enviarselo al profesor, el problema que tengo es que no hay forma de conseguir ejecutarlo, cuando trato de publicar el archivo con esta configuración.
No importa que cambios haga en la configuración, siempre genera una publicación supuestamente exitosa
Pero que al tratar de ejecutarla, tras mostrar un rato el icono de carga, no se muestra la ventana
Sin embargo si ejecuto el archivo que se encuentra en Release no en publish, si que se ejecuta la aplicación perfectamente, pero claro ese archivo es dependiente de la plataforma en el mismo momento que se mueve a otro sitio falla.
Hasta ahora he probado usando la última opción "Quitar los ensablados no usados" y activar que se muestren los errores de ReadyToRun, haciendolo de esta forma indica que le falta el nuget inmutable de collections, lo instalo, vuelvo a probar entonces me dice que no puede cargar 2 componentes, invoke y websocket, y cuando busco la solución a esto, la única que encuentro es una de la versión inglesa de esta pagina (stackoverflow) que el usuario lo soluciono quitando la opción de "Quitar los emsamblados no usados" con lo que me quedo como al principio.
El código y cualquier cosa que necesiten se encuentra en github por si quisieran inspeccionarlo más a fondo https://github.com/davidgmd/Proyecto-de-fin-de-grado Ahora mismo estoy usando la rama calendario, aparte de eso me pongo a su entera disposición para cualquier información que pueda faltar, ya que no se me ocurre que más hacer la verdad.
Editado: Al usar el visor de eventos, aparecian 2 mensajes de error, uno que hacia referencia a kernelbase, no da detalles de porque y el otro que parece el más importante, que indico aquí
Application: ElEscribaDelDJ.exe CoreCLR Version: 4.700.20.41105 .NET Core Version: 3.1.8 Description: The process was terminated due to an unhandled exception. Exception Info: System.Windows.Markup.XamlParseException: The invocation of the constructor on type 'ElEscribaDelDJ.MainWindow' that matches the specified binding constraints threw an exception. ---> System.TypeInitializationException: The type initializer for 'ElEscribaDelDJ.Classes.GitHub' threw an exception. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\David2\AppData\Local\Temp\Classes\Keys\encriptkeys.txt'. at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize) at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks) at System.IO.File.InternalReadAllText(String path, Encoding encoding) at System.IO.File.ReadAllText(String path) at ElEscribaDelDJ.Classes.GitHub..ctor() at ElEscribaDelDJ.Classes.GitHub..cctor() --- End of inner exception stack trace --- at ElEscribaDelDJ.MainWindow..ctor() --- End of inner exception stack trace --- at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) at System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc) at System.Windows.Application.LoadComponent(Uri resourceLocator, Boolean bSkipJournaledProperties) at System.Windows.Application.DoStartup() at System.Windows.Application.<.ctor>b__1_0(Object unused) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.DispatcherOperation.InvokeImpl() at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state) at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Threading.DispatcherOperation.Invoke() at System.Windows.Threading.Dispatcher.ProcessQueue() at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) at System.Windows.Threading.Dispatcher.Run() at System.Windows.Application.RunDispatcher(Object ignore) at System.Windows.Application.RunInternal(Window window) at System.Windows.Application.Run() at ElEscribaDelDJ.App.Main()
Veo que supuestamente da error porque no localiza un archivo, lo que no se es porque ese archivo no es empaquetado junto al resto de archivos, o que es lo que hace que no funcione en otra carpeta que no sea o la de debug o la de release