File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- using MudBlazor ;
21using MudBlazor . Examples . Data ;
32
43namespace TryMudBlazor . Server ;
@@ -43,10 +42,18 @@ public static void Main(string[] args)
4342
4443 app . MapControllers ( ) ;
4544
46- var v = typeof ( MudText ) . Assembly . GetName ( ) . Version ;
47- var cacheBusting = $ "v{ v . Major } .{ v . Minor } .{ v . Build } ";
48- app . MapFallbackToFile ( "index.html" ) . CacheOutput ( policy => policy . SetVaryByQuery ( "cachebust" , cacheBusting ) ) ;
45+ var version = GetVersion ( ) ;
46+ var cacheBusting = $ "v{ version . Major } .{ version . Minor } .{ version . Build } ";
47+ app . MapFallbackToFile ( "index.html" )
48+ . CacheOutput ( policy => policy . SetVaryByQuery ( "cachebust" , cacheBusting ) ) ;
4949
5050 app . Run ( ) ;
5151 }
52+
53+ private static Version GetVersion ( )
54+ {
55+ var version = typeof ( MudBlazor . _Imports ) . Assembly . GetName ( ) . Version ;
56+
57+ return version ?? new Version ( 0 , 0 , 0 ) ;
58+ }
5259}
You can’t perform that action at this time.
0 commit comments