# my program requires .NET framework??? (solved, i guess)

## Recommended Posts

i'm done with the project i've posted about a dozen threads about.. apparently it uses some DLLs that don't come with standard windows installations, so i'm attempting to solve this issue by providing the necessary files. simply including DLLs with an installation package (like NSIS) doesn't seem to work, or at least not between windows XP and 2000. the DLLs are properly installed, etc, but the program just won't run (the installer was compiled in XP, installed on 2000). using the visual studio 7.1 "Setup Wizard" creates a working install file, but it detects that .NET framework is required, points users to an outdated download URL, which fowards to a long list of .NET framework downloads. especially since the people i'm writing this program for won't necessarily know what the difference between all of these .NET downloads are, let alone what .NET actually IS, i would like to figure out a way to simplify this installation procedure. i'm not really sure what i included in my project for visual studio to think it requires .NET framework.. this is a list of all the includes to libraries i'm using. they are in no particular order, and are taken from many different source files:
#include <iostream>
#include <string>
#include <vector>
#include <ddraw.h>
#include "windows.h"

// using QueryPerformanceTimer, Frequency..
#include "mmsystem.h"
#include "ddutil.h"

#include <afx.h>
#include <process.h>
#include <stdlib.h>
#include <ctype.h>
#include <windows.h>
#include <windowsx.h>

// GRETA, microsoft's regular expression library
#include "regexpr2.h"
#include "afxwin.h"


this is my first windows application, and my first attempt at making a windows installer. it sucks! if i say, just try to run the program on an arbitrary machine (without .NET framework installed), error messages tell me i need the following DLLs: mscoree.dll msvcp71.dll msvcr71.dll MFC71.dll when i used the NSIS installer, as mentioned above, these DLLs are installed properly. but when you try to run the program, it just quits without saying or doing anything. do i need to include windows 2000 versions of these DLLs as well? [Edited by - mayonaise on November 9, 2004 6:11:17 PM]

##### Share on other sites
I don't think any of those dlls are part of the .NET Framework. (The .NET one is mscorlib.dll, not mscoree.dll.) I've seen the dlls you listed used in a few applications that do 3D stuff, but I'm not positive that that's what they're for. Given the name of the last one you listed, could they have something to do with MFC? Sorry, I don't know much outside of .NET and Java, so try Googling - that's always a good place to start looking.
Good luck!

##### Share on other sites
Quote:
 Original post by TheBluMageI don't think any of those dlls are part of the .NET Framework. (The .NET one is mscorlib.dll, not mscoree.dll.)

mscoree.dll is the "Microsoft COmmon Runtime Execution Engine", the most important part of .NET.

Quote:
 this is a list of all the includes to libraries i'm using.[...]

It doesn't seem like you are using any .NET libraries. Go into the Properties dialog for the project, go to General and take a look at the field labeled "Use Managed Extensions". Is it set to "Yes"? If so, set it to "No".

That's most likely your problem.

##### Share on other sites
i just discovered that copying windows 2000 versions of the DLLs i mentioned does not work. while the program doesn't give any error messages when run, it still doesn't do anything. i think it opens and closes so fast it doesn't even show up in task manager...

edit: probably because they are exactly the same files... d'oh

[Edited by - mayonaise on November 8, 2004 7:04:10 PM]

##### Share on other sites
Quote:
 Original post by Arild FinesIt doesn't seem like you are using any .NET libraries. Go into the Properties dialog for the project, go to General and take a look at the field labeled "Use Managed Extensions". Is it set to "Yes"? If so, set it to "No".That's most likely your problem.
one of the projects in the solution did have the "Use Managed Extensions" option set to "Yes", but changine it to "No" had no effect. the program still complains that it needs "MFC71.dll" if it is not present. making all of these DLLs available doesn't still doesn't solve the problem...

thanks for the suggestions

##### Share on other sites
Quote:
 one of the projects in the solution did have the "Use Managed Extensions" option set to "Yes", but changine it to "No" had no effect.

As long as it's no longer complaining about mscoree.dll, it did have an effect.
Quote:
 the program still complains that it needs "MFC71.dll"

That's the MFC runtime dll - has nothing to do with the .NET framework.
Quote:
 if it is not present. making all of these DLLs available doesn't still doesn't solve the problem...

That seems weird. Where did you put them?

If you can't resolve it any other way, download Filemon from www.sysinternals.com and use it to monitor which files your app attempts to open and where. That's what I usually do in cases like these.

Filemon should be in every Windows programmer's toolchest(along with Regmon, Dependency Walker and Process Explorer).

##### Share on other sites
When you created your project how did you do it? Did you select one of the "Managed C++ ..." types? If so, create a new project using the "Win32 Application" type. You'll get a regular unmanaged application which doesn't require the .NET Framework.

##### Share on other sites
Quote:
 Original post by Arild FinesAs long as it's no longer complaining about mscoree.dll, it did have an effect.That's the MFC runtime dll - has nothing to do with the .NET framework.That seems weird. Where did you put them?If you can't resolve it any other way, download Filemon from www.sysinternals.com and use it to monitor which files your app attempts to open and where. That's what I usually do in cases like these.Filemon should be in every Windows programmer's toolchest(along with Regmon, Dependency Walker and Process Explorer).
i put the DLLs in the program folder, as well as in the system32 directory.

running filemon showed me i was missing another DLL, MFC71ENU.dll. but supplying this DLL didn't fix anything. i'm looking at entries in filemon that show a "FILE NOT FOUND" result - should i be looking for something else? the only other errors i see are "myProgramName.exe.Local" and "mscoree.dll.Local" both cannot be found. but this is true for the system i'm developing on as well - which runs the program fine.

filemon seems like a really useful tool, tho. thanks for the tip!

Quote:
 Original post by MachairaWhen you created your project how did you do it? Did you select one of the "Managed C++ ..." types? If so, create a new project using the "Win32 Application" type. You'll get a regular unmanaged application which doesn't require the .NET Framework.
it was a while ago, so i don't remember exactly, but i'm pretty sure i chose a regular Win32 application.

the program USED to work on any machine.. there is a directx (direct draw, to be exact) portion of the program that was once a separate program entirely. the main program would call it via a call to system().. this produced a lot of problems, so i decided to integrate the two. basically, i just added the directx project to the main solution, converted the code to a class instead of a free-standing program with a WinMain() function, changed the way i called it, and built the solution.

edit: actually, i chose MFC Application (Visual C++ 7.1). in the wizard, i set the application type to "Dialog based", using MFC in a shared DLL. i'm not sure that this matters either way, because the program used to work fine on any machine without .NET framework.

do you think this change could be relevant to the problem i'm having now? i've checked and re-checked all of the project settings for all of the projects i have included in the solution. none of them have "Used Managed Extensions" enabled. are there any other settings i should be aware of?

thanks for the help! this is so frustrating...

[Edited by - mayonaise on November 8, 2004 9:30:33 PM]

##### Share on other sites
msvcp71.dll and msvcr71.dll are, respectively, the Microsoft C++ and C runtime libraries. If you're dynamically linking to the runtime libraries you'll need to provide these DLLs. I think they don't come in a standard Windows installation.

cheers
sam

##### Share on other sites
Quote:
Original post by Arild Fines
Quote:
 Original post by TheBluMageI don't think any of those dlls are part of the .NET Framework. (The .NET one is mscorlib.dll, not mscoree.dll.)

mscoree.dll is the "Microsoft COmmon Runtime Execution Engine", the most important part of .NET.

Oops! Guess I'm not quite as familiar with the runtime libraries as I am with the class libraries. Thanks for the correction and additional insight!

##### Share on other sites
... anything that uses GDI+ will also probably need .NET

##### Share on other sites
Quote:
 Original post by paulecoyote... anything that uses GDI+ will also probably need .NET
to my knowledge i'm not using GDI+... am i? what does GDI+ cover, in an MFC GUI application? the application uses standard controls; comboboxes, buttons, static text fields, edit boxes, and check boxes.

i tried creating a new MFC application from scratch, to test whether it was the libraries i wrote that were causing the problem. it was not.

i know it's not GRETA (ms regular expression library), because the old version that worked on any machine without .NET framework used GRETA as well. i know it's not any of the libraries i wrote and included... i'm really not sure what it was, but something must have just gotten screwed up with the project. hopefully re-creating the project will solve the problem.

##### Share on other sites
You don't need .Net to use GDI+. It was designed to be a stand alone api. We use it with MFC apps and ATL apps here with no .NET runtime.

It even has its own reditributable merge module:)

CHeers
Chris

##### Share on other sites
Quote:
 Original post by mayonaisehopefully re-creating the project will solve the problem.
looks like that fixed it.. what could have caused this problem?! all of the project settings are identical in the new project.

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account

• ### Forum Statistics

• Total Topics
628320
• Total Posts
2982057

• 12
• 9
• 9
• 13
• 11