Visual Studio 2017 installer keeps telling me "elevation required"? - windows

When I try to install VS 2017 on a machine, the installer gives me the following error despite the fact that I'm already an administrator (yes I've tried "Run as Administrator" and messing with UAC etc... trust me I've tried all the usual stuff and know how Windows works):
Elevation Required
This program requires administrator privileges to perform setup operations.
Please rerun the program as administrator.
Tracing with ProcMon, I see a log in my temp directory that seems to be indicating the cause:
Information : Log configuration: $SERVICEHUBTRACELEVEL=""
Error : HubHost 'desktopClr$C94B8CFE-E3FD-4BAF-A941-2866DBB566FE' PID 3736 stderr: Error running host: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: creationOptions
at System.Threading.Tasks.Task..ctor(Object state, TaskCreationOptions creationOptions, Boolean promiseStyle)
at Microsoft.ServiceHub.HostLib.Host..ctor(String hostId, String pipeName, DevHubTraceSource logger)
at Microsoft.ServiceHub.HostLib.Program.<MainAsync>d__0.MoveNext()
Error : HubHost 'desktopClr$C94B8CFE-E3FD-4BAF-A941-2866DBB566FE' PID 3736 stderr:
Error : HubHost 'desktopClr$C94B8CFE-E3FD-4BAF-A941-2866DBB566FE' PID 3736 stderr: Unhandled Exception:
Error : HubHost 'desktopClr$C94B8CFE-E3FD-4BAF-A941-2866DBB566FE' PID 3736 stderr: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: creationOptions
at System.Threading.Tasks.Task..ctor(Object state, TaskCreationOptions creationOptions, Boolean promiseStyle)
at Microsoft.ServiceHub.HostLib.Host..ctor(String hostId, String pipeName, DevHubTraceSource logger)
at Microsoft.ServiceHub.HostLib.Program.<MainAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at ServiceHub.Host.Program.Main(String[] args)
Error : Error starting service 'SetupEngine.ProductsProvider' requested by ProductsProvider (pid: 3340): Hub host 'desktopClr', PID: 3736 exited. code: '3762504530'.
Error : Error starting service 'SetupEngine.Installer' requested by Installer (pid: 3340): Hub host 'desktopClr', PID: 3736 exited. code: '3762504530'.
It seems their code is buggy except this is only happening on my machine? Why isn't everyone seeing this? What's triggering this problem and how do I fix it?

I finally solved this by installing .NET Framework 4.7, though I suspect updating 4.0 to even a slightly more recent version might work too.
The issue seemed to be a bug in the System.Threading.Tasks.Task class, where it didn't allow passing a flag that was supposed to be legal. I assumed this was a version mismatch and fixed.

I downloaded VS preview https://visualstudio.microsoft.com/vs/preview/ then it worked fine again

In my case, the cause was the TMP and TEMP environment variables, pointing to non-available paths, on removed drives.

Related

Cannot activate rust-analyzer: bootstrap error

Starting 2020-12-09, VSCode's Rust Analyzer extension no longer loads for me. On launch, it prints out this error message:
Cannot activate rust-analyzer: bootstrap error. See the logs in "OUTPUT > Rust Analyzer Client" (should open automatically). To enable verbose logs use { "rust-analyzer.trace.extension": true }
Enabling extension tracing produces the following diagnostic just before failing:
INFO [12/10/2020, 10:03:22 AM]: Using server binary at c:\Users\<user>\AppData\Roaming\Code\User\globalStorage\matklad.rust-analyzer\rust-analyzer-windows.exe
DEBUG [12/10/2020, 10:03:22 AM]: Checking availability of a binary at c:\Users\<user>\AppData\Roaming\Code\User\globalStorage\matklad.rust-analyzer\rust-analyzer-windows.exe
DEBUG [12/10/2020, 10:03:22 AM]: c:\Users\<user>\AppData\Roaming\Code\User\globalStorage\matklad.rust-analyzer\rust-analyzer-windows.exe --version: {
status: 3221225506,
signal: null,
output: [ null, '', '' ],
pid: 1648,
stdout: '',
stderr: ''
}
where <user> is the name of the user account I use to log into the system1.
The status value reported in the error diagnostic (3221225506) translates to 0xC0000022 (STATUS_ACCESS_DENIED). Navigating to the binary from within VSCode's integrated terminal and trying to execute rust-analyzer-windows.exe --version doesn't produce any output, which seems to reinstate that running this executable from VSCode is somehow blocked.
It appears that something changed with respect to access rights executing the server binary from within VSCode. In between Rust Analyzer working and Rust Analyzer no longer working I didn't update Rust, nor rustup, nor VSCode, nor any extensions.
I did install 2020-12 Cumulative Update for Windows 10 Version 20H2 for x64-based Systems (KB4592438), though, and the time Rust Analyzer started failing coincides with the time the update got installed. That could literally just be a coincidence.
What additional steps can I take to get to the root cause of the issue, and how do I get Rust Analyzer working again?
Version information:
Rust Analyzer (stable): v0.2.408
Windows 10 Pro: Version 10.0.19042 Build 19042
VSCode: 1.51.1 (user setup)
1 This is also the user account VSCode runs under, including all of its spawned processes. Navigating to the path from a command prompt running under this account reveals that rust-analyzer-windows.exe is present, and executing rust-analyzer-windows.exe --version prints a version identifier, as expected.
Unfortunately, I didn't quite get to investigate the root cause of this.
A system reboot that was forced upon me appears to have restored World Peace.
Clearing proxy config works for me.
I'm not sure this covered all situation, but it might be related to the network.

Visual studio installer doesn't start correctly

I just had to change my HDD. So I installed a version of Windows 10 Education on my computer, and now I'm trying to install Visual studio 2017 community/enterprise ( tried both ). After running the installer which was downloaded from the official website it doesn't start the installation, I just see for a tiny amount of time a small window pop but then it instantly shuts. What could be the reason for this behavior and how to fix this problem?
Edit: I can install other software, I managed to install a few other programs without a problem, I notice this behavior only with Visual studio and additionally .NET Framework installer.
Edit2:
I found this in my temp folder :
[4/20/2017, 11:30:37] === Logging started: 2017/04/20 11:30:37 ===
[4/20/2017, 11:30:37] [4/20/2017, 11:30:38] --- logging level: standard ---
[4/20/2017, 11:30:38] Directory 'C:\Users\2D94~1\AppData\Local\Temp\931f7233a5c56697278d79b1\' has been selected for file extraction
[4/20/2017, 11:30:38] Extracting files to: C:\Users\2D94~1\AppData\Local\Temp\931f7233a5c56697278d79b1\
[4/20/2017, 11:30:38] Error 0x8007002a: Failed to extract all files out of box container #0.
[4/20/2017, 11:30:38] Error 0x8007002a: Failed to extract
[4/20/2017, 11:30:38] Error 0x8007013d: Failed to get error string from error: 0x8007002a
[4/20/2017, 11:30:38] The entire Box execution exiting with result code: 0x8007002a
[4/20/2017, 11:30:38] Launched extracted application exiting with result code: 0x0
[4/20/2017, 11:30:38] === Logging stopped: 2017/04/20 11:30:38 ===
Edit 3: THANKS MICROSOFT you really screwed me up huh.
Edit 4: After full Windows reinstall with the latest version still getting this error.
Edit 5: Changed windows version from education to professional and it works!
Had the same issue. I was running installer from my /Download folder.
Try move the installer to D: drive, it helped me.
Regards

Deployment failed because of an internal error: An item with the same key has already been added

I'm using VS2013, Xamarin.Android 4.12.4.20.
Build is successful.
I'm getting error from title whenever I try to deploy in debug mode or package.
It started to happened today it work fine before.
I've restarted VS, device, PC - none helped.
Stack trace:
Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Mono.AndroidTools.Adb.AdbSyncDirectory.Add(AdbSyncItem entry)
at Xamarin.AndroidTools.AndroidDeploySession.InstallAssemblies(String destinationPath, CancellationToken token)
at Xamarin.AndroidTools.AndroidDeploySession.FastDev()
at Xamarin.AndroidTools.AndroidDeploySession.Run(CancellationToken token)
at Xamarin.AndroidTools.AndroidDeploySession.RunLogged(CancellationToken token)
--- End of inner exception stack trace ---
at Xamarin.AndroidTools.AndroidDeploySession.RunLogged(CancellationToken token)
at Xamarin.AndroidTools.AndroidDeploySession.Start(CancellationToken token)
Build output:
3>Build succeeded.
3>Waiting for device..
3>Detecting installed packages
3>Detecting installed packages...
3>
3>Removing previous version of application
3>Removing previous version of application...
3>
3>Installing application on device
3>Copying application to device...
3>
3>Getting installation path...
I've figured it out. Make sure that you don't have different versions of the same dll referenced!!
Let me describe my set up a bit more that will help with explaining why exception happened.
I've got two projects
Domain - library with code shared between all platforms
Android - android specific code
Both have nuget references to the same library. At some point android (only in this project) nuget references have been updated which resulted in two versions of the same library required by the application (Domain project still referenced old nuget).
When I tried to package solution I would get warning like :
Consider app.config remapping of assembly "{Library}" from Version "5.6.0.0" [] to Version "5.6.1.0" [{Path}] to solve conflict and get rid of warning.
Once I've update Domain's nuget everything worked.

visual studio 2010 sp1 installation error

The installation processed in a couple of hours then it tells me errors has occurred and needs to rollback.
Here is the error :
Action: Performing Action on Exe at Y:\NDP40-KB2468871.exe
Error launching CreateProcess with command line = NDP40-KB2468871.exe /q /norestart /pipe SectionName_1343615874 /log "C:\Users\NHATTH~1\AppData\Local\Temp"Error performing inpage operation.
CreateProcess returned error = Error performing inpage operation.
Original exit code: Y:\NDP40-KB2468871.exe returned non-MSI error code: 0x3e7 - Error performing inpage operation.
Modified exit code: Y:\NDP40-KB2468871.exe returned error code: 0x643 - Fatal error during installation.
Exe (Y:\NDP40-KB2468871.exe) failed with 0x80070643 - Fatal error during installation. .
PerformOperation on exe returned exit code 1603 (translates to HRESULT = 0x80070643)
Action complete
OnFailureBehavior for this item is to Rollback.
What is NDP40-KB2468871.exe about ?
try reinstall dotNetFx4.0
I had a similar problem.
Look for some kind of damage on the disk or dvd. It happens to me before and that what the cost.
Another posibility is that performing inpage operation occours because the file on the provide by the instalation cd is corrupted.
hope my words can help
My post is unlrelated but mght help others, I got a 0x80070643 error on instaling visual studio 2010 sp1 on Visual studio express 2010. The error was due to lack of diskspace in C drive.
Such a trivial issue and I overlooked. This could happen to anyone
Sibi

CreateProcess(): "Program too big to fit in memory"

I am currently trying to debug my Crash-Handler, it is an external executable that gets called when my program finds an unhandled structured exception. I recompiled the crash-handler executable, and when I tested, I got a message: "Program too big to fit in memory".
After digging around for a bit, I found that this was being caused by the CreateProcess call within my unhandled exception filter. I found this post that says that this error message indicates that the executable is corrupted, however if I invoke the CrashHandler.exe from the command line, I get no such error.
Other Information:
I have tried rebuilding my
application and the crash-handler
multiple times in both debug and
release mode.
I have tried giving the running thread 2 orders of magnitude more stack space.
I tested the same CrashHandler.exe in another application that was already using it, and there were no problems.
I tried using a previous version of the exe that worked before, but with the same result.
Restarting the system.
My Call to CreateProcess:
//Fire off the Handler
//HandlerArgs = "CrashHandler.exe arg1 arg2 arg3 etc..."
if(CreateProcess(NULL, HandlerArgs, NULL, NULL, TRUE, CREATE_PRESERVE_CODE_AUTHZ_LEVEL | CREATE_SUSPENDED,
NULL, NULL, &StartupInfo, &NewProcessHandle))
Turns out that one of my post-build hooks was copying over the exe from The source control repository, and the file I had in the source control repository was actually the pdb. While testing I was copying directly to my running folder, and then the hook would copy the "corrupted" exe over again.

Resources