0 votes

After using mail.exe (trial) to install I added the MailBrowserControl to the Visual Studio 2015 Toolbox. With a new project (.Net Framework 4.6, Target Any CPU) attempting to drop the control on form will add appropriate assembly references (3) to the project, but does not add the control itself to the form. Confirmed by inspecting the form designer code.

by

1 Answer

0 votes

Use full .NET framework, not client profile.

by (301k points)
Yes, I am using the full .Net 4.6 framework (not client profile).
You probably try to use 64 bit version then.

VisualStudio is 32 bit application so in the design time you need to use 32 bit version. You can find it in x86 folder.
Thanks. The "Choose Toolbox Items" dialog shows a single MailBrowserControl on the .Net Framework Components tab. Browsing to C:\Program Files\Limilabs\Mail\Redistributables\Net45\MailBrowserControl\x86 and selecting that assembly version checks the single MailBrowserControl item in the Choose Toolbox Items dialog. Can't tell which control version is actually being added.

Then, attempting to drop that control on the form has the same effect - nothing is added to the form. The three assembly references are added to the project.
On the Toolbox you click on 'Choose Items...', then 'Browse...', then you browse to Limilabs\Mail\Redistributables\Net45\MailBrowserControl\x86\MailBrowserControl.dll then click 'OK' and drag & drop from the toolbox to form. I just checked with new .Net 4.6 project.
Thanks again. Those are the steps I listed in my previous reply. More testing shows that if I create a new project and change the target to x86 I _can_ drop the component on the form. If I change the target to AnyCPU or x64 the control is _not_ added tot he form.
For x64 you must use x64. And you can't use the designer then because VisualStudio is 32 bit.
That seems like a very strange restriction given that all other components on the toolbox work with 32 and 64 bit targets. I do thank you for your quick responses and will check back with your site to check for future enhancements.
It's not a restriction. You can't use 64bit assembly in 32bit VisualStudio process.
...