[英]“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.