Solved

Error message when App is loading

Posted on 2006-06-13
5
253 Views
Last Modified: 2010-04-23
When I run my app on MY computer with Visual Studio .Net 2005, it runs fine. (.Net 2005 is also what I programed my app in)  BUT, when I run my app on another computer, I get an error message.  This is the message:

To run this application, you first must install one of the versions of the .Net framwork:
v.2.0.50727
Contact your application publisher for instructions about obtaining the appropriate version of the .Net Framwork.

It's a simple application.  When the CD is put in, it autoruns a startup window that looks at the system they're using and sees if they have Adobe 7.0 viewer.  If not, it installs it for them.  (THIS IS WORKING FINE)
After that, the startup window has a link to run a viewer app that I made.  (A completely differet .exe located on the CD)  It's when I click on this link that the error comes up.  

What is this error and how can make it stop without letting the user know.  This app is going out to 30 people and they are very very computer dumb.  I also won't know if they have this .Net framwork or not.

I'm using an XP machine with Service Pack 2 installed.  Please help.
0
Comment
Question by:Heyitsjoe80
  • 2
  • 2
5 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 16896863
The error message says it all - the user doesn't have the 2.0 version of the .Net framework installed.

You can get a redistributable version of the .Net framework that you can ship/install with your app.
0
 

Author Comment

by:Heyitsjoe80
ID: 16897070
My app does not install.  It just runs a .exe.  Does that matter?
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 16897101
Yes. If it is written for the .Net framework then it requires the .Net framework to run. Even tho it is run from the CD the actual assembly is still loaded into memory on the local machine and still requires access to the .Net framework libraries.
0
 

Author Comment

by:Heyitsjoe80
ID: 16897407
I'm sorry, let me rephrase that.  Since my app does not install..how can I get the .Net framework to install without the user knowing?  I understand that I need it to run the app.  I just don't want to hand this out to people and have them completely dumbfounded when the error pops up.
0
 
LVL 1

Accepted Solution

by:
thebatdude earned 500 total points
ID: 16897645
1. First the .NET Framework requires administrative level permissions in order to be installed.
2. You can specify command line arguments on the dotnetfx.exe which will cause it to install in an "unattended" fashion (without the users need to interact with the installation), but if the currently logged in user is not an administrator on the computer, this will fail.
      2.a If the users are on your corporate network, there are strategies to get around this:  see this article on deploying the .NET framework:  http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetdep/html/redistdeploy1_1.asp
3. If the users are all administrators then on your cd include the dotnetfx.exe for whatever version of the .NET framework your application requires, and autorun a batch file (.cmd file) to launch this:
dotnetfx.exe /q:a /c:"install /l /q"

This will install the .NET framework in silent mode.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now