gpt4 book ai didi

.net - "GetFileHash"任务意外失败

转载 作者:行者123 更新时间:2023-12-04 08:37:24 25 4
gpt4 key购买 nike

我正在开发 Blazor Web Assembly 项目,但在构建时遇到错误,如下所述:

Severity    Code    Description Project File    Line    Suppression State
Error MSB4018 The "GetFileHash" task failed unexpectedly.
System.AggregateException: One or more errors occurred. ---> System.IO.IOException: The process cannot access the file 'D:\New folder\projects\Al-Tanzil.org\Source\TechFlurry.AlTanzil\TechFlurry.AlTanzil.App\wwwroot\debug.log' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Microsoft.Build.Tasks.GetFileHash.ComputeHash(Func`1 algorithmFactory, String filePath)
at Microsoft.Build.Tasks.GetFileHash.<>c__DisplayClass28_0.<Execute>b__0(Int32 index)
at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body)
at Microsoft.Build.Tasks.GetFileHash.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
---> (Inner Exception #0) System.IO.IOException: The process cannot access the file 'D:\New folder\projects\Al-Tanzil.org\Source\TechFlurry.AlTanzil\TechFlurry.AlTanzil.App\wwwroot\debug.log' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Microsoft.Build.Tasks.GetFileHash.ComputeHash(Func`1 algorithmFactory, String filePath)
at Microsoft.Build.Tasks.GetFileHash.<>c__DisplayClass28_0.<Execute>b__0(Int32 index)
at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>)<---
TechFlurry.AlTanzil.App C:\Users\nobel\.nuget\packages\microsoft.aspnetcore.components.webassembly.build\3.2.1\targets\ServiceWorkerAssetsManifest.targets 134


The service worker assets manifest file:

<GetFileHash Files="@(_StaticWebAssetsWithoutHash)" Algorithm="SHA256" HashEncoding="base64">
<Output TaskParameter="Items" ItemName="_StaticWebAssetHash" />
</GetFileHash>
任何人都可以帮助我解决这个问题吗?我迫切需要一个解决方案,在互联网上搜索但没有找到。

最佳答案

您打开了 debug.log 文件,可能在记事本中,您需要关闭它以便可以写入日志。

关于.net - "GetFileHash"任务意外失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64735829/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com