GenerateResource task failed unexpectedly Microsoft.Build.Utilities.FileTracker threw an exception System.NullReferenceException Object reference not set to an instance of an object in VS 2010 (64bits) on Windows 7 (64bits)
By: Date: 21.02.2011 Categories: !RUS,PROGRAMMING,TFS Метки:
ENG: GenerateResource task failed unexpectedly Microsoft.Build.Utilities.FileTracker threw an exception System.NullReferenceException Object reference not set to an instance of an object in VS 2010 (64bits) on Windows 7 (64bits)

Ошибка при компиляции проекта

Error    3    The «GenerateResource» task failed unexpectedly.
System.TypeInitializationException: The type initializer for ‘Microsoft.Build.Utilities.FileTracker’ threw an exception. —> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Build.Utilities.FileTracker..cctor()
— End of inner exception stack trace —
at Microsoft.Build.Utilities.FileTracker.ForceOutOfProcTracking(ExecutableType toolType, String dllName, String cancelEventName)
at Microsoft.Build.Tasks.GenerateResource.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)    C:WindowsMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.targets    1835    9    ELA.Server

Решения

1) Переменные окружения TEMP/TMP определены как (M:), т.е. без указания конкретной папки.

Нужно переопределить переменые TEMP/TMP так чтобы они указывали на папку (M:TEMP).

Эта рекомендация мне помогла.

2) Отключить file tracker. Для этого в файл проекта (*.csproj) добавить

<PropertyGroup>
<TrackFileAccess>false</TrackFileAccess>
</PropertyGroup>