简体   繁体   English

在Visual Studio 2012中为Office 2010构建VSTO项目时,出现“未安装Project Target Framework”错误

[英]“Project Target Framework Not installed” error comes when building the VSTO project for Office 2010 in Visual studio 2012

I have developed a VSTO project in Visual Studio 2012 and it was working fine. 我在Visual Studio 2012中开发了一个VSTO项目,并且运行良好。

I have close the Visual Studio and tried to open the same solution again and i got the following error. 我关闭了Visual Studio,并尝试再次打开相同的解决方案,但出现以下错误。

Project Target Framework Not installed 未安装项目目标框架

The C#project is targeting '.NETFramework,Version=v4.0", which is not installed on this machine. to proceed, you must select an option below. C#项目的目标是'.NETFramework,Version = v4.0“,该计算机上未安装该版本。要继续,必须在下面选择一个选项。

1.Change the target to .NET Framework 4.5..... 1.将目标更改为.NET Framework 4.5 .....

2.Download the targeting pack for ".NET Framework, Version = v4.0"... 2.下载“ .NET Framework版本= v4.0”的定位包...

3.Do not load the project 3,不要加载项目

None of the above steps worked.This is happening when closing the application after first time i created the VSTO excel addin for office 2010. Is there a way to fix this issue ? 以上步骤均无效。这是在我第一次为Office 2010创建VSTO excel插件后关闭应用程序时发生的。有没有解决此问题的方法?

您需要安装Microsoft .NET Framework 4.5.2开发人员包https://www.microsoft.com/zh-cn/download/details.aspx?id=42637

VSTO-Projects in Visual Studio prior to VS 2013, Update 3 were hardlinked to a maximum of .NET 4.0. VS 2013 Update 3之前的Visual Studio中的VSTO项目已硬链接到最大的.NET 4.0。 This will most likely also include VS 2012. 这很可能还将包括VS 2012。

Since Visual Studio 2013 Update 3 ( https://blogs.msdn.microsoft.com/vsto/2014/08/04/visual-studio-2013-update-3-released/ ) you can choose .NET 4.5 (and later) for VSTO-projects. 自Visual Studio 2013 Update 3( https://blogs.msdn.microsoft.com/vsto/2014/08/04/visual-studio-2013-update-3-released/ )以来,您可以选择.NET 4.5(及更高版本)用于VSTO项目。 So this is probably a quirky behaviour of Visual Studio trying to upgrade a project to .NET 4.5 because of a missing .NET-installation (4.0) while the resulting upgraded project is not supported itself. 因此,这可能是Visual Studio尝试将项目升级到.NET 4.5的古怪行为,因为缺少.NET安装(4.0),而生成的升级项目本身不受支持。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio 2010项目到Visual Studio 2012 - Visual Studio 2010 project to Visual Studio 2012 未安装带有Unity Project目标框架的Visual Studio 15 - Visual Studio 15 with Unity Project Target Framework Not Installed 如何在未安装Office 2010的计算机上安装带有MS Access数据库的Visual Studio 2010安装项目? - How to install visual studio 2010 setup project with MS Access database on a computer which is not having Office 2010 installed? VSTO:带有Office 2010 64的Visual Studio 2005 - VSTO: Visual Studio 2005 with Office 2010 64 将Visual Studio 2010项目转换为Visual Studio 2012 - Visual Studio 2010 project conversion to Visual Studio 2012 在Visual Studio命令提示符2010中构建c#dll时如何指定.net目标框架? - How to specify .net target framework when building c# dll in Visual Studio Command Prompt 2010? 2003 Visual Studio项目转换为2010时出错 - error when converting 2003 visual studio project to 2010 复制的项目错误Visual Studio 2012 - Copied project error Visual Studio 2012 Visual Studio 2012项目将于2010年开放 - Visual Studio 2012 project won't open in 2010 使用Visual Studio 2010(VSTO)进行Office开发,需要考虑的事项 - Office development with Visual Studio 2010 (VSTO), things to consider
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM