Wasm for updated nuget reference not updated on build
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
Steps:
1. Create "Blazor Web Assembly Standalone App" via new project template.
2. Add a reference to the csproj file ``
3. Add code in Home.razor to output the version number
```
Mud Blazor Version: @GetVersion()
@code {
public static string? GetVersion()
{
var assembly = typeof(MudBlazor.MudButton).Assembly;
var infoVer = assembly.GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), false).OfType().FirstOrDefault();
return infoVer?.InformationalVersion ?? "Unknown";
}
}
```
4. Build and run. The version number 8.0.0 will output as expected.
5. Change the csproj reference to ``
6. Build and run. The version number being output is still 8.0.0 the wasm for the latest version was not loaded.
7. Browser cache clears dont help.
8. In order to get the latest version a ReBuild is required.
I followed steps 1-6 and put the files (including bin / obj) into a zip here:
https://github.com/innominateAtWork/BlazorOldWasmBuildIssue
I can see that doing a build does not update the file "\BlazorApp1\bin\Debug\net8.0\wwwroot\_framework\MudBlazor.wasm" while doing a rebuild does.
### Expected Behavior
A build should cause the latest code from assemblies referenced via nuget to be included
### Steps To Reproduce
_No response_
### Exceptions (if any)
_No response_
### .NET Version
_No response_
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.