Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
I have a WASM app that fails to publish after I added TypeScript/Javascript source to one of the razor class libraries that compose the app. To make matters worse the publish step is deleting input files from the RCL source.
Expected Behavior
I'd expect to be able to add content files to the RCL without breaking the WASM publish.
Steps To Reproduce
This is a fully reproducible problem and even though the repository is large, I can walk through the needed steps for reproduction with a minimal understanding of the repository required.
The public, open source repository is https://github.com/Material-Blazor/Material.Blazor.
- Clone the repository
- Checkout the vNext branch
- Publish the Material.Blazor.Website.WebAssembly.MD3 project using the FolderProfile
- This succeeds
- Edit the Material.Blazor.Website.MD3.csproj
- Delete the comment markers on lines 101, 85, 83, and 79. This enable production of two javascript assets
- Repeat the publish step 3 above
This has two unfortunate results.
The first is that there are five files not found. They are static assets in the wwwroot folder of the Material.Blazor.Website.MD3 project. The errors are below.
The second is that those static assets are deleted from the source tree.
Connecting to C:\Solutions\OHI\Material.Blazor\.artifacts\publish\Material.Blazor.Website.WebAssembly.MD3\webassembly_net8.0\...
C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.Publish.targets(150,5): Error MSB3030: Could not copy the file "C:\Solutions\OHI\Material.Blazor\Material.Blazor.Website.MD3\wwwroot\icons\favicon-16x16.png" because it was not found.
C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.Publish.targets(150,5): Error MSB3030: Could not copy the file "C:\Solutions\OHI\Material.Blazor\Material.Blazor.Website.MD3\wwwroot\icons\favicon-32x32.png" because it was not found.
C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.Publish.targets(150,5): Error MSB3030: Could not copy the file "C:\Solutions\OHI\Material.Blazor\Material.Blazor.Website.MD3\wwwroot\icons\icon-512.png" because it was not found.
C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.Publish.targets(150,5): Error MSB3030: Could not copy the file "C:\Solutions\OHI\Material.Blazor\Material.Blazor.Website.MD3\wwwroot\images\book-shelves.jpg" because it was not found.
C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.Publish.targets(150,5): Error MSB3030: Could not copy the file "C:\Solutions\OHI\Material.Blazor\Material.Blazor.Website.MD3\wwwroot\images\mac.jpg" because it was not found.
Exceptions (if any)
No response
.NET Version
8.0.100
Anything else?
Microsoft Visual Studio Community 2022 (64-bit) - Preview
Version 17.9.0 Preview 1.1
.NET SDK:
Version: 8.0.100
Commit: 57efcf1350
Workload version: 8.0.100-manifests.71b9f198
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.100\
.NET workloads installed:
Workload version: 8.0.100-manifests.71b9f198
[wasm-tools]
Installation Source: SDK 8.0.100
Manifest Version: 8.0.0/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.mono.toolchain.current\8.0.0\WorkloadManifest.json
Install Type: Msi
Host:
Version: 8.0.0
Architecture: x64
Commit: 5535e31a71
.NET SDKs installed:
6.0.417 [C:\Program Files\dotnet\sdk]
7.0.401 [C:\Program Files\dotnet\sdk]
8.0.100 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
C:\Users\ms>