Uno.Wasm.Bootstrap
Uno.Wasm.Bootstrap copied to clipboard
Server Template build error with "UpdateExternallyDefinedStaticWebAssets"
Steps
- Create a new uno application with the following settings:
(basically a blank, wasm-only native app with a server part)dotnet new unoapp -o BuggyApp -platforms "wasm" -renderer "native" -server -vscode False -pwa False - Open Visual Studio or your preferred IDE
- Compile the solution
Error:
2>------ Build started: Project: BuggyApp.Server, Configuration: Debug Any CPU ------
2>C:\Program Files\dotnet\sdk\9.0.300\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.References.targets(131,7): error MSB4018: The "UpdateExternallyDefinedStaticWebAssets" task failed unexpectedly.
2>C:\Program Files\dotnet\sdk\9.0.300\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.References.targets(131,7): error MSB4018: System.InvalidOperationException: No file exists for the asset at either location 'D:\src\Experimentations\BuggyApp\BuggyApp\bin\Debug\net9.0-browserwasm\wwwroot\_framework\BuggyApp.pdb' or 'obj\Debug\net9.0-browserwasm\BuggyApp.pdb'.
2>C:\Program Files\dotnet\sdk\9.0.300\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.References.targets(131,7): error MSB4018: at Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.ResolveFile(String identity, String originalItemSpec)
2>C:\Program Files\dotnet\sdk\9.0.300\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.References.targets(131,7): error MSB4018: at Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.ApplyDefaults()
2>C:\Program Files\dotnet\sdk\9.0.300\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.References.targets(131,7): error MSB4018: at Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.FromV1TaskItem(ITaskItem item)
2>C:\Program Files\dotnet\sdk\9.0.300\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.References.targets(131,7): error MSB4018: at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
2>C:\Program Files\dotnet\sdk\9.0.300\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.References.targets(131,7): error MSB4018: at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
2>C:\Program Files\dotnet\sdk\9.0.300\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.References.targets(131,7): error MSB4018: at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
2>C:\Program Files\dotnet\sdk\9.0.300\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.References.targets(131,7): error MSB4018: at Microsoft.AspNetCore.StaticWebAssets.Tasks.UpdateExternallyDefinedStaticWebAssets.Execute()
2>C:\Program Files\dotnet\sdk\9.0.300\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.References.targets(131,7): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
2>C:\Program Files\dotnet\sdk\9.0.300\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.References.targets(131,7): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
2>Done building project "BuggyApp.Server.csproj" -- FAILED.
Versions
Uno.Templates v6.0.67 Dotnet 9.0.300
@carldebilly
I am unable to repro this problem any longer after running on Server with WASM
uno.sdk:- 6.0.83 VS vsix:- 6.0.30.30 VS version:- 17.13.7
Build
Using "GenerateRuntimeConfigurationFiles" task from assembly "C:\Program Files\dotnet\sdk\9.0.204\Sdks\Microsoft.NET.Sdk\targets\..\tools\net472\Microsoft.NET.Build.Tasks.dll".
1> Task "GenerateRuntimeConfigurationFiles"
1> Done executing task "GenerateRuntimeConfigurationFiles".
1> Target "GenerateShimsAssets" skipped, due to false condition; ('$(PackAsTool)' == 'true' and $(PackAsToolShimRuntimeIdentifiers) != '' ) was evaluated as ('' == 'true' and != '' ).
1> Target CopyFilesToOutputDirectory:
1> Task "Copy"
1> Copying file from "C:\Users\DarshPatel\Desktop\blank_SErsver\BuggyApp\BuggyApp\obj\Debug\net9.0-browserwasm\BuggyApp.dll" to "C:\Users\DarshPatel\Desktop\blank_SErsver\BuggyApp\BuggyApp\bin\Debug\net9.0-browserwasm\BuggyApp.dll".
1> Done executing task "Copy".
1> Using "CopyRefAssembly" task from assembly "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.Build.Tasks.CodeAnalysis.dll".
1> Task "CopyRefAssembly"
1> Copying reference assembly from "obj\Debug\net9.0-browserwasm\refint\BuggyApp.dll" to "C:\Users\DarshPatel\Desktop\blank_SErsver\BuggyApp\BuggyApp\obj\Debug\net9.0-browserwasm\ref\BuggyApp.dll".
1> Done executing task "CopyRefAssembly".
1> Task "Message"
1> BuggyApp -> C:\Users\DarshPatel\Desktop\blank_SErsver\BuggyApp\BuggyApp\bin\Debug\net9.0-browserwasm\BuggyApp.dll
1> Done executing task "Message".
1> Task "Copy" skipped, due to false condition; ('@(AddModules)' != '') was evaluated as ('' != '').
1> Task "Copy" skipped, due to false condition; ('$(_SGenDllCreated)'=='true') was evaluated as ('false'=='true').
1> Task "Copy"
1> Copying file from "C:\Users\DarshPatel\Desktop\blank_SErsver\BuggyApp\BuggyApp\obj\Debug\net9.0-browserwasm\BuggyApp.pdb" to "C:\Users\DarshPatel\Desktop\blank_SErsver\BuggyApp\BuggyApp\bin\Debug\net9.0-browserwasm\BuggyApp.pdb".
1> Done executing task "Copy".
1> Task "Copy" skipped, due to false condition; ('$(_DocumentationFileProduced)'=='true' and '$(CopyDocumentationFileToOutputDirectory)'=='true') was evaluated as ('false'=='true' and 'true'=='true').
1> Task "Copy" skipped, due to false condition; ('@(IntermediateSatelliteAssembliesWithTargetPath)' != '') was evaluated as ('' != '').
1> Task "Copy" skipped, due to false condition; ('@(ReferenceComWrappersToCopyLocal)' != '' or '@(ResolvedIsolatedComModules)' != '' or '@(_DeploymentLooseManifestFile)' != '' or '@(NativeReferenceFile)' != '' ) was evaluated as ('' != '' or '' != '' or '' != '' or '' != '' ).
1> Task "Copy" skipped, due to false condition; ('$(SkipCopyWinMDArtifact)' != 'true' and '@(WinMDExpArtifacts)' != '') was evaluated as ('' != 'true' and '' != '').
1> Task "Message" skipped, due to false condition; ('$(SkipCopyWinMDArtifact)' != 'true' and '$(_WindowsMetadataOutputPath)' != '') was evaluated as ('' != 'true' and '' != '').
1> Target "_CopyReferenceOnlyAssembliesForBuild" skipped, due to false condition; ('$(PreserveCompilationReferences)' == 'true') was evaluated as ('false' == 'true').
1> Target "RunCodeAnalysis" skipped, due to false condition; ('$(RunCodeAnalysisOnThisProject)'=='true') was evaluated as (''=='true').
1> Target "_UnoGeneratePriMarker" skipped, due to false condition; ('$(GenerateLibraryLayout)' == 'true' AND '$(SDKIdentifier)' != 'Windows') was evaluated as ('' == 'true' AND '' != 'Windows').
1> Target PrepareForRun:
1> Target "UnmanagedRegistration" skipped, due to false condition; ('$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library') was evaluated as (''=='true' and 'Exe'=='library').
1> Target "_CheckForCompileOutputs" skipped. Previously built successfully.
1> Target "_SGenCheckForOutputs" skipped, due to false condition; ('$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto')) was evaluated as ('Off' == 'On' or (''!='' and 'Off' == 'Auto')).
1> Target _CleanGetCurrentAndPriorFileWrites:
1> Using "ReadLinesFromFile" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
1> Task "ReadLinesFromFile"
1> Done executing task "ReadLinesFromFile".
1> Using "ConvertToAbsolutePath" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
1> Task "ConvertToAbsolutePath"
1> Done executing task "ConvertToAbsolutePath".
1> Using "FindUnderPath" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
1> Task "FindUnderPath"
1> Comparison path is "C:\Users\DarshPatel\Desktop\blank_SErsver\BuggyApp\BuggyApp".
1> Done executing task "FindUnderPath".
1> Task "FindUnderPath"
1> Comparison path is "bin\Debug\net9.0-browserwasm\".
1> Done executing task "FindUnderPath".
1> Task "FindUnderPath"
1> Comparison path is "obj\Debug\net9.0-browserwasm\".
1> Done executing task "FindUnderPath".
1> Task "RemoveDuplicates"
1> Done executing task "RemoveDuplicates".
1> Target IncrementalClean:
1> Task "FindUnderPath"
1> Comparison path is "bin\Debug\net9.0-browserwasm\".
1> Done executing task "FindUnderPath".
1> Task "FindUnderPath"
1> Comparison path is "obj\Debug\net9.0-browserwasm\".
1> Done executing task "FindUnderPath".
1> Task "Delete"
1> Done executing task "Delete".
1> Task "RemoveDuplicates"
1> Done executing task "RemoveDuplicates".
1> Task "WriteLinesToFile"
1> Done executing task "WriteLinesToFile".
1> Target "PostBuildEvent" skipped, due to false condition; ('$(PostBuildEvent)' != '' and ('$(RunPostBuildEvent)' != 'OnOutputUpdated' or '$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)')) was evaluated as ('' != '' and ('' != 'OnOutputUpdated' or '' != '')).
1> Target "GenerateBuildDependencyFile" skipped, due to false condition; ('$(GenerateDependencyFile)' == 'true') was evaluated as ('false' == 'true').
1> Target "ComputeDependencyFileCompilerOptions" skipped, due to false condition; ('$(PreserveCompilationContext)' == 'true') was evaluated as ('false' == 'true').
1> Target "GenerateBuildRuntimeConfigurationFiles" skipped. Previously built successfully.
1> Target CoreBuild:
1> Target AfterBuild:
1> Target "_CheckBrowserWorkloadNeededButNotAvailable" skipped, due to false condition; ('$(RuntimeIdentifier)' == 'browser-wasm' and '$(_BrowserWorkloadDisabled)' != 'true' and '$(WasmNativeWorkloadAvailable)' != 'true') was evaluated as ('browser-wasm' == 'browser-wasm' and '' != 'true' and 'true' != 'true').
1> Target "_ErrorWorkloadDisabledForTFMLessThan6" skipped, due to false condition; ('$(_BrowserWorkloadNotSupportedForTFM)' == 'true') was evaluated as ('' == 'true').
1> Target "_ErrorDualWasmThreadPropsOn7" skipped, due to false condition; ('$(TargetsNet7)' == 'true' and '$(RuntimeIdentifier)' == 'browser-wasm' and
1> '$(BrowserWorkloadDisabled)' != 'true' and '$(WasmEnableThreads)' == 'true' and '$(WasmEnablePerfTrace)' == 'true') was evaluated as ('' == 'true' and 'browser-wasm' == 'browser-wasm' and
1> '' != 'true' and '' == 'true' and '' == 'true').
1> Target "_CheckForInvalidConfigurationAndPlatform" skipped. Previously built successfully.
1> Target "_CheckForInvalidConfigurationAndPlatform" skipped. Previously built successfully.
1> Target "_GenerateWindowUnoIconExtension" skipped. Previously built successfully.
1> Target "_AddResizetizerWindowIconExtensions" skipped. Previously built successfully.
1> Target Build:
1> Target "WasmBuildApp" skipped. Previously built successfully.
1> Target "CallPublishContainerSdkContainerProfile" skipped, due to false condition; ('$(EnableSdkContainerDebugging)' == 'true' AND '$(SdkContainerPublishOnBuild)' == 'true') was evaluated as ('' == 'true' AND '' == 'true').
1> Target "_CalculatePostXamarinTelemetry" skipped. Previously built successfully.
1> Target "_PostXamarinTelemetry" skipped, due to false condition; ('$(_PostXamarinTelemetry)' == 'true') was evaluated as ('' == 'true').
1> Target "_PackAsBuildAfterTarget" skipped, due to false condition; ('$(GeneratePackageOnBuild)' == 'true' AND '$(IsInnerBuild)' != 'true') was evaluated as ('false' == 'true' AND 'true' != 'true').
1> Target _CheckContainersPackage:
1> Task "Warning" skipped, due to false condition; ($(_ContainerPackageIsPresent)
1> and (
1> ($(_SdkCanPublishWeb) and $(_IsWebProject)) or
1> ($(_SdkCanPublishWorker) and $(_IsWorkerProject)) or
1> ($(_SdkCanPublishConsole) and '$(EnableSdkContainerSupport)' == 'true')
1> )) was evaluated as (false
1> and (
1> (True and true) or
1> (True and false) or
1> (True and 'true' == 'true')
1> )).
1> Target "DotNetPublish" skipped, due to false condition; ( '$(DeployOnBuild)' == 'true' ) was evaluated as ( '' == 'true' ).
1>
1> Done building project "BuggyApp.csproj".
1> Done executing task "MSBuild".
1>Target Build:
1>Target "_PackAsBuildAfterTarget" skipped, due to false condition; ('$(GeneratePackageOnBuild)' == 'true' AND '$(IsInnerBuild)' != 'true') was evaluated as ('false' == 'true' AND '' != 'true').
1>Target _CheckContainersPackage:
1> Task "Warning" skipped, due to false condition; ($(_ContainerPackageIsPresent)
1> and (
1> ($(_SdkCanPublishWeb) and $(_IsWebProject)) or
1> ($(_SdkCanPublishWorker) and $(_IsWorkerProject)) or
1> ($(_SdkCanPublishConsole) and '$(EnableSdkContainerSupport)' == 'true')
1> )) was evaluated as (false
1> and (
1> (True and false) or
1> (True and false) or
1> (True and '' == 'true')
1> )).
1>
1>Done building project "BuggyApp.csproj".
1>
1>Build succeeded.
1> 0 Warning(s)
1> 0 Error(s)
1>
1>Time Elapsed 00:00:23.94
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 12:20 PM and took 24.578 seconds ==========
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++ Please consider donating to VSColorOutput +++
+++ https://mike-ward.net/donate/ +++
+++ (this message can be turned off in the settings panel) +++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Great!!
This does happen to us with .NET SDK 9.0.300 and Uno SDK 6.0.110. Please reopen.
The bootstrapper 9.0.20 is now on nuget, there's no uno.sdk version yet that includes it but it's possible to override it using <UnoWasmBootstrapVersion>9.0.20</UnoWasmBootstrapVersion> in the .csproj file.