The program is executing properly without any error in Debug configuration But in Release configuration it throws an error.
The "ParseILMergeInfoTask" task failed unexpectedly.
System.Exception: File 'SharedAssemblyILMergeInfoFilePath' passed to argument 'x86\ret\SharedAssemblyILMergeInfo.csv' does not exist.
at Microsoft.Build.ILTasks.ParseILMergeInfoTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
I can't run any program in Release configuration. It throws the same error.
Update
I think I found the problem but I don't know to resolve it. Previously I had an error Unable to load package 'Microsoft.Net.Native.SharedLibrary-x64'. To resolve it I follow it this answer. So I installed Microsoft.Net.Native.SharedLibrary-x64.1.6.1, Microsoft.Net.Native.SharedLibrary-x86.1.6.1 and Microsoft.Net.Native.SharedLibrary-arm.1.6.1 manually. Now If I open Microsoft.Net.Native.SharedLibrary-x64 package folder I can't find build and tools folder within it.
It is a problem due to the Internet connection.
Just delete the package
C:\Users\ponvi\.nuget\packages\microsoft.net.native.sharedlibrary-x64
Download the package using Mobile Data.
Another answer by rubStackOverflow
Really strange issue, in my case, I had to change my default network
DNS(network card) from 8.8.8.8 to 208.67.222.222.
Related
When trying to build my Xamarin project in Visual Studio 2022 I am receiving this error:
java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: obj\Debug\120\lp\100\jl\bin\classes.jar : com/google/android/gms/measurement/internal/zzai.class
My build log shows this:
Error in obj\Debug\120\lp\100\jl\bin\classes.jar:com/google/android/gms/measurement/internal/zzai.class:
Type com.google.android.gms.measurement.internal.zzai is defined multiple times: obj\Debug\120\lp\100\jl\bin\classes.jar:com/google/android/gms/measurement/internal/zzai.class, obj\Debug\120\lp\101\jl\bin\classes.jar:com/google/android/gms/measurement/internal/zzai.class
I have used 7zip to extract the specified zzai.class file however I don't know what to do from here. Trying to edit the file in notepad++ just shows noninterpretable code.
I fixed the issue by uninstalling unnecessary NuGet packages for Xamarin.GooglePlayServices.Measurement, only keeping the dependent packages required for Xamarin.Firebase.Analytics:
Xamarin.GooglePlayServices.Measurement
Xamarin.GooglePlayServices.Measurement.Api
Xamarin.GooglePlayServices.Measurement.Sdk
I have an ASP.NET project (NET6) and I removed Docker support by:
Deleting the 'targets' file
Deleting the 'docker' file
Removing 'Docker' settings from the 'launchsettings.json' file
When I try to publish the project I get the following errors:
Visual Studio container tools require Docker Desktop. To get it, see https://go.microsoft.com/fwlink/?linkid=847268
The "KillAppInsideContainer" task failed unexpectedly.
I've installed Docker Desktop for Windows and I still get these errors when publishing:
The "KillAppInsideContainer" task failed unexpectedly.
Method not found: 'Void Microsoft.VisualStudio.Containers.Tools.Shared.Functions.AzureFunctionsFeedDataProvider..ctor(Microsoft.VisualStudio.Containers.Tools.Common.Services.Logging.ILoggingService)'.
Am I missing other settings / places where Docker is still referenced?
I had a reference to this Nuget package:
Microsoft.VisualStudio.Azure.Containers.Tools.Targets
Once removed, publishing works fine.
I wanted to get VS Community 2019 after using 2017 for some time because i still had it.
Uninstalled VS2017 and installed VS2019
Now, i have done this today and tried reinstalling 2 times now.
My issue is: When i open VS2019 everything is normal. It is showing me all the options you have in the splashscreen, i can click on "Continue without code" without a problem. But if i try to open a .sln file, the Import Export Settings, create a new Project or open options the program crashes without a message, sometimes i get one. It is telling me:
The "Windows forms designer package" packe did not load correctly... (pointing me to an xml for logs)
I open the Activity Monitor Log and at place 643, ERROR:
CreateInstance failed for package [Windows Forms Designer
Package]Source: 'mscorlib' Description: Exception has been thrown by
the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. ---> System.TypeLoadException: Could
not load type 'System.Drawing.Design.ToolboxService' from assembly
'System.Drawing.Design, Version=4.0.0.0, Culture=neutral
And so on..
GUID: {7494682B-37A0-11D2-A273-00C04F8EF4FF}
HR: 80004005 - E_FAIL
Source: VisualStudio
I can't really figure out how to fix this, any tips or ideas are appreciated.
Thank you in advance, even if it doesn'T work. Trying is everything!
I updated windows until there were no more updates and rebooted my pc a couple of times, now it works.
So I am trying to create a service using C# in Visual Studio 2017 and I keep getting an error when I try to install it.
Right now, I don't even have anything in my service, I just want to be able to install the service. I created a new Project in Visual Studio 2017 using the Windows Service (.NET Framework) template under Visual C# > Windows Desktop. I then added the installer via Right Click > Add Installer. For serviceProcessInstaller1, I set the account to LocalSystem. And...that's it!
Now, I try to install it. I open up command prompt (run as administrator) and I do
InstallUtil ServiceTest.exe
Things start off smoothly, but then I get a message:
"An exception occured during the Install phase.
System.UnauthorizedAccessException: Attempted to perform an
unauthorized operation."
What could be generating this message?
I've googled and tried the following things:
Ensure I run command prompt as administrator.
Assign Full Control to
the project folder to my admin account.
Configure permissions to Full
Control for admin account in the security log of regedit.
Log into my
computer as an administrator (rather than regular user) and run it
that way.
Despite these things, I keep getting the same error. What else could I be doing wrong? Would really appreciate some advice!
Note: I am trying to install this service locally on my computer.
Edit: Per request, here are the logs. I named my project "FailedService", by the way, since I can't get it to work!
InstallUtil.InstallLog
Running a transacted installation.
Beginning the Install phase of the installation.
See the contents of the log file for the C:\Users\first.m.last\source\repos\FailedService\FailedService\bin\Debug\FailedService.exe assembly's progress.
The file is located at C:\Users\first.m.last\source\repos\FailedService\FailedService\bin\Debug\FailedService.InstallLog.
An exception occurred during the Install phase.
System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.
The Rollback phase of the installation is beginning.
See the contents of the log file for the C:\Users\first.m.last\source\repos\FailedService\FailedService\bin\Debug\FailedService.exe assembly's progress.
The file is located at C:\Users\first.m.last\source\repos\FailedService\FailedService\bin\Debug\FailedService.InstallLog.
The Rollback phase completed successfully.
The transacted install has completed.
FailedService.InstallLog
Installing assembly 'C:\Users\first.m.last\source\repos\FailedService\FailedService\bin\Debug\FailedService.exe'.
Affected parameters are:
logtoconsole =
logfile = C:\Users\first.m.last\source\repos\FailedService\FailedService\bin\Debug\FailedService.InstallLog
assemblypath = C:\Users\first.m.last\source\repos\FailedService\FailedService\bin\Debug\FailedService.exe
Installing service Service1...
Creating EventLog source Service1 in log Application...
Rolling back assembly 'C:\Users\first.m.last\source\repos\FailedService\FailedService\bin\Debug\FailedService.exe'.
Affected parameters are:
logtoconsole =
logfile = C:\Users\first.m.last\source\repos\FailedService\FailedService\bin\Debug\FailedService.InstallLog
assemblypath = C:\Users\first.m.last\source\repos\FailedService\FailedService\bin\Debug\FailedService.exe
Restoring event log to previous state for source Service1.
I was FINALLY able to resolve this issue. I was able to get to the bottom of it by using SysInternal's Process Monitor. I opened up the program and had it take logs for InstallUtil.exe. From there, I began to search for any logs that said "Access Denied". As I sorted through them, I noticed something interesting: it was trying to create a registry key, but it kept failing!
So I went into the registry and created a key named "ServiceTest". After that, I ran the InstallUtil command again, and it worked!
If anyone else is having trouble, the solution is to create a key named after your process name in the following location:
HKLM\System\CurrentControlSet\Services\EventLog\Application\
Enter the full path to installUtil & your service binary in an elevated prompt, that could do.
I need to uninstall a Windows Service I have created, but I get this error using the "Uninstall or change program" program in windows:
Error. An exception occurred while
uninstalling. This exception will be
ignored and the uninstall will
continue. However, the application
might not be fully uninstalled after
the uninstall is complete. -> The
event log source '111 My Service'
cannot be deleted, because it's equal
to the log name.
Then I click "OK" and the program remains listed in the list of installed programs. What is worse, I cannot install a new version of it. The windows installer says that another version of this product is already installed and I should uninstall it first. How do I get rid of this program?
Update Here is what is happening when I run InstallUtil.exe /u command on it.
The uninstall is beginning. See the
contents of the log file for the
C:\MyService.MyService. assembly's progress. The file
is located at
C:\MyService.MyService.InstallLog.
Uninstalling assembly
'C:\MyService.MyService.exe'. Affected
parameters are: logtoconsole =
assemblypath = C:\MyService.exe
logfile =
C:\MyService.MyService.InstallLog
Removing EventLog source 111 My
Service. An exception occurred during
the uninstallation of the
System.Diagnostics.EventLogInstaller
installer.
System.InvalidOperationException: The
event log source '111 My Service'
cannot be deleted, because it's equal
to the log name. An exception occurred
while uninstalling. This exception
will be ignored and the uninstall will
continue. However, the application
might not be fully uninstalle l is
complete.
The uninstall has completed. An
exception occurred while uninstalling.
This exception will be ignored and the
uninstall will continue. However, the
application might not be fully
uninstalle l is complete.
Try to execute next command in cmd:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe /u "c:\myservice.exe"
The second option is:
sc delete <service name>
After running the line above you can try to remove the service branch as well in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services.
The accepted answer didn't work for me.
What worked is open regedit in administrator mode and find the service and delete it.
I had the exact same problem (and nothing in the selected answer worked).
Surprisingly, what fixed the problem was (using the standard "Uninstall or change program" or "Programs and Features" windows dialog) right-clicking on the program and choosing repair (this was apparently successful), and then uninstalling.
This just happened to me and the solution above didn't work where you run the InstallUtil.exe or delete the service. I had initially set up my service with the "LocalSystem" security context, and it was installed with that. I later changed the security context to "User" and recompiled the service executable and tried to uninstall the old service. The error messages were coming up that are described here, and once I went and changed the security context back to "LocalSystem" I could fully uninstall.
In other words, you might want to uninstall your old service with the executable it was created with rather than a newer one with possible modifications.