You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I have a problem with my application. At some computers application does not starts with error at event logs: Description: A .NET Core application failed. Application: firefox.exe Path: C:\Program Files\Mozilla Firefox\firefox.exe Message: Error: An assembly specified in the application dependencies manifest (firefox.deps.json) was not found: package: 'runtimepack.Microsoft.NETCore.App.Runtime.win-x64', version: '3.1.1' path: 'Microsoft.Win32.Registry.dll' This is happens when some DLL lost in tem directory. For resolve this issue I need to remove all directory "\AppData\Local\Temp\.net\firefox\crzm4sor.ju1". After that application will create new one with DLLs and will start normal.
This application has library dependencies that may not be on the user's computer.
For this, I used the following command
dotnet publish -r win-x64
And selected "Produce single file", "Self-Contained" when I publish it.
The application works perfectly and more than 1000 users actively use it. All that the application does is launch Firefox for the user and control the processes. The app is needed for UE-V technology. But all this is not important for this problem.
The application starts, and it seems to unpack the libraries it contains into a TEMP directory. The path like appdata\local.net\applicationname\someID*.dlls
This is good because no need to install libraries manually.
The problem is that some users began to receive the same errors instead of launching the application.
I managed to find out that :
if delete the entire temporary directory, the program will start, because the directory will be created again.
if I leave the directory but delete several DLLs, the application will not create them and will give an error.
Maybe I missed some option, something like forcing unpacking or should I add a workaround to the code.
Application code if it will helpful:
`using System;
using System.Diagnostics;
using System.Threading;
using System.IO;
namespace firefoxWatcher
{
static class firefoxWatcher
{
private static Mutex mutex = null;
[STAThread]
public static void Main()
{
const string appName = "firefox";
bool createdNew;
mutex = new Mutex(true, appName, out createdNew);
if (!createdNew)
{
//app is already running! Exiting the application
Console.WriteLine("Application is already running.");
return;
}
else
{
}
Console.WriteLine("Mutex passed");
// Start the process.
using (Process myProcess = Process.Start("C:\\Program Files\\Mozilla Firefox\\firefox_original.exe"))
{
// Display the process statistics until
// the user closes the program.
System.Threading.Thread.Sleep(3000);
Process[] localByName = Process.GetProcessesByName("firefox_original");
foreach (Process theprocess in localByName)
{
Console.WriteLine("Process: {0} ID: {1}", theprocess.ProcessName, theprocess.Id);
Console.WriteLine($"Started process: {theprocess.HasExited}");
do
{
if (!theprocess.HasExited)
{
// Refresh the current process property values.
theprocess.Refresh();
Console.WriteLine();
// Display current process statistics.
Console.WriteLine($"running process: {theprocess.Id}");
if (theprocess.Responding)
{
Console.WriteLine("Status = Running");
}
else
{
Console.WriteLine("Status = Not Responding");
}
}
else
{
System.Threading.Thread.Sleep(100);
}
}
while (!theprocess.WaitForExit(1000));
}
}
}
}
}`
The text was updated successfully, but these errors were encountered:
In the meantime, as a workaround you can set DOTNET_BUNDLE_EXTRACT_BASE_DIR environment variable to a non-temp directory.
It is nice that this problem is known.
Unfortunately, I have no programming experience at all. Please tell me how I can change the DOTNET_BUNDLE_EXTRACT_BASE_DIR variable, instead of "% temp%.net\application\id", set to "% LOCALAPPDATA%.net\application\id" (system variable), will use app only on Windows OS. So that the directory is not cleared by the system or system cleaning applications.
This method suits me, but I do not know how to implement it and did not found this. In every post they only talk about it, but there is no instruction or how to do it (I think everyone knows how to do it except me :) )
Hello,
I have a problem with my application. At some computers application does not starts with error at event logs:
Description: A .NET Core application failed. Application: firefox.exe Path: C:\Program Files\Mozilla Firefox\firefox.exe Message: Error: An assembly specified in the application dependencies manifest (firefox.deps.json) was not found: package: 'runtimepack.Microsoft.NETCore.App.Runtime.win-x64', version: '3.1.1' path: 'Microsoft.Win32.Registry.dll' This is happens when some DLL lost in tem directory. For resolve this issue I need to remove all directory "\AppData\Local\Temp\.net\firefox\crzm4sor.ju1". After that application will create new one with DLLs and will start normal.
This application has library dependencies that may not be on the user's computer.
For this, I used the following command
dotnet publish -r win-x64
And selected "Produce single file", "Self-Contained" when I publish it.
The application works perfectly and more than 1000 users actively use it. All that the application does is launch Firefox for the user and control the processes. The app is needed for UE-V technology. But all this is not important for this problem.
The application starts, and it seems to unpack the libraries it contains into a TEMP directory. The path like appdata\local.net\applicationname\someID*.dlls
This is good because no need to install libraries manually.
The problem is that some users began to receive the same errors instead of launching the application.
I managed to find out that :
if delete the entire temporary directory, the program will start, because the directory will be created again.
if I leave the directory but delete several DLLs, the application will not create them and will give an error.
Maybe I missed some option, something like forcing unpacking or should I add a workaround to the code.
Application code if it will helpful:
`using System;
using System.Diagnostics;
using System.Threading;
using System.IO;
namespace firefoxWatcher
{
}`
The text was updated successfully, but these errors were encountered: