This is a migrated thread and some comments may be shown as answers.

Problem with Visual studio 2019 integration as non-administrator

4 Answers 312 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Søren
Top achievements
Rank 1
Søren asked on 05 Nov 2020, 07:06 AM

Hi,

I have been using Justmock for years now without any problem. But lately we started running as our normal users and not as local administrators on our PC's.

When installing Justmock I'm using an elevated admin account and it seems to complete without any errors, afterwards I'm starting VS19 as my normal user and are presented with the dialog shown in the attached file.

The log shows that the assembly could not be found or loaded, when looking in the folder specified in the error, I do not have an <extensions> folder at the location. So I assume that installing the product with my administrator access does not work for my normal user, what to do? 

The activity log shows the following error:

690 ERROR CreateInstance failed for package [JustMockPackage]Source: 'mscorlib' Description: Filen eller assemblyen 'file:///c:\users\foobar\appdata\local\microsoft\visualstudio\16.0_4cd0081b\extensions\alz4b0wd.jii\Telerik.JustMock.VS2017.dll' eller en af dens afhængigheder kunne ikke indlæses. Den angivne fil blev ikke fundet. System.IO.FileNotFoundException: Filen eller assemblyen 'file:///c:\users\foobar\appdata\local\microsoft\visualstudio\16.0_4cd0081b\extensions\alz4b0wd.jii\Telerik.JustMock.VS2017.dll' eller en af dens afhængigheder kunne ikke indlæses. Den angivne fil blev ikke fundet. File name: 'file:///c:\users\foobar\appdata\local\microsoft\visualstudio\16.0_4cd0081b\extensions\alz4b0wd.jii\Telerik.JustMock.VS2017.dll'at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence)at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName) WRN: Logføring af assemblybinding er deaktiveret. Logføring af assemblybindingsfejl aktiveres ved at angive registreringsdatabaseværdien [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) til 1. Bemærk! Ydeevnen forringes ved logføring af assemblybindingsfejl. Denne funktion deaktiveres ved at fjerne registreringsdatabaseværdien [HKLM\Software\Microsoft\Fusion!EnableLog].  {0A72E70C-4C0C-4EF0-8212-59ACF681F885} 80004005 - E_FAIL VisualStudio 2020/11/05 06:41:35.043 

 

4 Answers, 1 is accepted

Sort by
0
Søren
Top achievements
Rank 1
answered on 05 Nov 2020, 10:46 AM

I had success with an uninstall of VS and Justmock, rebooting and then reinstalling VS and Justmock again.

The observation was that the extensions was located in the admin profile and not in my current user and thereby causing Justmock to fail. Prior to uninstalling VS, I tried just to uninstall/reinstall Justmock and it was the same behaviour.

0
Accepted
Momchil
Telerik team
answered on 09 Nov 2020, 03:36 PM

Hello Søren,

I tried to reproduce the described scenario by installing JustMock to non-admin user using elevated admin account but everything worked fine on my end.

From what you have reported my bet would be that probably the Visual Studio instance became corrupted - maybe some registration of a previously installed version of JustMock remained registered after its removal.

Please let us know if you notice this behavior again.

Regards,
Momchil
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Søren
Top achievements
Rank 1
answered on 19 Nov 2020, 08:00 AM

The reinstall worked, but one of my colleges still had problems, but we found that it was an issue with corrupted files in extensions.

The Solution was to run %programfiles(x86)%\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe with the full  option. To ensure that all files were removed before reinstalling VS again and now everything worked as expected.

0
Mihail
Telerik team
answered on 23 Nov 2020, 08:07 AM

Hi Søren,

I am happy to hear you managed to resolve the issue. If you encounter any other problems, do not hesitate to contact us again.

Regards,
Mihail
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Søren
Top achievements
Rank 1
Answers by
Søren
Top achievements
Rank 1
Momchil
Telerik team
Mihail
Telerik team
Share this question
or