Hi, @Vaibhav Pol.
You could use different versions of Microsoft.VisualStudio.Shell.Interop
in the same project through Aliases
.
Assuming you have installed version 7.10.6071 of Microsoft.VisualStudio.Shell.Interop
via NuGet
Only the following code requires version 17.0.0.0 of Microsoft.VisualStudio.Shell.Interop
var newWindow = factory.CreateNewScript(string.Empty, externalProject, connection, null, string.Empty);
You could do the following:
Just like adding SQLEditor.Dll
, find Microsoft.VisualStudio.Interop.dll
in ~Program Files\Microsoft SQL Server Management Studio 21\Preview\Common7\IDE\Remote Debugger\x64\
on your computer and add it(If the dll location of Microsoft.VisualStudio.Shell.Interop 17.0.0.0 is different, you could adjust it yourself)
Open Properties
Enter Aliases
Using Aliases
Test results
You could also find Microsoft.VisualStudio.Shell.Interop 7.10.6071 in Packages
in the same way and get an Aliases for it
More about Aliases
:https://zcusa.951200.xyz/en-us/dotnet/csharp/language-reference/keywords/extern-alias
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.