dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.39k stars 10k forks source link

Blank Blazor WASM app fails to publish with PublishTrimmed set to false on .NET 7 RC1 #44038

Closed Lukespacewalker closed 2 years ago

Lukespacewalker commented 2 years ago

Is there an existing issue for this?

Describe the bug

Try publish the Blazor WASM with publish PublishTrimmed false in Windows, the process will fail with this error (But if I publish using Linux, the publish process will success.)

C:\Program Files\dotnet\sdk\7.0.100-rc.1.22431.12\Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\targets\Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets(614,5): Error MSB6006: "dotnet.exe" exited with code 1.

I try to turn on Verbosity to debug. It look like the whitespace in path problem is come back


         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\Microsoft.CSharp.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\Microsoft.VisualBasic.Core.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\Microsoft.VisualBasic.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\Microsoft.Win32.Primitives.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\Microsoft.Win32.Registry.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\mscorlib.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\netstandard.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.AppContext.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Buffers.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Collections.Concurrent.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Collections.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Collections.Immutable.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Collections.NonGeneric.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Collections.Specialized.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.ComponentModel.Annotations.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.ComponentModel.DataAnnotations.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.ComponentModel.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.ComponentModel.EventBasedAsync.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.ComponentModel.Primitives.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.ComponentModel.TypeConverter.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Configuration.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Console.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Core.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Data.Common.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Data.DataSetExtensions.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Data.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Diagnostics.Contracts.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Diagnostics.Debug.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Diagnostics.DiagnosticSource.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Diagnostics.FileVersionInfo.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Diagnostics.Process.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Diagnostics.StackTrace.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Diagnostics.TextWriterTraceListener.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Diagnostics.Tools.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Diagnostics.TraceSource.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Diagnostics.Tracing.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Drawing.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Drawing.Primitives.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Dynamic.Runtime.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Formats.Asn1.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Formats.Tar.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Globalization.Calendars.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Globalization.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Globalization.Extensions.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.IO.Compression.Brotli.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.IO.Compression.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.IO.Compression.FileSystem.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.IO.Compression.ZipFile.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.IO.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.IO.FileSystem.AccessControl.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.IO.FileSystem.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.IO.FileSystem.DriveInfo.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.IO.FileSystem.Primitives.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.IO.FileSystem.Watcher.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.IO.IsolatedStorage.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.IO.MemoryMappedFiles.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.IO.Pipes.AccessControl.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.IO.Pipes.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.IO.UnmanagedMemoryStream.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Linq.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Linq.Expressions.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Linq.Parallel.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Linq.Queryable.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Memory.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Net.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Net.Http.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Net.Http.Json.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Net.HttpListener.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Net.Mail.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Net.NameResolution.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Net.NetworkInformation.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Net.Ping.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Net.Primitives.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Net.Quic.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Net.Requests.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Net.Security.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Net.ServicePoint.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Net.Sockets.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Net.WebClient.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Net.WebHeaderCollection.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Net.WebProxy.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Net.WebSockets.Client.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Net.WebSockets.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Numerics.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Numerics.Vectors.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.ObjectModel.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\native\System.Private.CoreLib.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Private.DataContractSerialization.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Private.Uri.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Private.Xml.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Private.Xml.Linq.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Reflection.DispatchProxy.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Reflection.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Reflection.Emit.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Reflection.Emit.ILGeneration.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Reflection.Emit.Lightweight.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Reflection.Extensions.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Reflection.Metadata.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Reflection.Primitives.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Reflection.TypeExtensions.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Resources.Reader.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Resources.ResourceManager.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Resources.Writer.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Runtime.CompilerServices.Unsafe.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Runtime.CompilerServices.VisualC.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Runtime.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Runtime.Extensions.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Runtime.Handles.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Runtime.InteropServices.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Runtime.InteropServices.JavaScript.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Runtime.InteropServices.RuntimeInformation.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Runtime.Intrinsics.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Runtime.Loader.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Runtime.Numerics.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Runtime.Serialization.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Runtime.Serialization.Formatters.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Runtime.Serialization.Json.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Runtime.Serialization.Primitives.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Runtime.Serialization.Xml.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Security.AccessControl.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Security.Claims.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Security.Cryptography.Algorithms.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Security.Cryptography.Cng.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Security.Cryptography.Csp.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Security.Cryptography.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Security.Cryptography.Encoding.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Security.Cryptography.OpenSsl.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Security.Cryptography.Primitives.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Security.Cryptography.X509Certificates.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Security.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Security.Principal.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Security.Principal.Windows.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Security.SecureString.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.ServiceModel.Web.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.ServiceProcess.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Text.Encoding.CodePages.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Text.Encoding.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Text.Encoding.Extensions.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Text.Encodings.Web.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Text.Json.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Text.RegularExpressions.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Threading.Channels.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Threading.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Threading.Overlapped.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Threading.Tasks.Dataflow.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Threading.Tasks.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Threading.Tasks.Extensions.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Threading.Tasks.Parallel.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Threading.Thread.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Threading.ThreadPool.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Threading.Timer.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Transactions.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Transactions.Local.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.ValueTuple.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Web.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Web.HttpUtility.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Windows.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Xml.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Xml.Linq.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Xml.ReaderWriter.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Xml.Serialization.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Xml.XDocument.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Xml.XmlDocument.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Xml.XmlSerializer.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Xml.XPath.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\System.Xml.XPath.XDocument.dll'.
         Unrecognized command or argument 'Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0\WindowsBase.dll'.

         Description:

         Usage:
           Microsoft.NET.Sdk.BlazorWebAssembly.Tool brotli [options]

         Options:
           -c <Fastest|NoCompression|Optimal|SmallestSize>  System.IO.Compression.CompressionLevel for the Brotli compression algorithm. [default: Optimal]
           -s <s>                                           A list of files to compress.
           -o <o>                                           The filenames to output the compressed file to.
           -?, -h, --help                                   Show help and usage information

  3:16>C:\Program Files\dotnet\sdk\7.0.100-rc.1.22431.12\Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\targets\Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets(614,5): error MSB6006: "C:\Program Files\dotnet" exited with code 1. [C:\Users\Sutti\source\repos\BlazorApp2\Client\BlazorApp2.Client.csproj]

Expected Behavior

The app should publish successfully.

Steps To Reproduce

  1. Create Blank Blazor WASM hosted app with VS 2022 17.4 Preview 2
  2. Add <PublishTrimmed>false</PublishTrimmed> .csproj of Blazor WASM
  3. Try publish the app from client or server

Exceptions (if any)

No response

.NET Version

7.0.100-rc.1.22431.12

Anything else?

OS: Windows 11 Insider Preview 25201

.NET SDK: Version: 7.0.100-rc.1.22431.12 Commit: f1cf61e1c0

Runtime Environment: OS Name: Windows OS Version: 10.0.25201 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\7.0.100-rc.1.22431.12\

Host: Version: 7.0.0-rc.1.22426.10 Architecture: x64 Commit: 06aceb7015

.NET SDKs installed: 6.0.400 [C:\Program Files\dotnet\sdk] 7.0.100-preview.7.22377.5 [C:\Program Files\dotnet\sdk] 7.0.100-rc.1.22431.12 [C:\Program Files\dotnet\sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.0-preview.7.22376.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.0-rc.1.22427.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.0-preview.7.22375.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.0-rc.1.22426.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.0-preview.7.22377.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.0-rc.1.22427.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found: x86 [C:\Program Files (x86)\dotnet]

Environment variables: Not set

global.json file: Not found

Learn more: https://aka.ms/dotnet/info

Download .NET: https://aka.ms/dotnet/download

egvijayanand commented 2 years ago

Facing a similar issue with a blazorwasm project template.

No configuration changes in the project file.

Just ran the following commands on Windows 11 machine after creating a project from the template, supplied OOB.

dotnet new blazorwasm --output MyBlazorApp
cd MyBlazorApp
dotnet run -c Release

The project ran successfully, but when published resulted in the below error.

dotnet publish -c Release

C:\Program Files\dotnet\sdk\7.0.100-rc.1.22431.12\Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\targets\Microsoft.NET.Sdk.BlazorWebAssemb ly.6_0.targets(614,5): error MSB6006: "C:\Program Files\dotnet" exited with code 1. [E:\NET 7\RC1\MyBlazorApp\MyBlazorApp.csproj]

MackinnonBuck commented 2 years ago

Are there spaces in the full path names for your projects, @Lukespacewalker and @egvijayanand? If so, could you try a project location that does not include spaces and let us know if it fixes your issue?

Lukespacewalker commented 2 years ago

@MackinnonBuck There is no space in my solution and project paths (C:\Users\Sutti\source\repos\OccMedCheckUpBlazor\OccMedCheckUpBlazor.sln,C:\Users\Sutti\source\repos\OccMedCheckUpBlazor\OccMedCheckUpBlazor\Client\OccMedCheckUpBlazor.Client.csproj, C:\Users\Sutti\source\repos\OccMedCheckUpBlazor\OccMedCheckUpBlazor\Server\OccMedCheckUpBlazor.Server.csproj)

But there is a space in dotnet component which are installed to Program Files folder such as C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\7.0.0-rc.1.22426.10\runtimes\browser-wasm\lib\net7.0. From the logs I've posted above this seems to be a problem.

If I publish in Linux OS instead (.net sdk docker, to be precise), the app can be published successfully.

MackinnonBuck commented 2 years ago

Thanks for the response, @Lukespacewalker.

I'm not able to reproduce the issue on my end. Does the problem occur when publishing both from Visual Studio and from the command line (i.e. dotnet publish)?

Lukespacewalker commented 2 years ago

@MackinnonBuck It occurs on both Visual Studio and dotnet publish. This issue only occurs when I try to publish (add <PublishTrimmed>false</PublishTrimmed> in Blazor WASM csproj) using Windows. If I publish using Linux (Ubuntu), the publishing process is successful. Also, if I remove <PublishTrimmed>false</PublishTrimmed>, which will enable Trimming, the publish process will also successful.

egvijayanand commented 2 years ago

Are there spaces in the full path names for your projects, @Lukespacewalker and @egvijayanand? If so, could you try a project location that does not include spaces and let us know if it fixes your issue?

Yes indeed, whitespace is present in the path leading to the project artifacts. After removing the whitespace, the project is getting published. Hopefully, a fix will be made available for this issue before the GA release.

MackinnonBuck commented 2 years ago

@egvijayanand It looks like the issue you're experiencing was fixed by https://github.com/dotnet/sdk/pull/27213 and will be available in the RC2 release.

@Lukespacewalker Thanks for the additional info. Unfortunately, the issue is still not reproducing on my end - would you be able to share a minimal repro project that demonstrates the issue, hosted as a public GitHub repository?

egvijayanand commented 2 years ago

It looks like the issue you're experiencing was fixed by dotnet/sdk#27213 and will be available in the RC2 release.

Thanks for letting us know that it is getting fixed.

MackinnonBuck commented 2 years ago

@Lukespacewalker are you still experiencing this issue? If so, would you please be able to provide a repro project for us, hosted as a public GitHub repository?

ghost commented 2 years ago

Hi @Lukespacewalker. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Lukespacewalker commented 2 years ago

@MackinnonBuck Here a minimal repo https://github.com/Lukespacewalker/BlankBlazorWASM. But I think this problem occurs only in Windows because .NET SDK is installed in Program Files folder, containing space in path, that break BrotliCompression tool.

By the way, is your .NET sdk on testing computer also installed in the folder containing space like me?

dotnet --list-sdks
7.0.100-rc.1.22431.12 [C:\Program Files\dotnet\sdk]
MackinnonBuck commented 2 years ago

@Lukespacewalker Thanks for providing a repro project! I've tried to reproduce the issue you're facing on both my local machine and a fresh VM, neither of which have had any problems publishing the repro project. In both cases, the .NET SDK is installed in Program Files.

But given that https://github.com/dotnet/sdk/pull/27213 fixed a similar issue with the BrotliCompress tool, I would say it's likely that your issue will be resolved as well starting in RC2.

Could you try installing the latest 7.0 SDK daily build from https://github.com/dotnet/installer (from the Release/7.0.1xx column in the README) and see if using that SDK version fixes the problem? That would confirm whether any further action needs to be taken here.

ghost commented 2 years ago

Hi @Lukespacewalker. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Lukespacewalker commented 2 years ago

@MackinnonBuck Sorry for late reply. I've install 7.0 SDK daily build and it fixs the problem

MackinnonBuck commented 2 years ago

@Lukespacewalker Fantastic, thanks for trying that out! Closing this out now.