none
Incorrect Error: Project Target Framework Not Installed when opening a .NET 4.0 project

    Question

  • I am experiencing a rather disconcerting issue with one of my development machines that I hope someone can advise me on.

    I have a large Visual Studio 2010 VB solution, targeting the .NET Framework 4.0 which opens and works just find on numerous Visual Studio 2010 installations - except one. The 'error' (more a message) when opening the solution says: 

    "Project Target Framework Not Installed"

    "The VB project <project> is targeting '.NETFramework,Version=v4.0", which is not installed on this machine. You must download this framework in order to open and build this project. In order to proceed, you must select an option below."

    see pic:
      


    I have tried:

    1. Repairing (didn't fix), uninstalling and reinstalling Visual Studio (didn't fix)

    2. Repairing (didn't fix), uninstalling and reinstalling .NET Framework 4.0 (didn't fix)

    Retrying step number 1 again after step number 2 (didn't fix).

     

    What worked temporarily was when I used a .NET Framework removal tool in order to remove all traces of the .NET Framework 4.0 from the machine (including the registry) and then installing the .NET Framework 4.0 again. However the error has returned.

    I'm not sure if this is a problem with some .NET Framework 4.0 file corruption, something within Visual Studio or simply that Visual Studio cannot find the .NET Framework 4.0. (I have found several possible 'explanations' but nothing that resolves this issue.

    The machine is running Windows 7 (64 bit).

    Any ideas towards troubleshooting this issue would be warmly received!

    Many thanks,

    Mike
    • Edited by Mike Wilson Saturday, January 08, 2011 10:11 PM added formatting..
    Saturday, January 08, 2011 10:10 PM

Answers

  • Hi Mike,

    Thank you for posting.

    First of all, can you reproduce this issue on other machines?

    Did this project develop on this machine or on other machines?

    Did you choose the framework target of this project to .NET Framework 4?

    In addition, please download .NET Framework Verification Tool to verify if .NET Framework 4 was installed correctly on your machine.

    If you have any concern, please feel free to let me know.

    Best Regards,

    Larcolais


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Larcolais Gong Tuesday, January 18, 2011 7:43 AM
    Monday, January 10, 2011 6:17 AM

All replies

  • Hi Mike,

    Thank you for posting.

    First of all, can you reproduce this issue on other machines?

    Did this project develop on this machine or on other machines?

    Did you choose the framework target of this project to .NET Framework 4?

    In addition, please download .NET Framework Verification Tool to verify if .NET Framework 4 was installed correctly on your machine.

    If you have any concern, please feel free to let me know.

    Best Regards,

    Larcolais


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Larcolais Gong Tuesday, January 18, 2011 7:43 AM
    Monday, January 10, 2011 6:17 AM
  • Hi Mike Wilson,

    Any update? Has your concern been resolved?

    Best Regards,

    Larcolais


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, January 14, 2011 11:05 AM
  • Hi Larcolais,

    I am having this problem too and I have not been able to resolve it.  I have run the .Net framework verification tool that you suggested, and it says that .net framework 4 full is installed correctly, but Visual Studio 2010 can't seem to find it because when I load my projects that were developed for .net 4, I get the "Project Target Framework Not Installed" mesage. 

    I have tried uninstalling and reinstalling .net 4.  Any other ideas?

    Thank you for your help.

     

    Susan

    Tuesday, February 15, 2011 11:04 PM
  • Have you been able to solve this? We are having this exact same problem in my co worker machine. We have unistall, remove , use all the tools they always post but still the same problem. We are using XP machines.
    Saturday, May 28, 2011 12:22 AM
  • Hi eldeaca,

    I "solved" it by un-installing .net 4 framework and Visual Studio and then painstaking cleaned up the registry manually.  I  removed all traces of .net 4 and Visual Studio.  I then reinstalled .net 4 and then VS.  Fortunately, I haven't had the problem since!  (We are also using XP will all of the latest patches.)

    Good luck!

    Susan

    Tuesday, May 31, 2011 3:02 PM
  • I am also experiencing this problem.  The verification tool reported that .net 4.0 full was installed correctly.
    Sunday, July 17, 2011 3:21 AM
  • Hi,

    I also had this issue and reinstalling Visual Studio/.NET didn't help. Machine: Win7 64-bit

    The problem was that my program files path was "D:\Programme\" instead of the default one "C:\\Program Files (x86)\". It looks as either Visual Studio or the .NET Framework first ignores the path and install some components to "C:\\Program Files (x86)\" and later search for them in %ProgramFilesDir% which is the same on most computers but was different in this case. Some other programs have similiar issues.

    setting these values and reinstalling both solved the problem:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion]
    "CommonFilesDir"="C:\\Program Files\\Common Files"
    "CommonFilesDir (x86)"="C:\\Program Files (x86)\\Common Files"
    "CommonW6432Dir"="C:\\Program Files\\Common Files"
    "ProgramFilesDir"="C:\\Program Files"
    "ProgramFilesDir (x86)"="C:\\Program Files (x86)"
    "ProgramW6432Dir"="C:\\Program Files"


    Tuesday, August 30, 2011 4:05 PM
  • Hi, pberger1 !

    I also changed my %ProgramFiles% defaults and it ruined a lot of Microsoft programms, then I changes registry values back, but MSVS still bugs.

    So,

    1) should I also use double slashes in values?

    2) Is there any other way to resore defaults there, than manual (can't see the difference, but it seems, MSVS does)

    3) Installing Studio on D:\ makes difference or not? 

    Monday, October 08, 2012 10:16 PM