剛剛升級到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