錯誤 1 “ResolveAssemblyReference”任務意外失敗。
System.AggregateException: 發生一個或多個錯誤。 ---> System.ArgumentException: 路徑中具有非法字符。
在 System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
在 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_0.<.ctor>b__0(AssemblyFoldersExInfo assemblyFolder)
在 System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
在 System.Threading.Tasks.Task.InnerInvoke()
在 System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
在 System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>)
--- 內部例外堆疊跟蹤的結尾 ---
在 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__26.MoveNext()
---> (內部例外 #0) System.ArgumentException: 路徑中具有非法字符。
在 System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
在 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_0.<.ctor>b__0(AssemblyFoldersExInfo assemblyFolder)
在 System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
在 System.Threading.Tasks.Task.InnerInvoke()
在 System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
在 System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>)<---
iControl.MES
uj5u.com熱心網友回復:
注意:System.AggregateException: 發生一個或多個錯誤。 ---> System.ArgumentException: 路徑中具有非法字符。呼叫EmulateFileIOPermissionChecks這個方法時,傳的路徑有問題吧。
uj5u.com熱心網友回復:
EmulateFileIOPermissionChecks 檢查路徑吧uj5u.com熱心網友回復:
路徑盡量使用英文uj5u.com熱心網友回復:
很明顯的錯誤:System.ArgumentException: 路徑中具有非法字符
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/109134.html
標籤:C#
下一篇:關于.net技術問題
