Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Error message when App is loading

Posted on 2006-06-13
5
Medium Priority
?
264 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
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…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

610 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