在升级到.NET5之前,我有一个运行良好的Blazor WASM管道发行版。最近我收到以下错误:...\Microsoft.NET.Sdk.BlazorWebAssembly.ServiceWorkerAssetsManifest.targets(68,5): Error MSB4018: The "GenerateServiceWorkerAssetsManifest" task failed unexpectedly.
后跟System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\a\1\s\ClientSide\BlazorProject\obj\Release\net5.0\service-worker-assets.js'.
我的yaml
档案:
trigger:
- main
pool:
vmImage: 'windows-latest'
variables:
solution: '**/BlazorProject.csproj'
solutionSln: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: '$(solutionSln)'
feedsToUse: 'select'
noCache: true
- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)/WebClient.zip"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
clean: true
createLogFile: true
- task: AzureRmWebAppDeployment@4
inputs:
ConnectionType: 'AzureRM'
azureSubscription: 'censored'
appType: 'webApp'
WebAppName: 'nextGenClientTest'
packageForLinux: '$(build.artifactStagingDirectory)/WebClient.zip'
因此出于某种原因,我认为它找不到文件service-worker-assets.js
,但是我不知道为什么。对于那些想知道为什么结构可能奇怪的人:我有一个用于还原nuget-packges的解决方案文件,并且在此管道中,我只想构建一个特定的项目BlazorProject.csproj
(在升级到.NET5之前运行良好)。
谁知道,突然之间发生了service-worker-assets.js
什么?
Azure DevOps:Blazor部署在管道生成中失败
有一个问题:
这个问题已移至下一个Sprint计划里程碑,以供将来评估/考虑。当计划下一个里程碑的工作时,aspnetcore团队将评估请求。
此外,为了确保您已正确升级项目,请参阅以下文档以了解更多详细信息:
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句