0

I have a VB6 application, which referencing a COM visible .Net application, The .Net application is a windows form project which contains some forms.

The VB6 application calls a method from .Net application to show some forms and save data.

The question is: How can I make the .Net application to be deployed, auto updated using Click-once and still accessible from VB6? Because the .Net assembly should be registered after deployment using (RegAsm.exe)! and the assemblies should be next to the VB6 application exe file.

Here code snippet from VB6

Dim a As HISIntegration.HIS
Set a = New Rims_HISIntegration.HIS
a.Show

Here is .Net code:

[Guid("C79963CC-0284-4848-BAED-F24FC19433F9"), ClassInterface(ClassInterfaceType.AutoDual)]
public class HIS
{
 public bool Show()
    {
        /// ...... some code.
        return (frm.ShowDialog() == DialogResult.OK);
    }
}

1 Answer 1

1

You aren't going to get .NET assemblies "next to the VB6 application exe" unless you deploy the VB6 application with ClickOnce. And you can't directly deploy a VB6 application with ClickOnce because the entry point to ClickOnce apps must be a .NET exe.

You can create a .NET stub application that simply launches your VB6 app and then deploy all files (stub, VB6, .NET assemblies) with ClickOnce. That seems like the cleanest solution.

Sign up to request clarification or add additional context in comments.

2 Comments

actually the VB6 application is already there, and we made an enhancement by adding .Net application, and we need the assemblies to be next to VB6 exe file, because some assemblies are loaded at run time (injected using Castle.Windsor).
then you can't use ClickOnce. you can't control where ClickOnce installs files. it puts them in an obfuscated, user profile folder. no way around it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.