write down,forget

The "GenerateResource" task failed unexpectedly.

<Category: 问题> 查看评论

    9    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)    WorkflowMonitor

<?xml version=”1.0″ encoding=”utf-8″?>
<Project DefaultTargets=”Build” xmlns=”http://schemas.microsoft.com/developer/msbuild/2003″ ToolsVersion=”4.0″>
<PropertyGroup>
<TrackFileAccess>false</TrackFileAccess>
….

谁有没有终极解决办法。。。

 –有了–

修改所有Microsoft.Common.targets

 <TrackFileAccess Condition=”‘$(TrackFileAccess)’ == ””>false</TrackFileAccess>

—–

Find the file: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets

Locate the <GenerateResource> tag at Line 1835 and delete the attributes TrackFileAccess and TrackerLogDirectory

http://social.msdn.microsoft.com/Forums/en/csharpide/thread/88db71cf-a501-428d-91fa-1535d82d8014

http://www.go4answers.com/Example/error-msb4018-generateresource-task-25286.aspx

本文来自: The "GenerateResource" task failed unexpectedly.