Solved

Error message when App is loading

Posted on 2006-06-13
5
256 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 Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

808 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