Solved

Error message when App is loading

Posted on 2006-06-13
5
254 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 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

15 Experts available now in Live!

Get 1:1 Help Now