刚刚升级到Visual Studio 2012,连接到我的TFS解决方案,将所有项目从v4.0升级到v4.5。解决方案编译并运行正常。超。VS2010从vs2010升级后在错误列表中缺少编译器错误
现在我添加了新的代码,但编译器错误未列在错误列表输出窗口中。我只看到有关.dll文件未找到的错误。
例如Error 1 Could not copy the file "C:\SourceCode\<snip>Library.dll" because it was not found. C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets
当然,那么它不能被发现,我把线:
thing bob = new thing();
成一类。
不幸的是,在编译期间不会报告这个错误。
甚至详细comiler输出显示CSC.EXE任务之后什么:
6>Task "Csc"
6> C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe <snip>
6>Done executing task "Csc".
如果我在CMD窗口中运行CSC.EXE任务,你可以清楚地看到了异常:
Microsoft (R) Visual C# Compiler version 4.0.30319.17929
for Microsoft (R) .NET Framework 4.5
Copyright (C) Microsoft Corporation. All rights reserved.
State\ConditionalAction.cs(16,13,16,18): error CS0246: The type or namespace name 'thing' could not be found (are you missing a using directive or an assembly reference?)
State\ConditionalAction.cs(16,29,16,34): error CS0246: The type or namespace name 'thing' could not be found (are you missing a using directive or an assembly reference?)
有任何人之前见过这个问题或有任何想法?
编辑更多的证据
看来,“硬”编译错误都被报告由垃圾的行移除分号,即给了我一个编译器错误:
thing bob = new thing()
Error 2 ; expected C:\\ConditionalAction.cs 16
的然而,错误的类型仍然不存在。
EDIT 2多的证据
看来,VS 2012是无法正确识别,该项目开始运行和调试MVC应用程序(F5)时,与缺失的类型错误。 我刚刚删除了违规代码,运行了应用程序,重新插入了违规代码,重新运行了应用程序,并且VS愉快地运行了以前编译的应用程序版本而没有投诉。
Windows 7 Enterprise – Seb
不是100%确定要问什么,但“Visual C++ 2012”是Help >>关于Microsoft Visual Studio下安装的产品之一。 – Seb
@yve我试过以上无效,确保我以管理员身份明确运行所有四项安装,然后重新启动。有关信息,我正在运行Visual Studio Enterprise的x64版本。我可以提供哪些其他信息以帮助您? – Seb