• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 98
  • Last Modified:

VB.NET deployed app will not run.

I am new to VB.NET, having moved from VB 6.0 finally.  I imported a VB 6.0 app into VS 2008 and then opened it in VS2013, since the latter does not provide for importing VB 6.0 apps.  Then, following the instructions at https://msdn.microsoft.com/en-US/library/k3bb4tfd(v=vs.80).aspx, I created a deployment/setup project with no problem.  I then installed the project onto a target machine with no problem.  But, when I launch the app following the install, I just get a pop-up dialog that says "<app name> has stopped running.".  That's it, nothing more, and no forms of the app ever appear, not is there any evidence that the app ever started.

When I install the same build onto my dev machine it works fine.  Also I have written another app (written, not imported from 6.0), and the setup project installs and runs fine on the same target machine noted above.

I really do not want to rewrite the app since it is pretty large.
0
mdreed
Asked:
mdreed
  • 8
  • 8
  • 3
  • +1
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
does this app runs on your development PC from within VS IDE?

Any error message?
0
 
mdreedAuthor Commented:
Yes, It runs within the IDE as well as from the setup/install.
0
 
Éric MoreauSenior .Net ConsultantCommented:
are you using a 3rd party components or some VB6 controls that are not included in your setup package?
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
mdreedAuthor Commented:
I am using ComponentOne controls as well as Crystal report viewing, but those references appear to be now included in VS.  And, since the install runs fine on the DE machine, I would think that the deployment must have included everything it needs.
0
 
Éric MoreauSenior .Net ConsultantCommented:
This is surely the problem. It is running on your Dev machine because you have installed the components on it. You better ensure by looking at the deployment package if those are included.
0
 
mdreedAuthor Commented:
Where do I look to see what should be included, and where do I include the from once they have been identified?
0
 
mlmccCommented:
I assume you have downloaded Crystal for VS2013.

From the same place you downloaded Crystal you should be able to download the runtimes.

mlmcc
0
 
mdreedAuthor Commented:
I didn't download anything.  I just used the component references included within  VS.  Am I supposed to download something and do a separate install on the target machine?
0
 
mlmccCommented:
How did you get Crystal for VS2013?

mlmcc
0
 
Éric MoreauSenior .Net ConsultantCommented:
crystal reports needs to be installed on the PC using the MSI (or MSM) provided by SAP. Check http://scn.sap.com/docs/DOC-7824
0
 
Éric MoreauSenior .Net ConsultantCommented:
as for your ComponentOne controls, are they VB6 ocx or .Net DLLs? They also need to be included.
0
 
mdreedAuthor Commented:
I suppose I am quite confused.  If I imported the VB 6.0 project into VS 2008 using the Upgrade Wizard, and the resulting project runs fine (after correcting all the errors of course), I would assume that the Upgrade Wizard would have made the necessary upgrades/replacements to the required components.  So, now that appears to be incorrect.  Also I forgot to mention that I installed the app on another IDE machine used by another IT person, and the app runs fine - and that machine does not have Crystal loaded, since he does not use Crystal.
0
 
mdreedAuthor Commented:
Eric:

The .NET .dlls are included, but the upgrade wizard also included a number of .ocx references.
0
 
Éric MoreauSenior .Net ConsultantCommented:
the upgrade wizard does no magic. It can replace the VB6 textbox with the .Net textbox but it has no clue about Component One controls. All it can do is to create a wrapper around the .ocx and use them in .Net. That means that when you publish your application, you need to deploy the .Net Framework but also all the VB6 controls (as you did when installing your VB6 application) and the VB6 runtime.

>>and that machine does not have Crystal loaded, since he does not use Crystal

Try to run a report on that machine and you will see errors. CR needs to be installed.
0
 
Éric MoreauSenior .Net ConsultantCommented:
>>but the upgrade wizard also included a number of .ocx references.

These needs to be deployed and registered as well.
0
 
mdreedAuthor Commented:
Can I include a Crystal installer/.msi with the project like is done with InstallShied for example.  If so, where do I get it and how do I tell the project to include it?
0
 
Éric MoreauSenior .Net ConsultantCommented:
again, crystal reports needs to be installed on the PC using the MSI (or MSM) provided by SAP. Check http://scn.sap.com/docs/DOC-7824
0
 
Jacques Bourgeois (James Burger)PresidentCommented:
The converter from VB6 to VB.NET was never a good thing. No matter what, the structure of a VB.NET application is completely different from a VB.NET application. The converter does what it can, but is very limited, and although the code it provides sometimes works (if you are lucky), it it very hard to maintain because it is not true .NET code. It compiles in .NET, but nobody would write code like that. It simply tries to emulate in .NET what VB6 was doing.

An you still use old controls and libraries dating from 1998. They might have worked in 2008, 10 year later (if you are lucky). But we are now in 2015, 17 years later. In computing, this is like 200 years in many other fields. Think of it. This is the difference in time between vinyl records and Blu-Ray. Try to play a vinyl record in a Blu-Ray player.

Compared to its competitors, Microsoft does a wonderful job on backward compatibility. But there is a limit. They already pay a big price for that, because in order to have backward compatibility, you limit yourself a lot in the new things that you can add to a system. Try to find something that was written 17 ago for the Mac and still works. Hey try something that was working 6 years ago for the Mac and still works. You are trying to use original source code and components whose support stopped 7 years ago.

I am truly sorry to have to tell you that, but you cannot skip close to 20 years of technology in computing and think that things will still work by simply putting it through a converter that was already doing a very bad job in 2002, when .NET replaced VB6. After so much time, you need to go for a rewrite, with newer components. Or keep using old operating systems, on old computers, as companies who put all their eggs in COBOL and did not follow the trends have to do. In the field where we are working, you have to update at minimum every 5 years or so.

Why do you think that you cannot import VB6 code in 2013? It's because it is almost impossible. It might be for a very simple application, that uses only things that were native to VB6. If you have an application that is a little more than simple, and are using components from 2 third party vendors, you have to believe in miracles. Even if you converted first to 2008, thinking that it would then work in 2013, the converted code from 2008 was working but completely outdated. It was not .NET code, it was an emulation of VB6 that could run in the .NET environment. It cannot go further.
0
 
mlmccCommented:
What version of Crystal do you have?

mlmcc
0
 
mdreedAuthor Commented:
I had come to the conclusion that rewriting the app was probably going to have to happen.  The VS 2008 conversion wizard was intriguing as an easy way out, but as with most things in life - nothing is free.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

  • 8
  • 8
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now