无法在 Visual Studio 2015 中定位 .Net 2.0

Cannot target .Net 2.0 in Visual Studio 2015

我有 a project 同时针对 .Net 2.0 和 .Net 4.5。我在 Visual Studio 2013 年成功构建+发布了它。.csproj 文件中的 .Net 配置仍然显示

<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>

然而,当我在 VS 2015 中打开项目时,它针对 .Net 4.5。

目标框架下拉列表中有 2.0:

当我点击“.Net Framework 2.0”时,弹出窗口显示

Changing the target framework requires that the current project be closed and then reopened.
Any unsaved changes within the project will be automatically saved.

Changing Target Framework my require manual modification of project files in order to build.

Are you sure you want to change the Target Framework for this project?

当我单击“是”时,目标框架返回到 4.5,没有其他任何反应。

现在我没主意了。有没有其他人遇到过这个?

运行 Windows 7.

如果 .NET Framework 2.0 损坏,请使用 .NET Framework 安装验证工具:https://blogs.msdn.microsoft.com/astebner/2013/11/06/net-framework-setup-verification-tool-and-cleanup-tool-now-support-net-framework-4-5-1/ to verify and once it found any corrupted, you can use the .NET Framework Repair Tool: https://www.microsoft.com/en-us/download/details.aspx?id=30135 进行修复。

或者在“打开或关闭 Windows 功能”下,取消选中 .NET Framework 3.5(包括 .NET 2.0 和 3.0),然后选中它。

正如 Hans Passant 在评论中提到的,我显然(?)编辑了 .csproj 以针对不同的配置使用不同的框架。我发誓这在 VS 2013 中没有引起任何问题。

但无论如何,我使用 ILSpy 验证生成的 .dll 是 .Net 2.0,即使下拉列表显示 4.5。所以我想一切都会好起来的吧?