Skip to content
October 1, 2010 / windperson

error FTK1011 → Visual Studio 2010 C#專案一個很鳥的bug

C# Project如果有使用到Visual Studio裡面提供的資源(Resource)功能(也就是專案中含有圖形介面的元件,例如windows form之類),而且該專案在磁碟實際路徑有包含非ASCII字元(如中文字的目錄),在編譯時會出現一個神奇的error:

image

見鬼,這專案裡根本沒有FileTracker這個檔案!Steaming mad

網路上查了一下,發現是個bug:
http://connect.microsoft.com/VisualStudio/feedback/details/564511/error-ftk1011-during-build-if-vs2010-project-doesnt-target-net-4

解決方法有:

  1. 在Windows系統新增一個環境變數名稱叫TRACKFILEACCESS,值為false。
  2. 把那個有問題的專案按右鍵選[Edit Project File],然後在那個開啟的.csproj檔案中,在所有的編譯配置的<PropertyGroup/>的節點內,新增<TrackFileAccess>false</TrackFileAccess>,存檔後重新載入該專案。
  3. 把專案使用的.net framework升級到.net 4.0。

reference:

http://connect.microsoft.com/VisualStudio/feedback/details/462208/microsoft-r-c-c-optimizing-compiler-has-stopped-working
http://social.msdn.microsoft.com/Forums/en-US/vcprerelease/thread/5805bf9d-4331-4eff-8f7d-c8df705e4ab6
http://www.dotblogs.com.tw/ricochen/archive/2010/06/15/15889.aspx

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: