WPF - How to run a WPF solution in VS2010 SP1

I am following a tutorial from the book "Pro C # 2010 and the .NET 4 Platform." After I download the sample code from the MyXamlPad project in chapter 27 and try to run it, I received 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 can't run WPF inside VS2010 and use MSBUILD instead.

thank

+2
source share
2 answers

Make sure that you have only one v4.0 *** folder (you can rename it if you do not want to delete it) in the C: \ Windows \ Microsoft.NET \ Framework folder. That should do the trick.

v4.0 ***, Microsoft.Common.targets TrackFileAccess = "$ (TrackFileAccess)" TrackerLogDirectory = "$ (TrackerLogDirectory)" GenerateResource node 1850.

+4

, .

. WPF VS 2010 .NET 4.0. .NET.

? - , WPF.

+2

All Articles