Error:
Microsoft.BusinessData.Infrastructure.BdcException: The shim execution failed unexpectedly - Assembly was requested for LobSystem with Name
Solution:
Import SPBusinessDataCatalogDotNetAssembly with the path and Lobsystem name (if you use BCSMetaman to geterate model, you can find this name in .bcsmm, otherwise you will have to look into your .bdcm file).
Script:
# You could change the below to c drive like C:\BCSModel.dll for simple path
$assemblyPath = "C:\Windows\assembly\GAC_MSIL\BCSModel.dll\1.0.0.0__146767669ea2f41\BCSModel.dll" $lobSystem = "IPM.BCS.ReferenceData"
Write-Host "Adding assembly to LOBSystem"
$serviceContext = Get-SPServiceContext $url
$lobSystem = Get-SPBusinessDataCatalogMetadataObject -ServiceContext $serviceContext -BdcObjectType lobsystem -Name $lobSystem
Import-SPBusinessDataCatalogDotNetAssembly -LobSystem $lobSystem -Path $assemblyPath -Confirm:$false
Write-Host "Completed"
|
No comments:
Post a Comment