Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Visual_studio_package did not load corectly (Read 583 times)
Eblis
Newbies
*
Offline



Posts: 5
Visual_studio_package did not load corectly
Jun 30th, 2019 at 8:18am
 
Coming from the latest Gallery release I tried to update to the newest candidate, as I'm working on Teensy.
VS2019, arduino 1.8.9.

I get a prompt stating the the package did not load correctly, and directs me to a AtivityLog.XML file, which states that it can't file the package's dll file.

Here's the relevant segment:
Code:
<entry>
    <record>753</record>
    <time>2019/06/30 07:00:22.865</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [Visual_Micro_StudioPackage]</description>
    <guid>{C2B94433-1774-4242-8062-987A4484F1ED}</guid>
  </entry>
  <entry>
    <record>754</record>
    <time>2019/06/30 07:00:22.866</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>CreateInstance failed for package [Visual_Micro_StudioPackage]Source: &apos;mscorlib&apos; Description: Could not load file or assembly &apos;file:///c:\program files (x86)\microsoft visual studio\2019\community\common7\ide\extensions\ru3henro.cop\Visual.Micro.Arduino.Studio.dll&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;System.IO.FileNotFoundException: Could not load file or assembly &apos;file:///c:\program files (x86)\microsoft visual studio\2019\community\common7\ide\extensions\ru3henro.cop\Visual.Micro.Arduino.Studio.dll&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;File name: &apos;file:///c:\program files (x86)\microsoft visual studio\2019\community\common7\ide\extensions\ru3henro.cop\Visual.Micro.Arduino.Studio.dll&apos;&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark&amp; stackMark)&#x000D;&#x000A;   at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence)&#x000D;&#x000A;   at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)&#x000D;&#x000A;   at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)&#x000D;&#x000A;&#x000D;&#x000A;WRN: Assembly binding logging is turned OFF.&#x000D;&#x000A;To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.&#x000D;&#x000A;Note: There is some performance penalty associated with assembly bind failure logging.&#x000D;&#x000A;To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].&#x000D;&#x000A;</description>
    <guid>{C2B94433-1774-4242-8062-987A4484F1ED}</guid>
    <hr>80004005 - E_FAIL</hr>
    <errorinfo></errorinfo>
  </entry>
</activity> 



Uninstalling the package, and returning to any build before 1906_26_0 (including) fixes the issue.

Is the build not stable yet, or did I miss something?

Thanks in advance.

EDIT: to clarify, all builds from 1906.26.4 onward cause the same issue.
Back to top
« Last Edit: Jun 30th, 2019 at 8:19am by Eblis »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10463
United Kingdom
Re: Visual_studio_package did not load corectly
Reply #1 - Jun 30th, 2019 at 12:24pm
 
Thanks for the report. The error suggests we have a missing dll. I suspect another Microsoft installer issue, they really do mess things up.

An extension is simply a .vsix file which is actually just a zip. The vsix is created by vS when we build and the Microsoft MSIXInstaller.exe is responsible for unpacking and installing the extension. It's not possible for the extension to install correctly for one person but be missing a dll for another person unless virus checker or the vsixinstaller play a part in things.

We know we are virus checked so this is some other variation. Can you please download the extension to your documents folder and then try to run manually by double clicking. What happens? Same problem?
Back to top
 
WWW  
IP Logged
 
Eblis
Newbies
*
Offline



Posts: 5
Re: Visual_studio_package did not load corectly
Reply #2 - Jun 30th, 2019 at 1:16pm
 
Thank you for the reply.

Yes, the same outcome.
I checked the aforementioned folder, and it the file is indeed missing from it.

I tried to install it from my documents, and the same result.

Then I decided to copy the file from the VSIX (as you mentioned it is a zip file)

The prompt disappeared, but the building my program (which I was able to do successfully in previous builds) fails with the following error.

Code:
Severity	Code	Description	Project	File	Line	Suppression State
Error	MSB8020	The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".	EEGTest	C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets	379
 



Note, that I didn't change anything except installing the latest "Visual.Micro.Arduino.Studio_1906_29_0" build.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10463
United Kingdom
Re: Visual_studio_package did not load corectly
Reply #3 - Jun 30th, 2019 at 1:22pm
 
That message is Microsoft trying to make a standard c++ windows build. This happens if Visual Micro is not loaded and unable to capture the vs build events for projects that contain a C++ file.

Do you see the vMicro menu? It your board selected? Does a new empty project build for Uno?
Back to top
 
WWW  
IP Logged
 
Eblis
Newbies
*
Offline



Posts: 5
Re: Visual_studio_package did not load corectly
Reply #4 - Jun 30th, 2019 at 1:49pm
 
Visual Micro wrote on Jun 30th, 2019 at 1:22pm:
Do you see the vMicro menu?

Yes, but it is incomplete as board choice and other options are missing.

Visual Micro wrote on Jun 30th, 2019 at 1:22pm:
It your board selected?


Can't choose a board.

Visual Micro wrote on Jun 30th, 2019 at 1:22pm:
Does a new empty project build for Uno?


Pressing File->New->Arduino Project doesn't do anything (and trying to create one from the new project window doesn't show Arduino as an option)
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10463
United Kingdom
Re: Visual_studio_package did not load corectly
Reply #5 - Jun 30th, 2019 at 1:51pm
 
This means that your virus checker is removing one of our dll's

Which virus checker are you using?
Back to top
 
WWW  
IP Logged
 
Eblis
Newbies
*
Offline



Posts: 5
Re: Visual_studio_package did not load corectly
Reply #6 - Jun 30th, 2019 at 2:02pm
 
Avira.
I tried scanning the VSIX file to see if he gives me false positives - but it said the file is clean.

I disabled the antivirus, and installed the new build.
A new directory has been created with all the files from the zip file in the extension folder. However, the prompt is back, and the ActivityLog is still asking for the original folder (which has been deleted).

I have VS2017 installed as well, and its ActivityLog is also looking for the old dll in the old folder.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10463
United Kingdom
Re: Visual_studio_package did not load corectly
Reply #7 - Jun 30th, 2019 at 2:10pm
 
It's very strange. As you can see we don't have any way to interfere with what the vsixinstaller.exe does and our side of things is simple.

The new version will be published to the gallery over the next few days. I suspect that when you can install from within the IDE using "Extensions and Updates" Visual Studio might do a better job.

I have no idea why an older version downloaded from the forum works using the external vsixinstall.exe but not for a latter version of Visual Micro. The changes in the last few builds have mainly been .txt file changes with debug and build instructions as opposed to significant program file
changes.

When you run an install from outside the IDE it's down to your windows registry to resolve which program runs for a .vsix. It's possible that a repair of vs2019 will also re-register the latest vsinstaller.exe?

Sorry not much help.
Back to top
 
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10463
United Kingdom
Re: Visual_studio_package did not load corectly
Reply #8 - Jul 1st, 2019 at 12:36pm
 
another thought. if it is confused about an "old path" then maybe first uninstall visual micro then install the new extension. We will look into why this has happened but so far it is isolated to your vs install.
Back to top
 
WWW  
IP Logged
 
Eblis
Newbies
*
Offline



Posts: 5
Re: Visual_studio_package did not load corectly
Reply #9 - Jul 2nd, 2019 at 7:58am
 
I tried your suggestion of repairing the installation of VS2019, and now the extension is working as intended.

Back to top
 
 
IP Logged
 
JanF
Newbies
*
Offline



Posts: 4
Re: Visual_studio_package did not load corectly
Reply #10 - Sep 16th, 2019 at 7:18pm
 
Visual Micro wrote on Jul 1st, 2019 at 12:36pm:
another thought. if it is confused about an "old path" then maybe first uninstall visual micro then install the new extension. We will look into why this has happened but so far it is isolated to your vs install.


I also have this issue. I have tried uninstalling and then reinstalling from inside VS2017. Also tried to uninstall from control panel and then reinstall from inside VS2017.
I see this dialog about Visual_Micro_Studiopackage did not load correctly twice when I start VS2017.
Last I tried manually download Visual Micro and run he installation from outside VS2017. Now VS2017 hangs up and when I try to close it I get a Window telling me that
Microsoft Visual Studio has detected that an operation is blocking user input
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10463
United Kingdom
Re: Visual_studio_package did not load corectly
Reply #11 - Sep 16th, 2019 at 7:20pm
 
This is a visual studio problem. Please open visual studio and ensure you have applied all updates via the tools>check for updates menu,

If the problem persists then run a repair on vs2017

Thanks
Back to top
 
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print