File tree Expand file tree Collapse file tree 4 files changed +11
-4
lines changed
tools/Reporting/Reporting Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 3636
3737# Copy the MauiVersion to a file so we have it on the machine
3838maui_version = GetVersionFromDll (rf".\{ const .APPDIR } \obj\Release\{ precommands .framework } \{ precommands .runtime_identifier } \linked\Microsoft.Maui.dll" )
39- version_dict = { "maui_version " : maui_version }
39+ version_dict = { "mauiVersion " : maui_version }
4040versionswritejson (version_dict , rf"{ precommands .output } \versions.json" )
4141print (f"Versions: { version_dict } " )
Original file line number Diff line number Diff line change 3030RemoveAABFiles (precommands .output )
3131
3232maui_version = GetVersionFromDll (f".\{ const .APPDIR } \src\Mobile\obj\Release\{ precommands .framework } \{ precommands .runtime_identifier } \linked\Microsoft.Maui.dll" )
33- version_dict = { "maui_version " : maui_version }
33+ version_dict = { "mauiVersion " : maui_version }
3434versionswritejson (version_dict , rf"{ precommands .output } \versions.json" )
3535print (f"Versions: { version_dict } " )
Original file line number Diff line number Diff line change 7373
7474# Copy the MauiVersion to a file so we have it on the machine
7575maui_version = GetVersionFromDll (rf".\{ const .APPDIR } \obj\Release\{ precommands .framework } \{ precommands .runtime_identifier } \linked\Microsoft.Maui.dll" )
76- version_dict = { "maui_version " : maui_version }
76+ version_dict = { "mauiVersion " : maui_version }
7777versionswritejson (version_dict , rf"{ precommands .output } \versions.json" )
7878print (f"Versions: { version_dict } " )
Original file line number Diff line number Diff line change @@ -93,7 +93,14 @@ private void Init()
9393 foreach ( DictionaryEntry entry in environment . GetEnvironmentVariables ( ) ) {
9494 if ( entry . Key . ToString ( ) . EndsWith ( "version" , ignoreCase : true , culture : CultureInfo . InvariantCulture ) )
9595 {
96- build . AdditionalData [ entry . Key . ToString ( ) ] = entry . Value . ToString ( ) ;
96+ // Special case the original two special cases, MAUI_VERSION is only needed because runtime based runs use MAUI_VERSION
97+ if ( entry . Key . ToString ( ) . Equals ( "DOTNET_VERSION" , StringComparison . InvariantCultureIgnoreCase ) ) {
98+ build . AdditionalData [ "productVersion" ] = entry . Value . ToString ( ) ;
99+ } else if ( entry . Key . ToString ( ) . Equals ( "MAUI_VERSION" , StringComparison . InvariantCultureIgnoreCase ) ) {
100+ build . AdditionalData [ "mauiVersion" ] = entry . Value . ToString ( ) ;
101+ } else {
102+ build . AdditionalData [ entry . Key . ToString ( ) ] = entry . Value . ToString ( ) ;
103+ }
97104 }
98105 }
99106 }
You can’t perform that action at this time.
0 commit comments