I am following the tutorial from the book “Pro C# 2010 and the .NET 4 Platform”. After I load the sample code from MyXamlPad project under Chapter 27 and try to run it, I got an error from the compiler as follows:
Error 1 The "GenerateResource" task failed unexpectedly.
System.DllNotFoundException: Unable to load DLL 'FileTracker.dll': A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)
at Microsoft.Build.Shared.NativeMethodsShared.InprocTracking.StartTrackingContextWithRoot(String intermediateDirectory, String taskName, String rootMarker)
at Microsoft.Build.Utilities.FileTracker.StartTrackingContextWithRoot(String intermediateDirectory, String taskName, String rootMarkerResponseFile)
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) MyXamlPad
Reference:
http://www.apress.com/9781430225492
http://www.apress.com/downloadable/download/sample/sample_id/12/
What should I do to fix this problem? Or I just cannot run the WPF inside VS2010 and have to use the MSBUILD instead.
Thank you
Make sure you have only one v4.0*** folder (you can rename if you don’t wish to delete) in your C:\Windows\Microsoft.NET\Framework folder. That should do the trick.
If you already have only one of these v4.0*** folders you can try editing the Microsoft.Common.targets file within that folder and removing TrackFileAccess=”$(TrackFileAccess)” and TrackerLogDirectory=”$(TrackerLogDirectory)” entries from the GenerateResource node around line 1850.