Best Of
Re: How to using COM Interop.IWshRuntimeLibrary in LINQPad 8
AFAIK there is no NuGet for this.
How I did it for LINQPad 8 x86/x64 .NET 9
Ran Developer Command Prompt for VS
.
Copied file c:\windows\system32\wshom.ocx
somewhere I have write access to.
Ran tlbimp for that file and got IWshRuntimeLibrary.dll
tlbimp wshom.ocx
Output:
Microsoft (R) .NET Framework Type Library to Assembly Converter 4.8.3928.0 Copyright (C) Microsoft Corporation. All rights reserved. TlbImp : warning TI3002 : Importing a type library into a platform agnostic assembly. This can cause errors if the type library is not truly platform agnostic. TlbImp : Type library imported to IWshRuntimeLibrary.dll
IWshRuntimeLibrary.dll
:
// IWshRuntimeLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null // Global type: <Module> // Architecture: AnyCPU (64-bit preferred) // Runtime: v4.0.30319 // Hash algorithm: SHA1
Created new script:
var sh = new IWshRuntimeLibrary.WshShell(); // Use WshShell instead of WshShellClass! sh.CurrentDirectory.Dump();
Pressed F4
> Additional References
> Add / Browse...
Ran test script.
You might also need to pay attention to bitness. Also you might have to specify STAThread attribute for Main
.
Re: Cannot authenticate to Azure SQL Server with MFA
Hi @JoeAlbahari
Maybe I'm wrong because I'm new in the app or I'm doing bad. this's the process I followed to create a new connection.
Here's the result when I execute the code
In Azure Data Studio and SSMS I have the same error unless, I specify the database as well.
LinqPad 5 also add AI functionality?
LinqPad 7 already has AI functionality, but the .NET Framework is still unavoidable in many people's work environments. Can LinqPad 5 also add AI functionality? Thank you.
Suggestion: Vertical Code Editor Guides
I would like to recommend adding the ability to place Indent Guides (i.e., Guides in Visual Studio, vertical guides or guidelines in other produces) in the code editor to help assist line lengths and other potential areas.
I hate having to copy the code into Notepad++ just to check line lengths. Yeah, there are other ways, but that's the fastest at the moment.
An additional suggestion would be to show the current cursor position in the status bar at the bottom of the code window. Best case scenario would be to show what VS shows like current line #, current column #, and character index/#.
Thanks.
Re: Antivirus Performance Test
I can add all exceptions, process or files, and disable all settings and I get down to 20-40 milliseconds but no lower. At least it's something. The exceptions seem to do nothing. The only thing that does is removing the online bits.
Re: export Excel
Are you using the same 32-bit or 64-bit architectures for both 5 and 7 and is your Excel 32 or 64 bit?
Most of the problems with com objects that I have seen were due to a bit-ness issues.
AFAIK Linqpad uses the standard way to detect excel which is by calling System.Type.GetTypeFromProgID("Excel.Application")
which will return null if excel is not found.
Re: Suggestion: Add Ctrl+Click as an alternative to F12
I'm extremely used to using "Ctrl+Click" to select a whole word - i.e. what Ctrl+Click did before everyone started to switching it to "Go to definition". Can I disable this new feature? I just keep opening ILSpy all the time. You can't teach old dog... Much appreciated.
Turn off Tab Row Switching
Is there a way to turn off the automatic reordering of tab rows.
When I have multiple rows of tabs, when I click on a tab in row 1, then this row "drops" and replaced row 2.
Typo in LINQPad and Portable Deployments page
https://www.linqpad.net/PortableDeployment.aspx
Config Sttings --> Config Settings