Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 14975

VS security warning for WinForms component (dll downloaded from a network location)

$
0
0
Our customers have a legal copy of a WinForms component compiled for .NET Framework 4. Recently they surprised us - they can no longer add it to the Toolbox in Visual Studio 2019 and use it in VB.NET WinForms projects. The installation package of the component simply does not create the icons on the Toolbox automatically without reporting any errors, though earlier it worked without any problems.

While investigating this issue, I tried to add the component to the Toolbox manually and faced a strange security warning while doing this. First I create a new Toolbox tab, then open the Toolbox context menu and select the Choose Items... command to open the Choose Toolbox Items dialog. If I click the Browse button in the dialog on the default .NET Framework Components tab and select the component in the File Open dialog, the following security warning appears:

Name:  warning message box.png
Views: 45
Size:  9.1 KB

Quote:

Security warning: 'C:...\Something.DLL' may have been downloaded from a network location, and it can potentially harm your computer. Only load assemblies from publishers you trust.

Do you want to load it anyway?
If I allow adding of the component in this message box by clicking Sì (Yes in Italian), it appears on the Toolbox, but it still cannot be added to a WinForms form. It does not appear on the form if we double-click its icon on the Toolbox or drag-and-drop it onto the form. The only thing that appears is a reference to the component in the References node of the project in the Solution Explorer.

It is very strange because the same component works without any problems on another pc of our customers. I tried to reinstall the component, cleaned all remnants on the disk and in the registry after previous installations of the component, checked the component digital signature, launched VS with admin rights, checked it with the alternative antivirus the customer is using (BitDefender) - nothing helped.

The only workaround that helps to solve the problem is the following. If the component DLLs are copied to C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE, they can be successfully added to the Toolbox without any security warnings.

What can be the reason of this problem specific only for one instance of Visual Studio? The customers were using the latest build of Visual Studio, v16.10.3, on the moment of investigating this issue.
Attached Images
 

Viewing all articles
Browse latest Browse all 14975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>