Open solution file AddAnyFile.sln in Visual Studio 2019
Press F5 to start debugging.
Experimental instance of Visual Studio opens... create a new C# Console Application.
Attempt to add a new file.
(see above screen snip for immediate error that appears)
Expected behavior: [What you expected to happen]
Trigger the AnyFile extension to add a new file to the solution.
Actual behavior: [What actually happened]
An error occurred, as noted above. The referenced `C:\Users\gojimmypi\AppData\Roaming\Microsoft\VisualStudio\16.0_d46d6b9aExp' contains this error message at the end:
Description: Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0
specifically:
...[snip]...
<entry>
<record>4401</record>
<time>2021/12/25 17:08:02.030</time>
<type>Information</type>
<source>VisualStudio</source>
<description>End package load [ArchitectureExplorerPackage]</description>
<guid>{1FAFD918-AE4A-4602-8EFA-BDB72A1D9F6C}</guid>
</entry>
<entry>
<record>4402</record>
<time>2021/12/25 17:08:11.236</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [AddAnyFilePackage]</description>
<guid>{27DD9DEA-6DD2-403E-929D-3FF20D896C5E}</guid>
</entry>
<entry>
<record>4403</record>
<time>2021/12/25 17:08:11.262</time>
<type>Error</type>
<source>VisualStudio</source>
<description>CreateInstance failed for package [AddAnyFilePackage]Source: 'mscorlib' Description: Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
 at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)
 at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
 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)

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/
LOG: Initial PrivatePath = NULL
Calling assembly : AddAnyFile, Version=4.1.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: Using application configuration file: C:\Users\gojimmypi\AppData\Local\Microsoft\VisualStudio\16.0_d46d6b9aExp\devenv.exe.config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/Microsoft.VisualStudio.Shell.15.0.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PublicAssemblies/Microsoft.VisualStudio.Shell.15.0.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Major Version
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PublicAssemblies/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Shell.15.0.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TestWindow/Microsoft.VisualStudio.Shell.15.0.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TestWindow/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Platform/Debugger/Microsoft.VisualStudio.Shell.15.0.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Platform/Debugger/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PrivateAssemblies/DataCollectors/Microsoft.VisualStudio.Shell.15.0.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PrivateAssemblies/DataCollectors/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PrivateAssemblies/DataCollectors/x86/Microsoft.VisualStudio.Shell.15.0.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PrivateAssemblies/DataCollectors/x86/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/Microsoft.VisualStudio.Shell.15.0.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PublicAssemblies/Microsoft.VisualStudio.Shell.15.0.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PublicAssemblies/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Shell.15.0.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TestWindow/Microsoft.VisualStudio.Shell.15.0.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TestWindow/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Platform/Debugger/Microsoft.VisualStudio.Shell.15.0.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Platform/Debugger/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PrivateAssemblies/DataCollectors/Microsoft.VisualStudio.Shell.15.0.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PrivateAssemblies/DataCollectors/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PrivateAssemblies/DataCollectors/x86/Microsoft.VisualStudio.Shell.15.0.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PrivateAssemblies/DataCollectors/x86/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE.
LOG: Attempting download of new URL file:///c:/users/gojimmypi/appdata/local/microsoft/visualstudio/16.0_d46d6b9aexp/extensions/mads kristensen/add new file (64-bit)/4.1/Microsoft.VisualStudio.Shell.15.0.DLL.
LOG: Attempting download of new URL file:///c:/users/gojimmypi/appdata/local/microsoft/visualstudio/16.0_d46d6b9aexp/extensions/mads kristensen/add new file (64-bit)/4.1/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL.
LOG: Attempting download of new URL file:///c:/users/gojimmypi/appdata/local/microsoft/visualstudio/16.0_d46d6b9aexp/extensions/mads kristensen/add new file (64-bit)/4.1/Microsoft.VisualStudio.Shell.15.0.EXE.
LOG: Attempting download of new URL file:///c:/users/gojimmypi/appdata/local/microsoft/visualstudio/16.0_d46d6b9aexp/extensions/mads kristensen/add new file (64-bit)/4.1/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE.
</description>
<guid>{27DD9DEA-6DD2-403E-929D-3FF20D896C5E}</guid>
<hr>80004005 - E_FAIL</hr>
<errorinfo></errorinfo>
</entry>
</activity>
I believe I have everything installed to develop extensions, as I am able to load and debug my Verilog Language Extension.
The problem appears to be related to mismatched Microsoft.VisualStudio.Shell.15.0.DLL:
Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PublicAssemblies/Microsoft.VisualStudio.Shell.15.0.DLL
WRN: Comparing the assembly name resulted in the mismatch: Major Version
I have a bunch file files in my PublicAssemblies but none like VisualStudio*
C:\workspace>dir "C:\Program Files (x86)\Microsoft Visual Studio/2019\Enterprise\Common7\IDE\PublicAssemblies\V*
Volume in drive C is OS
Volume Serial Number is ----
Directory of C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\PublicAssemblies
08/16/2021 08:14 AM 62,328 VSLangProj.dll
08/16/2021 08:14 AM 20,664 VSLangProj100.dll
08/16/2021 08:14 AM 81,080 VSLangProj110.dll
08/16/2021 08:14 AM 23,376 VSLangProj140.dll
08/16/2021 08:14 AM 26,696 VSLangProj150.dll
08/16/2021 08:14 AM 22,328 VSLangProj157.dll
08/16/2021 08:14 AM 38,480 VSLangProj158.dll
08/16/2021 08:14 AM 46,472 VSLangProj165.dll
08/16/2021 08:14 AM 29,048 VSLangProj2.dll
08/16/2021 08:14 AM 82,808 VSLangProj80.dll
08/16/2021 08:14 AM 5,120 VSLangProj90.dll
08/16/2021 08:30 AM 49,152 VsWebSite.Interop.dll
08/16/2021 08:30 AM 23,416 VsWebSite.Interop100.dll
08/16/2021 08:30 AM 12,288 VsWebSite.Interop90.dll
14 File(s) 523,256 bytes
0 Dir(s) ---- bytes free
C:\workspace>
Any tips to get this working will be appreciated. Thank you.
Description
When attempting to add a file:
Steps to reproduce
git clone https://github.com/madskristensen/AddAnyFile.git
AddAnyFile.sln
in Visual Studio 2019F5
to start debugging.Expected behavior: [What you expected to happen]
Trigger the
AnyFile
extension to add a new file to the solution.Actual behavior: [What actually happened]
An error occurred, as noted above. The referenced `C:\Users\gojimmypi\AppData\Roaming\Microsoft\VisualStudio\16.0_d46d6b9aExp' contains this error message at the end:
Description: Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0
specifically:
I believe I have everything installed to develop extensions, as I am able to load and debug my Verilog Language Extension.
The problem appears to be related to mismatched
Microsoft.VisualStudio.Shell.15.0.DLL
:I have a bunch file files in my
PublicAssemblies
but none likeVisualStudio*
Any tips to get this working will be appreciated. Thank you.