Interop Forms Toolkit DLL and "Class does not support Automation or does not support expected interface" error - winforms

I have a .NET WinForms application that I've converted into a COM dll using the Interop Forms Toolkit 2.1. Thet setup project for the application has both my tlb as well as the Microsoft.InteropFormTools.tlb file set to Register as vsdrpCOM. The prerequisites for the project are to ensure that Windows Installer 3.1, .NET Framework 3.5 SP1, and the Microsoft Interop Forms Redistributable Package 2.0a is installed.
When I run this locally on a Windows XP box with both Visual Studio 2010 and Visual Studio 6 installed, it works fine. However, on this Windows XP machine, I receive an error stating: "Class does not support Automation or does not support expected interface."
Any ideas?

I got it. For those of you that are running into the same, do the following:
Go into Visual Studio 2005, 2008, or 2010 (I used 2010) and build your Interop Form.
Then, go into Visual Basic 6. If your library is not already referrenced, reference the
library.
Build your VB6 executable.
Go back into Visual Studio (.NET version) and build only your installer. This way the installer and VB6 both have the same .tlb file
You're good to go. Thanks for the suggestion Kris!

You have RegAsm the assembly (see stackoverflow for more) on the machine you want to install the application on. The assembly should also be in the directory where the VB6 application runs, or installed in the GAC.

Related

Windows Forms (.NET Core) is missing in the Visual Studio Community 2019

I have a problem which I struggle for 3 days. It seems that my Visual Studio Community 2019 doesn't want to recognise the ".Net core" for Windows Forms. I even install it manually (downloaded from Microsoft - .NET Core 3.1 SDK) but doesn't help. I used this blog Microsoft blog. They said that I have to install " Windows Forms .NET Core Designer VSIX package" because "it isn’t yet bundled with Visual Studio", but there is no link to download. I don't have ".NET Core" in "Project solutions" and "Visual Studio Installer" (I cannot download it from the installer). The version of VSC 2019 - 16.8.2
SS:
Installer
Project Picker
Installer2
Settings
So I had the same problem and yes you can't find .NET core windows form directly to open windows form that support windows form you will need to first open non .NET framework windows from app there you can select if you want core which version.
Windows Form Application
Selecting Desired Framework
You'd have to select Windows Forms App (.Net) from the available project types and that will open up as the latest .NET core Windows Froms.

How do I change target framework of existing Windows Forms project in Visual Studio 2012?

I have an existing project built in Visual Studio 2012 with VC++, which works fine on Windows 7 or higher versions. But when running on Windows XP, it gives an error that the application needs .NET framework v4.0 or higher to run. I am unable to install .NET Framework v4.0 on that system either.
So, the problem is that I want to downgrade my project's Target Framework Version, and I could not find any way to do it in Visual Studio 2012 - Windows Forms Application project.
Is there an alternate or better solution?
You must compile two applications, one for Windows 7 or higher and one for lower than Windows 7.
For changing your application .NET Framework follow the below address
[On Menu Bar]
Project -> "Your Application Name" Properties -> Application
And change
"Target Framework"

VSTO application deployment error

I am facing VSTO error when I am trying to install the application using click once installer. I have tried on Windows XP machine and also on Windows 7 machine.
Exact error when opening the application on client machine is
“The following Microsoft solution cannot be loaded because a compatible version of the .NET Framework is not Installed: myApplicationName.vsto”
The application is VSTO app in C# with WPF tab embedded in Excel application (Framework 4).
The framework the application is developed on is already installed on the client machine.
I did not find any solution in this thread; any help would be highly appreciated.
I had the same issue today. I believe this is a problem with the VSTO 2010 installer included with your application.
I went and downloaded the latest version from Microsoft, installed it, retried my installer and then everything worked.

No WPF/Silverlight in VS2012?

I have installed VS2012 on a windows 8 machine and surprisingly doesn't show any WPF or Silverlight option when I create a project.
Am I missing something here?! In fact, it is not the way it used to be in VS2010. I only can see it as template under Visual C# which again it is under Online.
Why is that?
You need to install "Visual Studio Express for Windows Desktop"....it's a different edition which has restored the WPF capability.
http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-for-windows-desktop
http://blogs.msdn.com/b/visualstudio/archive/2012/09/12/visual-studio-express-2012-for-windows-desktop-is-here.aspx
To help decide if it's got all the capabilities you need:
Limitations of Visual Studio 2012 Express Desktop

Reference library problem in Release configuration on another computer

I get this error when I open a program I created in Windows Vista in C# with WPF on a computer with Windows XP:
Could not load file or assembly
'Microsoft.Office.Interop.Word,
Version=12.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c' or
one of its dependencies. The system
cannot find the file specified.
This is rather strange because MS Office 2007 is installed... and MS Office 2003 seems to be also installed. Could there be some sort of conflict between the two?
Also, .NET framework is installed up to 3.5!
How can I solve this problem?
What was installed first, .NET or MS Office 2007? If Office is installed before the .NET framework, the interop assemblies will not be installed in the GAC.
You could try downloading the PIA redistributable from MS and running it on your XP box: http://www.microsoft.com/downloads/details.aspx?FamilyID=59daebaa-bed4-4282-a28c-b864d8bfa513&displaylang=en. This redistributable will load the MS Office interop assemblies into the GAC.

Resources