小弟我在创建MVC项目时,将Controller 分离出来到另一个类库,但是在这个类库中引用Systee.Web.mvc 在生成的时候就会报中错是咋回事呀
我在创建MVC项目时,将Controller 分离出来到另一个类库,但是在这个类库中引用Systee.Web.mvc 在生成的时候就会报中错是怎么回事呀
错误 1 “ResolveAssemblyReference”任务意外失败。
System.AggregateException: 发生一个或多个错误。 ---> System.IO.DirectoryNotFoundException: 未能找到路径“C:\Program Files\Reference Assemblies\Microsoft\Workflow Manager\1.0”的一部分。
在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
在 System.IO.FileSystemEnumerableIterator`1.CommonInit()
在 System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
在 System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
在 Microsoft.Build.Tasks.AssemblyFoldersExCache.<>c__DisplayClass4.<.ctor>b__3(AssemblyFoldersExInfo assemblyFolder)
在 System.Threading.Tasks.Parallel.<>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
在 System.Threading.Tasks.Task.InnerInvoke()
在 System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
在 System.Threading.Tasks.Task.<>c__DisplayClass11.<ExecuteSelfReplicating>b__10(Object param0)
--- 内部异常堆栈跟踪的结尾 ---
在 System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
在 System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
在 System.Threading.Tasks.Task.Wait()
在 System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
在 System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
在 System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, Action`1 body)
在 Microsoft.Build.Tasks.AssemblyFoldersExCache..ctor(AssemblyFoldersEx assemblyFoldersEx, FileExists fileExists)
在 Microsoft.Build.Tasks.AssemblyFoldersExResolver.LazyInitialize()
在 Microsoft.Build.Tasks.AssemblyFoldersExResolver.Resolve(AssemblyNameExtension assemblyName, String sdkName, String rawFileNameCandidate, Boolean isPrimaryProjectReference, Boolean wantSpecificVersion, String[] executableExtensions, String hintPath, String assemblyFolderKey, ArrayList assembliesConsideredAndRejected, String& foundPath, Boolean& userRequestedSpecificFile)
在 Microsoft.Build.Tasks.AssemblyResolution.ResolveReference(IEnumerable`1 jaggedResolvers, AssemblyNameExtension assemblyName, String sdkName, String rawFileNameCandidate, Boolean isPrimaryProjectReference, Boolean wantSpecificVersion, String[] executableExtensions, String hintPath, String assemblyFolderKey, ArrayList assembliesConsideredAndRejected, String& resolvedSearchPath, Boolean& userRequestedSpecificFile)
在 Microsoft.Build.Tasks.ReferenceTable.ResolveReference(AssemblyNameExtension assemblyName, String rawFileNameCandidate, Reference reference)
在 Microsoft.Build.Tasks.ReferenceTable.ResolveAssemblyFilenames()
在 Microsoft.Build.Tasks.ReferenceTable.ComputeClosure()
在 Microsoft.Build.Tasks.ReferenceTable.ComputeClosure(DependentAssembly[] remappedAssembliesValue, ITaskItem[] referenceAssemblyFiles, ITaskItem[] referenceAssemblyNames, ArrayList exceptions)
在 Microsoft.Build.Tasks.ResolveAssemblyReference.Execute(FileExists fileExists, DirectoryExists directoryExists, GetDirectories getDirectories, GetAssemblyName getAssemblyName, GetAssemblyMetadata getAssemblyMetadata, GetRegistrySubKeyNames getRegistrySubKeyNames, GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, GetLastWriteTime getLastWriteTime, GetAssemblyRuntimeVersion getRuntimeVersion, OpenBaseKey openBaseKey, CheckIfAssemblyInGac checkIfAssemblyIsInGac, IsWinMDFile isWinMDFile, ReadMachineTypeFromPEHeader readMachineTypeFromPEHeader)
在 Microsoft.Build.Tasks.ResolveAssemblyReference.Execute()
在 Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
在 Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()
---> (内部异常 #0) System.IO.DirectoryNotFoundException: 未能找到路径“C:\Program Files\Reference Assemblies\Microsoft\Workflow Manager\1.0”的一部分。
在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
在 System.IO.FileSystemEnumerableIterator`1.CommonInit()
在 System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
在 System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
在 Microsoft.Build.Tasks.AssemblyFoldersExCache.<>c__DisplayClass4.<.ctor>b__3(AssemblyFoldersExInfo assemblyFolder)
在 System.Threading.Tasks.Parallel.<>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
在 System.Threading.Tasks.Task.InnerInvoke()
在 System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
在 System.Threading.Tasks.Task.<>c__DisplayClass11.<ExecuteSelfReplicating>b__10(Object param0)<---
Logic
------解决思路----------------------
你放到类库其他地方引用就会找不到 自然报错
错误 1 “ResolveAssemblyReference”任务意外失败。
System.AggregateException: 发生一个或多个错误。 ---> System.IO.DirectoryNotFoundException: 未能找到路径“C:\Program Files\Reference Assemblies\Microsoft\Workflow Manager\1.0”的一部分。
在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
在 System.IO.FileSystemEnumerableIterator`1.CommonInit()
在 System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
在 System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
在 Microsoft.Build.Tasks.AssemblyFoldersExCache.<>c__DisplayClass4.<.ctor>b__3(AssemblyFoldersExInfo assemblyFolder)
在 System.Threading.Tasks.Parallel.<>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
在 System.Threading.Tasks.Task.InnerInvoke()
在 System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
在 System.Threading.Tasks.Task.<>c__DisplayClass11.<ExecuteSelfReplicating>b__10(Object param0)
--- 内部异常堆栈跟踪的结尾 ---
在 System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
在 System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
在 System.Threading.Tasks.Task.Wait()
在 System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
在 System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
在 System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, Action`1 body)
在 Microsoft.Build.Tasks.AssemblyFoldersExCache..ctor(AssemblyFoldersEx assemblyFoldersEx, FileExists fileExists)
在 Microsoft.Build.Tasks.AssemblyFoldersExResolver.LazyInitialize()
在 Microsoft.Build.Tasks.AssemblyFoldersExResolver.Resolve(AssemblyNameExtension assemblyName, String sdkName, String rawFileNameCandidate, Boolean isPrimaryProjectReference, Boolean wantSpecificVersion, String[] executableExtensions, String hintPath, String assemblyFolderKey, ArrayList assembliesConsideredAndRejected, String& foundPath, Boolean& userRequestedSpecificFile)
在 Microsoft.Build.Tasks.AssemblyResolution.ResolveReference(IEnumerable`1 jaggedResolvers, AssemblyNameExtension assemblyName, String sdkName, String rawFileNameCandidate, Boolean isPrimaryProjectReference, Boolean wantSpecificVersion, String[] executableExtensions, String hintPath, String assemblyFolderKey, ArrayList assembliesConsideredAndRejected, String& resolvedSearchPath, Boolean& userRequestedSpecificFile)
在 Microsoft.Build.Tasks.ReferenceTable.ResolveReference(AssemblyNameExtension assemblyName, String rawFileNameCandidate, Reference reference)
在 Microsoft.Build.Tasks.ReferenceTable.ResolveAssemblyFilenames()
在 Microsoft.Build.Tasks.ReferenceTable.ComputeClosure()
在 Microsoft.Build.Tasks.ReferenceTable.ComputeClosure(DependentAssembly[] remappedAssembliesValue, ITaskItem[] referenceAssemblyFiles, ITaskItem[] referenceAssemblyNames, ArrayList exceptions)
在 Microsoft.Build.Tasks.ResolveAssemblyReference.Execute(FileExists fileExists, DirectoryExists directoryExists, GetDirectories getDirectories, GetAssemblyName getAssemblyName, GetAssemblyMetadata getAssemblyMetadata, GetRegistrySubKeyNames getRegistrySubKeyNames, GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, GetLastWriteTime getLastWriteTime, GetAssemblyRuntimeVersion getRuntimeVersion, OpenBaseKey openBaseKey, CheckIfAssemblyInGac checkIfAssemblyIsInGac, IsWinMDFile isWinMDFile, ReadMachineTypeFromPEHeader readMachineTypeFromPEHeader)
在 Microsoft.Build.Tasks.ResolveAssemblyReference.Execute()
在 Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
在 Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()
---> (内部异常 #0) System.IO.DirectoryNotFoundException: 未能找到路径“C:\Program Files\Reference Assemblies\Microsoft\Workflow Manager\1.0”的一部分。
在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
在 System.IO.FileSystemEnumerableIterator`1.CommonInit()
在 System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
在 System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
在 Microsoft.Build.Tasks.AssemblyFoldersExCache.<>c__DisplayClass4.<.ctor>b__3(AssemblyFoldersExInfo assemblyFolder)
在 System.Threading.Tasks.Parallel.<>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
在 System.Threading.Tasks.Task.InnerInvoke()
在 System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
在 System.Threading.Tasks.Task.<>c__DisplayClass11.<ExecuteSelfReplicating>b__10(Object param0)<---
Logic
------解决思路----------------------
你放到类库其他地方引用就会找不到 自然报错