How to avoid .NET 3.5 SP1 Framework dependency?

Dear experts,
I'm absolutely lost. Please help me with this deployment issue.

I'm writing a cpp MFC app in Visual Studio 2008. I'm fairly new to cpp and like many others I started off with some tutorials and .sln files that were included with them.

I deploy my app using the deployment project of VS 2008. It seems that my app is using some .NET 3.5 Framework SP1 components because if people don't use the setup.exe (generated by VS) and install the msi directly my app doesn't function properly.

However installing .NET 3.5 SP 1 is a hassle to say the least.So  I would really like to keep my dependencies to NET 2.0. (I understand even Win XP SP1 ships with net 2.0 by default)

Where can I found a comprehensive list of components/header files/functions I should adusjt/not use to roll back the .NET version?

Will it suffice to start a new MFC app. VS 2008 project but select NET 2.0 from the dropdown box available in the top right in project selection dialogue and copy the code?

Whats the best way to tackle this?

thanks in advance!
EmzThreeAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
DhaestConnect With a Mentor Commented:
>> Will it suffice to start a new MFC app. VS 2008 project but select NET 2.0 from the dropdown box available in the top right in project selection dialogue and copy the code?

Yes, this will make sure that you can't use anything for the .NET framework 3.5
If you have already used some code for 3.5 (and you copy it, it will give you errors).
0
 
Anurag ThakurConnect With a Mentor Technical ManagerCommented:
right click on the project and in the properties select .net 20. as the target framework and none of the 3.0 or 3.5 framework will be used in your application
0
 
EmzThreeAuthor Commented:
Thanks for quick replies.
The targeted framework dropdown box is greyed out for me. Any idea why?
Starting a new project will probably solve it, but it would obviously be easier to just change the targeted network.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
DhaestCommented:
0
 
EmzThreeAuthor Commented:
Thanks for the link. It was an interesting read.

Couldn't find a way to enable the dropdown box so I just manually edited the .vcproj file

from
      TargetFrameworkVersion="0" (weird that this was 0 right?)
to
      TargetFrameworkVersion="131072"

Any trouble I should expect by doing this?
Dropdown still disabled but at least now its showing "NET Framework 2.0"
0
 
AndyAinscowConnect With a Mentor Freelance programmer / ConsultantCommented:
>>>I'm writing a cpp MFC app


Erm, MFC is NOT dependant on .Net, are you writing a .net app or an MFC app or a mixed app?
0
 
EmzThreeAuthor Commented:
Update: By going to project properties >config properties>general and enabling "common language runtime support" I was able to change the targeted framework. The code refused to compile though (some types were missing all of a sudden like LPCSTR and LPWSTR) but at least I could "properly change" the targeted version.

Andy, well I started off with the MFC "dialogue based" new project template. But I added some .NET components while expanding the app.
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
Thanks, I'm not going to interfere further.  Bear in mind that mixing managed and unmanaged code is not the simplest of tasks, especially in one project.
0
All Courses

From novice to tech pro — start learning today.