File tree Expand file tree Collapse file tree 2 files changed +17
-12
lines changed
Expand file tree Collapse file tree 2 files changed +17
-12
lines changed Original file line number Diff line number Diff line change 3333 {
3434 try
3535 {
36- // var json = await Http.GetStringAsync("wwwroot/Packages/udap_urls.json");
37-
38- bool isMaui = AppDomain .CurrentDomain .GetAssemblies ()
39- .Any (a => a .GetName ().Name .StartsWith (" Microsoft.Maui" ));
36+ bool isMauiExe = false ;
37+ try
38+ {
39+ if (OperatingSystem .IsWindows ())
40+ {
41+ var exeName = System .Diagnostics .Process .GetCurrentProcess ().ProcessName ;
42+ isMauiExe = exeName .Equals (" UdapEdAppMaui" , StringComparison .OrdinalIgnoreCase );
43+ }
44+ }
45+ catch (PlatformNotSupportedException )
46+ {
47+ // Not supported in this environment (e.g., Blazor WASM)
48+ isMauiExe = false ;
49+ }
4050
4151 string json ;
4252 if (OperatingSystem .IsAndroid () || OperatingSystem .IsIOS () || OperatingSystem .IsMacCatalyst () ||
43- (isMaui && OperatingSystem .IsWindows ()))
53+ (isMauiExe && OperatingSystem .IsWindows ()))
4454 {
4555 // For .NET MAUI
4656 await using var stream = await FileSystem .OpenAppPackageFileAsync (" udap_urls.json" );
Original file line number Diff line number Diff line change 8787 <!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
8888 <MauiAsset Include =" Resources\Raw\**" LogicalName =" %(RecursiveDir)%(Filename)%(Extension)" />
8989 <None Remove =" CertificateStore\FhirLabs_mTLS_Client.pfx" Condition =" '$(TargetFramework)' == 'net8.0-ios' Or '$(TargetFramework)' == 'net8.0-maccatalyst'" />
90- <MauiAsset Include =" CertificateStore\FhirLabs_mTLS_Client.pfx" >
91- <CopyToOutputDirectory >Always</CopyToOutputDirectory >
92- </MauiAsset >
9390 <None Remove =" CertificateStore\fhirlabs.net.client.pfx" Condition =" '$(TargetFramework)' == 'net8.0-ios' Or '$(TargetFramework)' == 'net8.0-maccatalyst'" />
94- <MauiAsset Include =" CertificateStore\fhirlabs.net.client.pfx" >
95- <CopyToOutputDirectory >Always</CopyToOutputDirectory >
96- </MauiAsset >
91+
9792 </ItemGroup >
9893
9994 <ItemGroup >
113108 </ItemGroup >
114109
115110 <ItemGroup >
116- <MauiAsset LogicalName =" fhirlabs.net.client.pfx" Include =" CertificateStore/fhirlabs.net.client.pfx" />
111+ <MauiAsset LogicalName =" fhirlabs.net.client.pfx" Include =" CertificateStore/fhirlabs.net.client.pfx" Condition = " Exists('CertificateStore/fhirlabs.net.client.pfx') " />
117112 <MauiAsset LogicalName =" udap.emrdirect.client.certificate.p12" Include =" CertificateStore/udap.emrdirect.client.certificate.p12" Condition =" Exists('CertificateStore/udap.emrdirect.client.certificate.p12')" />
118113 <MauiAsset LogicalName =" FhirLabs_mTLS_Client.pfx" Include =" CertificateStore/FhirLabs_mTLS_Client.pfx" Condition =" Exists('CertificateStore/FhirLabs_mTLS_Client.pfx')" />
119114
You can’t perform that action at this time.
0 commit comments