Visual Studio 2010 中缺少 dotnet Framework 4 [英] dotnet Framework 4 missing from visual studio 2010

查看:37
本文介绍了Visual Studio 2010 中缺少 dotnet Framework 4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了 Visual Studio 2010,但是当我创建一个新项目时,Framework 4 没有出现在目标框架的选项中.我知道框架 4 安装正确,因为设置为 v4 的新应用程序池是在 IIS 中创建的.出于某种原因,它只是没有出现在 Visual Studio 中.我尝试修复 dotnet 4 并重新安装 Visual Studio,但仍然没有运气.有其他人遇到过这个问题或知道如何解决吗?

I just installed visual studio 2010 but when i create a new project Framework 4 does not appear in the options for target framework. I know framework 4 installed correctly because the new app pools set to v4 were created in IIS. For some reason it's just not showing up in visual studio. I tried repairing dotnet 4 and reinstalling visual studio but still no luck. Anyone else have this problem or know how to fix it?

推荐答案

导致丢失 .Net4 问题的更改:
1.
我在
中更改了一些注册表设置HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersion
通用文件目录
CommonFilesDir (x86)
CommonW6432Dir
程序文件目录
ProgramFilesDir (x86)
程序W6432Dir
所有这些都从 C: 驱动器移动到另一个驱动器(E:在我的情况下)

2.
我更改了一些用户文件夹的位置:
C:Users<名称>AppDataLocalLow
C:Users<名称>AppDataRoaming
那些被移动(通过属性->路径->移动"按钮)从 C: 驱动器到 F: 驱动器.

恢复后 1. 回到驱动器 C:
并在 C:UsersAppData 中创建指向新位置的符号链接,
它再次工作(注意:我在恢复更改之前卸载了 VS,然后再次安装)
(创建链接: mklink/d C:UsersAppDataLocalLow E:DataLocalLow)

我不能说是否真的需要这两个更改,因为我同时更改了两个.
但最后它又起作用了;)

问候,
霜冻元

Changes which lead to missing .Net4 problem:
1.
I changed some registry settings in
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersion
CommonFilesDir
CommonFilesDir (x86)
CommonW6432Dir
ProgramFilesDir
ProgramFilesDir (x86)
ProgramW6432Dir
All those were moved from C: drive to another drive (E: in my case)

2.
I changed the location of some user folders:
C:Users<name>AppDataLocalLow
C:Users<name>AppDataRoaming
Those were moved (via Properties->Path->"Move" button) from C: drive to F: drive.

After reverting 1. back to drive C:
and creating symbolic links in C:Users<name>AppData to the new locations,
it worked again (note: I uninstalled VS before reverting the changes, and installed again afterwards)
(Create link with: mklink /d C:Users<name>AppDataLocalLow E:DataLocalLow)

I can not say if both changes are really needed, because I changed both at once.
But finally it works again ;)

Greetings,
Frostregen

这篇关于Visual Studio 2010 中缺少 dotnet Framework 4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆