Is there an existing issue for this?
Describe the bug
This is an issue that I haven't even seen any solution here than cleaning Nuget package. But still going back to the same issue
What is the actual problem on this?
Can somebody please tell me why this is occuring?
This seems fine when publishing in WASM project but its throwing error when WASM is being published by MVC project
here is the .CSPROJ
MyApp.Mvc.csproj:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<Target Name="BuildAndCopyWasm" BeforeTargets="Build">
<!-- Publish the WASM project -->
<Exec Command="dotnet publish ..\MyApp.Wasm\MyApp.Wasm.csproj -c Release" WorkingDirectory="$(ProjectDir)" />
<!-- Collect published WASM files -->
<ItemGroup>
<WasmFiles Include="..\MyApp.Wasm\bin\Release\net8.0\publish\wwwroot\**\*" />
</ItemGroup>
<!-- Copy WASM output into MVC wwwroot/app -->
<Copy SourceFiles="@(WasmFiles)" DestinationFiles="@(WasmFiles->'wwwroot\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
</Target>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.25" />
</ItemGroup>
</Project>
MyApp.Wasm.csproj:
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.QuickGrid" Version="8.0.25" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.25" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.25" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MyApp.Lib\MyApp.Lib.csproj" />
</ItemGroup>
</Project>
ERROR LOG:
Build started at 1:16 PM...
1>------ Build started: Project: MyApp.Mvc, Configuration: Release Any CPU ------
1>C:\Projects\SolarCalculator\MyApp.Mvc\wwwroot_content\Microsoft.AspNetCore.Components.QuickGrid\QuickGrid.razor.js : error BLAZOR106: The JS module file 'C:\Projects\MyApp\MyApp.Mvc\wwwroot_content\Microsoft.AspNetCore.Components.QuickGrid\QuickGrid.razor.js' was defined but no associated razor component or view was found for it.
1>Done building project "MyApp.Mvc.csproj" -- FAILED.
2>------ Skipped Publish: Project MyApp.Mvc, Configuration: Release Any CPU ------
2>
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 1:16 PM and took 00.731 seconds ==========
========== Publish: 0 succeeded, 0 failed, 1 skipped ==========
========== Publish completed at 1:16 PM and took 00.731 seconds ==========
Expected Behavior
Successfully publishing MVC with WASM files included
Steps To Reproduce
- Create publish profile of MVC project
- Click Publish
- Publish failed
Exceptions (if any)
error BLAZOR106: The JS module file 'C:\Projects\MyApp\MyApp.Mvc\wwwroot_content\Microsoft.AspNetCore.Components.QuickGrid\QuickGrid.razor.js' was defined but no associated razor component or view was found for it.
.NET Version
.NET 8
Anything else?
No response
Is there an existing issue for this?
Describe the bug
This is an issue that I haven't even seen any solution here than cleaning Nuget package. But still going back to the same issue
What is the actual problem on this?
Can somebody please tell me why this is occuring?
This seems fine when publishing in WASM project but its throwing error when WASM is being published by MVC project
here is the .CSPROJ
MyApp.Mvc.csproj:
MyApp.Wasm.csproj:
ERROR LOG:
Build started at 1:16 PM...
1>------ Build started: Project: MyApp.Mvc, Configuration: Release Any CPU ------
1>C:\Projects\SolarCalculator\MyApp.Mvc\wwwroot_content\Microsoft.AspNetCore.Components.QuickGrid\QuickGrid.razor.js : error BLAZOR106: The JS module file 'C:\Projects\MyApp\MyApp.Mvc\wwwroot_content\Microsoft.AspNetCore.Components.QuickGrid\QuickGrid.razor.js' was defined but no associated razor component or view was found for it.
1>Done building project "MyApp.Mvc.csproj" -- FAILED.
2>------ Skipped Publish: Project MyApp.Mvc, Configuration: Release Any CPU ------
2>
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 1:16 PM and took 00.731 seconds ==========
========== Publish: 0 succeeded, 0 failed, 1 skipped ==========
========== Publish completed at 1:16 PM and took 00.731 seconds ==========
Expected Behavior
Successfully publishing MVC with WASM files included
Steps To Reproduce
Exceptions (if any)
error BLAZOR106: The JS module file 'C:\Projects\MyApp\MyApp.Mvc\wwwroot_content\Microsoft.AspNetCore.Components.QuickGrid\QuickGrid.razor.js' was defined but no associated razor component or view was found for it.
.NET Version
.NET 8
Anything else?
No response