diff --git a/src/AasCore.Aas3_0/AasCore.Aas3_0.csproj b/src/AasCore.Aas3_0/AasCore.Aas3_0.csproj index 9907c0c0..2c736815 100644 --- a/src/AasCore.Aas3_0/AasCore.Aas3_0.csproj +++ b/src/AasCore.Aas3_0/AasCore.Aas3_0.csproj @@ -20,6 +20,6 @@ aas;asset administration shell;iiot;industry internet of things;industrie 4.0;i4.0 - + diff --git a/src/AasxAmlImExport/AasxAmlImExport.csproj b/src/AasxAmlImExport/AasxAmlImExport.csproj index f8aaa6bd..7b63e3ca 100644 --- a/src/AasxAmlImExport/AasxAmlImExport.csproj +++ b/src/AasxAmlImExport/AasxAmlImExport.csproj @@ -15,11 +15,11 @@ - - - - + + + + - + diff --git a/src/AasxBammRdfImExport/AasxBammRdfImExport.csproj b/src/AasxBammRdfImExport/AasxBammRdfImExport.csproj index 3be9786e..aca236e5 100644 --- a/src/AasxBammRdfImExport/AasxBammRdfImExport.csproj +++ b/src/AasxBammRdfImExport/AasxBammRdfImExport.csproj @@ -9,11 +9,11 @@ - - - - - + + + + + diff --git a/src/AasxCore.Samm2_2_0/AasxCore.Samm2_2_0.csproj b/src/AasxCore.Samm2_2_0/AasxCore.Samm2_2_0.csproj index 13afad60..91682af9 100644 --- a/src/AasxCore.Samm2_2_0/AasxCore.Samm2_2_0.csproj +++ b/src/AasxCore.Samm2_2_0/AasxCore.Samm2_2_0.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/AasxCsharpLibrary/AasxCsharpLibrary.csproj b/src/AasxCsharpLibrary/AasxCsharpLibrary.csproj index 9ec2ecbb..b1cd41bc 100644 --- a/src/AasxCsharpLibrary/AasxCsharpLibrary.csproj +++ b/src/AasxCsharpLibrary/AasxCsharpLibrary.csproj @@ -32,13 +32,13 @@ - - - - - - - + + + + + + + diff --git a/src/AasxDictionaryImport/AasxDictionaryImport.csproj b/src/AasxDictionaryImport/AasxDictionaryImport.csproj index faf06eba..cece654c 100644 --- a/src/AasxDictionaryImport/AasxDictionaryImport.csproj +++ b/src/AasxDictionaryImport/AasxDictionaryImport.csproj @@ -15,11 +15,11 @@ - + - - + + diff --git a/src/AasxFileServerRestLibrary/AasxFileServerRestLibrary.csproj b/src/AasxFileServerRestLibrary/AasxFileServerRestLibrary.csproj index a0af8005..86e68ed3 100644 --- a/src/AasxFileServerRestLibrary/AasxFileServerRestLibrary.csproj +++ b/src/AasxFileServerRestLibrary/AasxFileServerRestLibrary.csproj @@ -10,11 +10,11 @@ - + - + - + diff --git a/src/AasxFormatCst/AasxFormatCst.csproj b/src/AasxFormatCst/AasxFormatCst.csproj index 7beb2950..54e1a85d 100644 --- a/src/AasxFormatCst/AasxFormatCst.csproj +++ b/src/AasxFormatCst/AasxFormatCst.csproj @@ -14,8 +14,8 @@ - - - + + + diff --git a/src/AasxIntegrationBase/AasxIntegrationBase.csproj b/src/AasxIntegrationBase/AasxIntegrationBase.csproj index 8e88900e..d5225bc9 100644 --- a/src/AasxIntegrationBase/AasxIntegrationBase.csproj +++ b/src/AasxIntegrationBase/AasxIntegrationBase.csproj @@ -14,7 +14,7 @@ - - + + diff --git a/src/AasxIntegrationBaseGdi/AasxIntegrationBaseGdi.csproj b/src/AasxIntegrationBaseGdi/AasxIntegrationBaseGdi.csproj index b4b74505..5cd5dd10 100644 --- a/src/AasxIntegrationBaseGdi/AasxIntegrationBaseGdi.csproj +++ b/src/AasxIntegrationBaseGdi/AasxIntegrationBaseGdi.csproj @@ -10,10 +10,10 @@ - - - - + + + + diff --git a/src/AasxIntegrationBaseWpf/AasxIntegrationBaseWpf.csproj b/src/AasxIntegrationBaseWpf/AasxIntegrationBaseWpf.csproj index 4b8317c8..950b68c0 100644 --- a/src/AasxIntegrationBaseWpf/AasxIntegrationBaseWpf.csproj +++ b/src/AasxIntegrationBaseWpf/AasxIntegrationBaseWpf.csproj @@ -25,10 +25,10 @@ - - + + - + diff --git a/src/AasxIntegrationEmptySample/AasxIntegrationEmptySample.csproj b/src/AasxIntegrationEmptySample/AasxIntegrationEmptySample.csproj index 12b712e8..9984057c 100644 --- a/src/AasxIntegrationEmptySample/AasxIntegrationEmptySample.csproj +++ b/src/AasxIntegrationEmptySample/AasxIntegrationEmptySample.csproj @@ -9,7 +9,7 @@ - - + + diff --git a/src/AasxMqtt/AasxMqtt.csproj b/src/AasxMqtt/AasxMqtt.csproj index 97762ef9..cd69e852 100644 --- a/src/AasxMqtt/AasxMqtt.csproj +++ b/src/AasxMqtt/AasxMqtt.csproj @@ -11,8 +11,8 @@ - + - + diff --git a/src/AasxMqttClient/AasxMqttClient.csproj b/src/AasxMqttClient/AasxMqttClient.csproj index c0bc5ba0..68e5970a 100644 --- a/src/AasxMqttClient/AasxMqttClient.csproj +++ b/src/AasxMqttClient/AasxMqttClient.csproj @@ -14,9 +14,9 @@ - - - - + + + + diff --git a/src/AasxMqttClient/MqttClient.cs b/src/AasxMqttClient/MqttClient.cs index e0d01aab..48296704 100644 --- a/src/AasxMqttClient/MqttClient.cs +++ b/src/AasxMqttClient/MqttClient.cs @@ -22,6 +22,7 @@ This source code may use other Open Source software components (see LICENSE.txt) using Extensions; using MQTTnet; using MQTTnet.Client; +using MQTTnet.Client.Options; using Newtonsoft.Json; using System; using System.Collections.Generic; diff --git a/src/AasxOpcUa2Client/AasxOpcUa2Client.csproj b/src/AasxOpcUa2Client/AasxOpcUa2Client.csproj index 12f9b572..6c4448ac 100644 --- a/src/AasxOpcUa2Client/AasxOpcUa2Client.csproj +++ b/src/AasxOpcUa2Client/AasxOpcUa2Client.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/AasxOpenidClient/AasxOpenidClient.csproj b/src/AasxOpenidClient/AasxOpenidClient.csproj index b402be53..6c3d500e 100644 --- a/src/AasxOpenidClient/AasxOpenidClient.csproj +++ b/src/AasxOpenidClient/AasxOpenidClient.csproj @@ -23,11 +23,11 @@ - - - - - + + + + + diff --git a/src/AasxPackageExplorer/AasxPackageExplorer.csproj b/src/AasxPackageExplorer/AasxPackageExplorer.csproj index 924eebf8..4889c7b4 100644 --- a/src/AasxPackageExplorer/AasxPackageExplorer.csproj +++ b/src/AasxPackageExplorer/AasxPackageExplorer.csproj @@ -149,21 +149,21 @@ - + - - - - + + + + - + - + - + - + diff --git a/src/AasxPackageExplorer/MainWindow.xaml.cs b/src/AasxPackageExplorer/MainWindow.xaml.cs index 53f7e133..bd3ad3d2 100644 --- a/src/AasxPackageExplorer/MainWindow.xaml.cs +++ b/src/AasxPackageExplorer/MainWindow.xaml.cs @@ -22,7 +22,6 @@ This source code may use other Open Source software components (see LICENSE.txt) using J2N; using Microsoft.Win32; using Newtonsoft.Json; -using NPOI.POIFS.Properties; using System; using System.Collections; using System.Collections.Generic; diff --git a/src/AasxPackageExplorer/options-debug.MIHO.json b/src/AasxPackageExplorer/options-debug.MIHO.json index 4ede4352..eb7f17cd 100644 --- a/src/AasxPackageExplorer/options-debug.MIHO.json +++ b/src/AasxPackageExplorer/options-debug.MIHO.json @@ -7,7 +7,7 @@ // "AasxToLoad": "http://localhost:8081/shells/aHR0cHM6Ly9hZG1pbi1zaGVsbC1pby9pZHRhL2Fhcy9Qcm9kdWN0Q2hhbmdlTm90aWZpY2F0aW9ucy8xLzA" // "AasxToLoad": "http://localhost:8081/shells/aHR1cHM6Ly9hZG1pbi1zaGVsbC1pby9pZHRhL2Fhcy9Qcm9kdWN0Q2hhbmdlTm90aWZpY2F0aW9ucy8xLzA" // "AasxToLoad": "C:\\Users\\Micha\\Desktop\\test-smt-on-basyx\\IDTA_02036-1-0_SMT_ProductChangeNotification_Draft_v35_manual_fixes.aasx" - "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\SMT\\IDTA 02036-1-0_Submodel_ProductChangeNotification\\IDTA_02036-1-0_SMT_ProductChangeNotification_Draft_v40_add_podman.aasx" + "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\SMT\\IDTA 02036-1-0_Submodel_ProductChangeNotification\\IDTA_02036-1-0_SMT_ProductChangeNotification_Draft_v41_check_IRDIs.aasx" /* This file shall be loaded as aux package at start of application | Arg: */, "AuxToLoad": null /* List of pathes to a JSON, defining a set of AasxPackage-Files, which serve as repository. | Arg: */, @@ -19,7 +19,10 @@ "C:\\HOMI\\Develop\\Aasx\\repo\\phoenix-api-key.json", "C:\\HOMI\\Develop\\Aasx\\repo\\local-basyx.json", "C:\\HOMI\\Develop\\Aasx\\repo\\reg-of-reg-voyager.json", - "C:\\HOMI\\Develop\\Aasx\\repo\\phoenix-big.json" + "C:\\HOMI\\Develop\\Aasx\\repo\\phoenix-big.json", + "C:\\HOMI\\Develop\\Aasx\\repo\\Festo-basyx.json", + "C:\\HOMI\\Develop\\Aasx\\repo\\Festo-apigee.json", + "C:\\HOMI\\Develop\\Aasx\\repo\\reg-of-reg-plugfest3.json" ] /* When connecting to given URIs, auto-authenticate by matching with known endpoints. */, "AutoAuthenticateUris": true diff --git a/src/AasxPackageLogic/AasxPackageLogic.csproj b/src/AasxPackageLogic/AasxPackageLogic.csproj index e3dae4e2..e64a82eb 100644 --- a/src/AasxPackageLogic/AasxPackageLogic.csproj +++ b/src/AasxPackageLogic/AasxPackageLogic.csproj @@ -33,18 +33,18 @@ - + - - + + - + - - - + + + diff --git a/src/AasxPackageLogic/DispEditHelperBasics.cs b/src/AasxPackageLogic/DispEditHelperBasics.cs index 087a0bda..65cc57f1 100644 --- a/src/AasxPackageLogic/DispEditHelperBasics.cs +++ b/src/AasxPackageLogic/DispEditHelperBasics.cs @@ -2651,7 +2651,8 @@ public void EntityListUpDownDeleteHelper( if (list.Count < 1) setOutputList?.Invoke(null); - await postActionHookAsync?.Invoke(theMenu?.ElementAt(buttonNdx)?.Name, ticket); + if (postActionHookAsync != null) + await postActionHookAsync.Invoke(theMenu?.ElementAt(buttonNdx)?.Name, ticket); this.AddDiaryEntry(entityRf, new DiaryEntryStructChange(StructuralChangeReason.Delete), diff --git a/src/AasxPackageLogic/PackageCentral/KnownEndpointDescription.cs b/src/AasxPackageLogic/PackageCentral/KnownEndpointDescription.cs index 82af48ed..cf6b6ffc 100644 --- a/src/AasxPackageLogic/PackageCentral/KnownEndpointDescription.cs +++ b/src/AasxPackageLogic/PackageCentral/KnownEndpointDescription.cs @@ -109,6 +109,11 @@ public class SecurityAccessUserInfo /// Note: Default is rather short because of secure by design /// public int RenewPeriodMins = 5; + + /// + /// Scope to be send with the token generation access to be embedded into + /// + public string Scope = ""; } public class KnownEndpointDescription diff --git a/src/AasxPackageLogic/PackageCentral/PackageContainerHttpRepoSubset.cs b/src/AasxPackageLogic/PackageCentral/PackageContainerHttpRepoSubset.cs index f12caa3b..88f35f17 100644 --- a/src/AasxPackageLogic/PackageCentral/PackageContainerHttpRepoSubset.cs +++ b/src/AasxPackageLogic/PackageCentral/PackageContainerHttpRepoSubset.cs @@ -375,6 +375,11 @@ public static Uri GetBaseUri(string location) { return new Uri(location.Substring(0, p) + "/"); } + else + { + // no seconds slash -> whole is a base url + return new Uri(location + "/"); + } } // go to error @@ -826,49 +831,101 @@ private static async Task FromRegistryGetAasAndSubmodels( foreach (var ep in aasDescriptor.endpoints) { + // gather informaation + AasIdentifiableSideInfo aasSi = null; + List smSiReg = null; + // strictly check IFC var aasIfc = "" + ep["interface"]; - if (aasIfc != "AAS-1.0") - continue; + if (aasIfc == "AAS-1.0") + { + + // direct access HREF + aasSi = new AasIdentifiableSideInfo() + { + IsStub = false, + StubLevel = AasIdentifiableSideInfoLevel.IdWithEndpoint, + Id = "" + aasDescriptor.id, + IdShort = "" + aasDescriptor.idShort, + QueriedEndpoint = new Uri("" + ep.protocolInformation.href), + DesignatedEndpoint = new Uri("" + ep.protocolInformation.href) + }; + + // but in order to operate as registry, a list of Submodel endpoints + // is required as well + smSiReg = new List(); + if (AdminShellUtil.DynamicHasProperty(aasDescriptor, "submodelDescriptors")) + foreach (var smdesc in aasDescriptor.submodelDescriptors) + { + foreach (var smep in smdesc.endpoints) + { + // strictly check IFC + var smIfc = "" + smep["interface"]; + if (smIfc != "SUBMODEL-1.0") + continue; - // direct access HREF - var aasSi = new AasIdentifiableSideInfo() + // ok + string href = smep.protocolInformation.href; + if (href.HasContent() == true) + smSiReg.Add(new AasIdentifiableSideInfo() + { + IsStub = true, + StubLevel = AasIdentifiableSideInfoLevel.IdWithEndpoint, + Id = smdesc.id, + IdShort = smdesc.idShort, + QueriedEndpoint = new Uri(href), + DesignatedEndpoint = new Uri(href) + }); + } + } + } + else if (aasIfc == "AAS-3.0") { - IsStub = false, - StubLevel = AasIdentifiableSideInfoLevel.IdWithEndpoint, - Id = "" + aasDescriptor.id, - IdShort = "" + aasDescriptor.idShort, - QueriedEndpoint = new Uri("" + ep.protocolInformation.href), - DesignatedEndpoint = new Uri("" + ep.protocolInformation.href) - }; - - // but in order to operate as registry, a list of Submodel endpoints - // is required as well - var smRegged = new List(); - if (AdminShellUtil.DynamicHasProperty(aasDescriptor, "submodelDescriptors")) - foreach (var smdesc in aasDescriptor.submodelDescriptors) + // Remark: Suspicously, this will be an exacht copy 1.0 == 3.0 :-( + // direct access HREF + aasSi = new AasIdentifiableSideInfo() { - foreach (var smep in smdesc.endpoints) + IsStub = false, + StubLevel = AasIdentifiableSideInfoLevel.IdWithEndpoint, + Id = "" + aasDescriptor.id, + IdShort = "" + aasDescriptor.idShort, + QueriedEndpoint = new Uri("" + ep.protocolInformation.href), + DesignatedEndpoint = new Uri("" + ep.protocolInformation.href) + }; + + // but in order to operate as registry, a list of Submodel endpoints + // is required as well + smSiReg = new List(); + if (AdminShellUtil.DynamicHasProperty(aasDescriptor, "submodelDescriptors")) + foreach (var smdesc in aasDescriptor.submodelDescriptors) { - // strictly check IFC - var smIfc = "" + smep["interface"]; - if (smIfc != "SUBMODEL-1.0") - continue; + foreach (var smep in smdesc.endpoints) + { + // strictly check IFC + var smIfc = "" + smep["interface"]; + if (smIfc != "SUBMODEL-3.0") + continue; - // ok - string href = smep.protocolInformation.href; - if (href.HasContent() == true) - smRegged.Add(new AasIdentifiableSideInfo() - { - IsStub = true, - StubLevel = AasIdentifiableSideInfoLevel.IdWithEndpoint, - Id = smdesc.id, - IdShort = smdesc.idShort, - QueriedEndpoint = new Uri(href), - DesignatedEndpoint = new Uri(href) - }); + // ok + string href = smep.protocolInformation.href; + if (href.HasContent() == true) + smSiReg.Add(new AasIdentifiableSideInfo() + { + IsStub = true, + StubLevel = AasIdentifiableSideInfoLevel.IdWithEndpoint, + Id = smdesc.id, + IdShort = smdesc.idShort, + QueriedEndpoint = new Uri(href), + DesignatedEndpoint = new Uri(href) + }); + } } - } + } + else + { + // no chance + continue; + } // ok var aas = await PackageHttpDownloadUtil.DownloadIdentifiableToOK( @@ -892,7 +949,7 @@ private static async Task FromRegistryGetAasAndSubmodels( // make sure the list of Submodel endpoints is the same (in numbers) // as the AAS expects - if (smRegged.Count != uniqSms.Count()) + if (smSiReg.Count != uniqSms.Count()) { Log.Singleton.Info(StoredPrint.Color.Blue, "For downloading AAS at {0}, the number of Submodels " + @@ -906,7 +963,7 @@ private static async Task FromRegistryGetAasAndSubmodels( // makes most sense to "recrate" the AAS.Submodels with the side infos // from the registry aas.Submodels = null; - foreach (var smrr in smRegged) + foreach (var smrr in smSiReg) aas.AddSubmodelReference(new Aas.Reference( ReferenceTypes.ModelReference, (new Aas.IKey[] { new Aas.Key(KeyTypes.Submodel, smrr.Id) }).ToList())); @@ -923,7 +980,7 @@ private static async Task FromRegistryGetAasAndSubmodels( // be prepared to download them var numRes = await PackageHttpDownloadUtil.DownloadListOfIdentifiables( null, - smRegged, + smSiReg, lambdaGetLocation: (si) => si.QueriedEndpoint, runtimeOptions: runtimeOptions, allowFakeResponses: allowFakeResponses, @@ -951,7 +1008,7 @@ private static async Task FromRegistryGetAasAndSubmodels( } else { - foreach (var si in smRegged) + foreach (var si in smSiReg) { // valid Id is required if (si?.Id?.HasContent() != true) @@ -1025,11 +1082,19 @@ private static async Task FromRegOfRegGetAasAndSubmodels( // translate to a list of AAS-Ids .. var uriGetListOfAids = BuildUriForRegistryAasByAssetId(baseUris.GetBaseUriForAasReg(), assetId); - if (compatOldAasxServer) - uriGetListOfAids = BuildUriForRegistryAasByAssetLinkDeprecated(baseUris.GetBaseUriForAasReg(), assetId); var listOfAids = await PackageHttpDownloadUtil.DownloadEntityToDynamicObject( uriGetListOfAids, runtimeOptions, allowFakeResponses); + if (compatOldAasxServer + && (listOfAids == null || !(listOfAids is JArray) || (listOfAids as JArray).Count < 1)) + { + // repeat with deprecated call + uriGetListOfAids = BuildUriForRegistryAasByAssetLinkDeprecated(baseUris.GetBaseUriForAasReg(), assetId); + + listOfAids = await PackageHttpDownloadUtil.DownloadEntityToDynamicObject( + uriGetListOfAids, runtimeOptions, allowFakeResponses); + } + if (listOfAids == null || !(listOfAids is JArray) || (listOfAids as JArray).Count < 1) { runtimeOptions?.Log?.Info("Registry {0} did not translate glopbalAssetId={1} to any AAS Ids. " + diff --git a/src/AasxPackageLogic/PackageCentral/SecurityAccessHandlerLogicBase.cs b/src/AasxPackageLogic/PackageCentral/SecurityAccessHandlerLogicBase.cs index b44fca13..663b502c 100644 --- a/src/AasxPackageLogic/PackageCentral/SecurityAccessHandlerLogicBase.cs +++ b/src/AasxPackageLogic/PackageCentral/SecurityAccessHandlerLogicBase.cs @@ -664,12 +664,16 @@ protected virtual async Task DetermineAuthenticateHeaderForE var secretRequest = new HttpRequestMessage(System.Net.Http.HttpMethod.Post, authConfigUrl); secretRequest.Headers.Add("Accept", "application/json"); - secretRequest.Content = new FormUrlEncodedContent(new[] + var reqContent = new List>(new[] { new KeyValuePair("grant_type", "client_credentials"), new KeyValuePair("client_id", id), new KeyValuePair("client_secret", secret) }); + if (endpoint.Endpoint.AccessInfo.Scope?.HasContent() == true) + reqContent.Add(new KeyValuePair("scope", endpoint.Endpoint.AccessInfo.Scope)); + + secretRequest.Content = new FormUrlEncodedContent(reqContent); var secretResponse = await client.SendAsync(secretRequest); var secretContentStr = await secretResponse.Content.ReadAsStringAsync(); @@ -991,6 +995,9 @@ protected virtual async Task DetermineAuthenticateHeaderForE }; request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/x-www-form-urlencoded"); + // Festo? + request.Content.Headers.Add("scope", "offline_access basyx-api-access"); + // second request to auth-server: get token var response = await client.SendAsync(request); Log.Singleton.Info($"Security access handler: Response of authentification server is: {response.StatusCode}"); diff --git a/src/AasxPluginAdvancedTextEditor/AasxPluginAdvancedTextEditor.csproj b/src/AasxPluginAdvancedTextEditor/AasxPluginAdvancedTextEditor.csproj index 2045bb8d..cf01a91b 100644 --- a/src/AasxPluginAdvancedTextEditor/AasxPluginAdvancedTextEditor.csproj +++ b/src/AasxPluginAdvancedTextEditor/AasxPluginAdvancedTextEditor.csproj @@ -14,9 +14,9 @@ - + - + diff --git a/src/AasxPluginAssetInterfaceDesc/AasxPluginAssetInterfaceDesc.csproj b/src/AasxPluginAssetInterfaceDesc/AasxPluginAssetInterfaceDesc.csproj index 6166ed62..9ddd7adb 100644 --- a/src/AasxPluginAssetInterfaceDesc/AasxPluginAssetInterfaceDesc.csproj +++ b/src/AasxPluginAssetInterfaceDesc/AasxPluginAssetInterfaceDesc.csproj @@ -42,10 +42,10 @@ - + - + - + diff --git a/src/AasxPluginBomStructure/AasxPluginBomStructure.csproj b/src/AasxPluginBomStructure/AasxPluginBomStructure.csproj index 3d62b940..473fbb7d 100644 --- a/src/AasxPluginBomStructure/AasxPluginBomStructure.csproj +++ b/src/AasxPluginBomStructure/AasxPluginBomStructure.csproj @@ -40,8 +40,8 @@ - - - + + + diff --git a/src/AasxPluginContactInformation/AasxPluginContactInformation.csproj b/src/AasxPluginContactInformation/AasxPluginContactInformation.csproj index 96a7e860..2f7b2921 100644 --- a/src/AasxPluginContactInformation/AasxPluginContactInformation.csproj +++ b/src/AasxPluginContactInformation/AasxPluginContactInformation.csproj @@ -30,8 +30,8 @@ - - - + + + diff --git a/src/AasxPluginDigitalNameplate/AasxPluginDigitalNameplate.csproj b/src/AasxPluginDigitalNameplate/AasxPluginDigitalNameplate.csproj index 81c5b881..bc83a260 100644 --- a/src/AasxPluginDigitalNameplate/AasxPluginDigitalNameplate.csproj +++ b/src/AasxPluginDigitalNameplate/AasxPluginDigitalNameplate.csproj @@ -55,9 +55,9 @@ - - - - + + + + diff --git a/src/AasxPluginDigitalNameplate/NameplateAnyUiControl.cs b/src/AasxPluginDigitalNameplate/NameplateAnyUiControl.cs index 46bd5af5..93b8a5bc 100644 --- a/src/AasxPluginDigitalNameplate/NameplateAnyUiControl.cs +++ b/src/AasxPluginDigitalNameplate/NameplateAnyUiControl.cs @@ -30,6 +30,7 @@ This source code may use other Open Source software components (see LICENSE.txt) using QRCoder; using ImageMagick; using System.DirectoryServices.ActiveDirectory; +using ImageMagick.Factories; namespace AasxPluginDigitalNameplate diff --git a/src/AasxPluginDocumentShelf/AasxPluginDocumentShelf.csproj b/src/AasxPluginDocumentShelf/AasxPluginDocumentShelf.csproj index 8d0445f8..dd1c773d 100644 --- a/src/AasxPluginDocumentShelf/AasxPluginDocumentShelf.csproj +++ b/src/AasxPluginDocumentShelf/AasxPluginDocumentShelf.csproj @@ -34,8 +34,8 @@ - - - + + + diff --git a/src/AasxPluginExportTable/AasxPluginExportTable.csproj b/src/AasxPluginExportTable/AasxPluginExportTable.csproj index ec664a93..9cc5ce1e 100644 --- a/src/AasxPluginExportTable/AasxPluginExportTable.csproj +++ b/src/AasxPluginExportTable/AasxPluginExportTable.csproj @@ -35,14 +35,13 @@ - - - - - - + + + + + - + diff --git a/src/AasxPluginExportTable/AasxPluginExportTable.options.json b/src/AasxPluginExportTable/AasxPluginExportTable.options.json index dfd30734..55cc6db3 100644 --- a/src/AasxPluginExportTable/AasxPluginExportTable.options.json +++ b/src/AasxPluginExportTable/AasxPluginExportTable.options.json @@ -1,11 +1,11 @@ { "TemplateIdConceptDescription": "www.example.com/ids/cd/DDDD_DDDD_DDDD_DDDD", // the following options, if Docker (Desktop) is installed: - // "SmtExportHtmlCmd": "docker", - // "SmtExportPdfCmd": "docker", + "SmtExportHtmlCmd": "docker", + "SmtExportPdfCmd": "docker", // the following options, if Podman (open source replacement for Docker) is installed: - "SmtExportHtmlCmd": "podman", - "SmtExportPdfCmd": "podman", + //"SmtExportHtmlCmd": "podman", + //"SmtExportPdfCmd": "podman", "SmtExportHtmlArgs": "run -it -v %WD%:/documents/ asciidoctor/docker-asciidoctor asciidoctor -r asciidoctor-diagram -a stylesheet=asciidoc-style-idta.css %ADOC%", "SmtExportPdfArgs": "run -it -v %WD%:/documents/ asciidoctor/docker-asciidoctor asciidoctor-pdf -r asciidoctor-diagram -r ./extended.rb -a toc=macro -a pdf-theme=my-theme.yml -a env-pdf %ADOC%", // this is required to ignore a non-critical error message from podman, preventing the export to stop. diff --git a/src/AasxPluginExportTable/Table/ImportTableExcelProvider.cs b/src/AasxPluginExportTable/Table/ImportTableExcelProvider.cs index 557a610d..79b01f78 100644 --- a/src/AasxPluginExportTable/Table/ImportTableExcelProvider.cs +++ b/src/AasxPluginExportTable/Table/ImportTableExcelProvider.cs @@ -34,7 +34,7 @@ public string Cell(int row, int col) { if (_worksheet == null) return null; - return _worksheet.Cell(1 + row, 1 + col)?.Value?.ToString(); + return _worksheet.Cell(1 + row, 1 + col)?.Value.ToString(); } // diff --git a/src/AasxPluginGenericForms/AasxPluginGenericForms.csproj b/src/AasxPluginGenericForms/AasxPluginGenericForms.csproj index 8fbbd7f4..838e3caf 100644 --- a/src/AasxPluginGenericForms/AasxPluginGenericForms.csproj +++ b/src/AasxPluginGenericForms/AasxPluginGenericForms.csproj @@ -47,8 +47,8 @@ - - - + + + diff --git a/src/AasxPluginImageMap/AasxPluginImageMap.csproj b/src/AasxPluginImageMap/AasxPluginImageMap.csproj index cdc96f35..1a2c49d2 100644 --- a/src/AasxPluginImageMap/AasxPluginImageMap.csproj +++ b/src/AasxPluginImageMap/AasxPluginImageMap.csproj @@ -16,9 +16,9 @@ - - - + + + diff --git a/src/AasxPluginKnownSubmodels/AasxPluginKnownSubmodels.csproj b/src/AasxPluginKnownSubmodels/AasxPluginKnownSubmodels.csproj index 2a00e68e..32ebe1ff 100644 --- a/src/AasxPluginKnownSubmodels/AasxPluginKnownSubmodels.csproj +++ b/src/AasxPluginKnownSubmodels/AasxPluginKnownSubmodels.csproj @@ -8,9 +8,9 @@ false - - - + + + diff --git a/src/AasxPluginMtpViewer/AasxPluginMtpViewer.csproj b/src/AasxPluginMtpViewer/AasxPluginMtpViewer.csproj index 663c3d83..516187fe 100644 --- a/src/AasxPluginMtpViewer/AasxPluginMtpViewer.csproj +++ b/src/AasxPluginMtpViewer/AasxPluginMtpViewer.csproj @@ -31,9 +31,9 @@ - + - - + + diff --git a/src/AasxPluginPlotting/AasxPluginPlotting.csproj b/src/AasxPluginPlotting/AasxPluginPlotting.csproj index 307e8164..59ca0ecc 100644 --- a/src/AasxPluginPlotting/AasxPluginPlotting.csproj +++ b/src/AasxPluginPlotting/AasxPluginPlotting.csproj @@ -20,11 +20,11 @@ - - - + + + - + diff --git a/src/AasxPluginProductChangeNotifications/AasxPluginProductChangeNotifications.csproj b/src/AasxPluginProductChangeNotifications/AasxPluginProductChangeNotifications.csproj index 2e9bd9ce..fb9c8b9f 100644 --- a/src/AasxPluginProductChangeNotifications/AasxPluginProductChangeNotifications.csproj +++ b/src/AasxPluginProductChangeNotifications/AasxPluginProductChangeNotifications.csproj @@ -26,7 +26,7 @@ - + diff --git a/src/AasxPluginSmdExporter/AasxPluginSmdExporter.csproj b/src/AasxPluginSmdExporter/AasxPluginSmdExporter.csproj index 0747a971..9edb848d 100644 --- a/src/AasxPluginSmdExporter/AasxPluginSmdExporter.csproj +++ b/src/AasxPluginSmdExporter/AasxPluginSmdExporter.csproj @@ -31,16 +31,16 @@ - - + + - - + + - - - - + + + + diff --git a/src/AasxPluginTechnicalData/AasxPluginTechnicalData.csproj b/src/AasxPluginTechnicalData/AasxPluginTechnicalData.csproj index 6d483151..0ecd671d 100644 --- a/src/AasxPluginTechnicalData/AasxPluginTechnicalData.csproj +++ b/src/AasxPluginTechnicalData/AasxPluginTechnicalData.csproj @@ -25,8 +25,8 @@ - - - + + + diff --git a/src/AasxPluginUaNetClient/AasxPluginUaNetClient.csproj b/src/AasxPluginUaNetClient/AasxPluginUaNetClient.csproj index 45b30603..af2b1b14 100644 --- a/src/AasxPluginUaNetClient/AasxPluginUaNetClient.csproj +++ b/src/AasxPluginUaNetClient/AasxPluginUaNetClient.csproj @@ -22,7 +22,7 @@ - - + + diff --git a/src/AasxPluginWebBrowser/AasxPluginWebBrowser.csproj b/src/AasxPluginWebBrowser/AasxPluginWebBrowser.csproj index ed69d5d4..bba2190b 100644 --- a/src/AasxPluginWebBrowser/AasxPluginWebBrowser.csproj +++ b/src/AasxPluginWebBrowser/AasxPluginWebBrowser.csproj @@ -11,7 +11,8 @@ net8.0-windows - win-x64 + + $(NETCoreSdkRuntimeIdentifier) x64 x64 x64 @@ -60,13 +61,13 @@ - - - - - + + + + + - + diff --git a/src/AasxPluginWebBrowser/Plugin.cs b/src/AasxPluginWebBrowser/Plugin.cs index 14ce76ef..9df9d091 100644 --- a/src/AasxPluginWebBrowser/Plugin.cs +++ b/src/AasxPluginWebBrowser/Plugin.cs @@ -9,6 +9,7 @@ This source code may use other Open Source software components (see LICENSE.txt) using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; @@ -137,6 +138,15 @@ public void OnDownloadUpdated(IWebBrowser chromiumWebBrowser, IBrowser browser, this.browserGrid.ColumnDefinitions.Add( new ColumnDefinition() { Width = new GridLength(1.0, GridUnitType.Star) }); + // New: two instances of the AASPE crash because of Cef + var settings = new CefSharp.Wpf.CefSettings + { + CachePath = $"C:\\Temp\\CEFCache_{Process.GetCurrentProcess().Id}" + }; + if (Cef.IsInitialized != true) + Cef.Initialize(settings); + + // ok, start this._browser = new CefSharp.Wpf.ChromiumWebBrowser(); this._browser.DownloadHandler = this; // this._browser.RequestHandler = this; diff --git a/src/AasxPredefinedConcepts/AasxPredefinedConcepts.csproj b/src/AasxPredefinedConcepts/AasxPredefinedConcepts.csproj index b601a746..be5576ce 100644 --- a/src/AasxPredefinedConcepts/AasxPredefinedConcepts.csproj +++ b/src/AasxPredefinedConcepts/AasxPredefinedConcepts.csproj @@ -40,8 +40,8 @@ - - - + + + diff --git a/src/AasxSchemaExport/AasxSchemaExport.csproj b/src/AasxSchemaExport/AasxSchemaExport.csproj index 47d1f5fd..6e544da5 100644 --- a/src/AasxSchemaExport/AasxSchemaExport.csproj +++ b/src/AasxSchemaExport/AasxSchemaExport.csproj @@ -10,9 +10,9 @@ - - - + + + diff --git a/src/AasxSignature/AasxSignature.csproj b/src/AasxSignature/AasxSignature.csproj index 7ed33704..ccb58d1d 100644 --- a/src/AasxSignature/AasxSignature.csproj +++ b/src/AasxSignature/AasxSignature.csproj @@ -10,7 +10,7 @@ false - + diff --git a/src/AasxToolkit/AasxToolkit.csproj b/src/AasxToolkit/AasxToolkit.csproj index 685fb46b..f912acb1 100644 --- a/src/AasxToolkit/AasxToolkit.csproj +++ b/src/AasxToolkit/AasxToolkit.csproj @@ -106,11 +106,11 @@ - + - + - + diff --git a/src/AasxWpfControlLibrary/AasxWpfControlLibrary.csproj b/src/AasxWpfControlLibrary/AasxWpfControlLibrary.csproj index 47df9103..39ccd0c8 100644 --- a/src/AasxWpfControlLibrary/AasxWpfControlLibrary.csproj +++ b/src/AasxWpfControlLibrary/AasxWpfControlLibrary.csproj @@ -45,18 +45,17 @@ - + - - - + + - - - - + + + + diff --git a/src/AasxWpfControlLibrary/Flyouts/SelectFromDataGridFlyout.xaml.cs b/src/AasxWpfControlLibrary/Flyouts/SelectFromDataGridFlyout.xaml.cs index 36d1d5fd..2c85cb7c 100644 --- a/src/AasxWpfControlLibrary/Flyouts/SelectFromDataGridFlyout.xaml.cs +++ b/src/AasxWpfControlLibrary/Flyouts/SelectFromDataGridFlyout.xaml.cs @@ -26,8 +26,6 @@ This source code may use other Open Source software components (see LICENSE.txt) using AasxIntegrationBase; using AdminShellNS; using AnyUi; -using Newtonsoft.Json; -using NPOI.HPSF; namespace AasxPackageExplorer { diff --git a/src/AnyUi/AnyUi.csproj b/src/AnyUi/AnyUi.csproj index c40b8e26..60b1fec2 100644 --- a/src/AnyUi/AnyUi.csproj +++ b/src/AnyUi/AnyUi.csproj @@ -23,7 +23,7 @@ - + diff --git a/src/BlazorExplorer/BlazorExplorer.csproj b/src/BlazorExplorer/BlazorExplorer.csproj index b794b743..77e8ec68 100644 --- a/src/BlazorExplorer/BlazorExplorer.csproj +++ b/src/BlazorExplorer/BlazorExplorer.csproj @@ -84,8 +84,8 @@ - - + + diff --git a/src/MsaglWpfControl/MsaglWpfControl.csproj b/src/MsaglWpfControl/MsaglWpfControl.csproj index 3ec2a90c..4a202c04 100644 --- a/src/MsaglWpfControl/MsaglWpfControl.csproj +++ b/src/MsaglWpfControl/MsaglWpfControl.csproj @@ -18,6 +18,6 @@ - + diff --git a/src/UIComponents.Flags.Blazor/UIComponents.Flags.Blazor.csproj b/src/UIComponents.Flags.Blazor/UIComponents.Flags.Blazor.csproj index 59627cba..f7a3a09f 100644 --- a/src/UIComponents.Flags.Blazor/UIComponents.Flags.Blazor.csproj +++ b/src/UIComponents.Flags.Blazor/UIComponents.Flags.Blazor.csproj @@ -12,8 +12,8 @@ - - + + diff --git a/src/WpfMtpControl/WpfMtpControl.csproj b/src/WpfMtpControl/WpfMtpControl.csproj index 02bd5d1c..f945dc82 100644 --- a/src/WpfMtpControl/WpfMtpControl.csproj +++ b/src/WpfMtpControl/WpfMtpControl.csproj @@ -17,10 +17,10 @@ - - + + - - + + diff --git a/src/WpfMtpVisuViewer/WpfMtpVisuViewer.csproj b/src/WpfMtpVisuViewer/WpfMtpVisuViewer.csproj index b22b5de1..47fc86d0 100644 --- a/src/WpfMtpVisuViewer/WpfMtpVisuViewer.csproj +++ b/src/WpfMtpVisuViewer/WpfMtpVisuViewer.csproj @@ -21,9 +21,9 @@ - + - - + + diff --git a/src/WpfXamlTool/WpfXamlTool.csproj b/src/WpfXamlTool/WpfXamlTool.csproj index 248d6eb3..c6ea6295 100644 --- a/src/WpfXamlTool/WpfXamlTool.csproj +++ b/src/WpfXamlTool/WpfXamlTool.csproj @@ -13,7 +13,7 @@ - +