Hi,
I try to compile the Business Central 19.3.34541.35002
The compiler ends with following errors, because dotnet libaries are not found:
d:\Projekt\UpgradeBC190\BaseAppCustomized\SMTPMail.Codeunit.al(15,28): error AL0185: DotNet 'CancellationToken' is missing
d:\Projekt\UpgradeBC190\BaseAppCustomized\SOAPWebServiceRequestMgt.Codeunit.al(364,16): error AL0185: DotNet 'Claim' is missing
d:\Projekt\UpgradeBC190\BaseAppCustomized\SOAPWebServiceRequestMgt.Codeunit.al(386,16): error AL0185: DotNet 'Claim' is missing
d:\Projekt\UpgradeBC190\BaseAppCustomized\StreamManagement.Codeunit.al(37,19): error AL0185: DotNet 'GenericIReadOnlyList1' is missing
d:\Projekt\UpgradeBC190\BaseAppCustomized\ImageAnalysisManagement.Codeunit.al(210,15): error AL0185: DotNet 'Task1' is missing
d:\Projekt\UpgradeBC190\BaseAppCustomized\Todo.Table.al(2767,62): error AL0185: DotNet 'TimeZoneInfo' is missing
d:\Projekt\UpgradeBC190\BaseAppCustomized\Todo.Table.al(2769,38): error AL0185: DotNet 'TimeZoneInfo' is missing
d:\Projekt\UpgradeBC190\BaseAppCustomized\Todo.Table.al(2780,23): error AL0185: DotNet 'TimeZoneInfo' is missing
d:\Projekt\UpgradeBC190\BaseAppCustomized\Todo.Table.al(2803,85): error AL0185: DotNet 'TimeZoneInfo' is missing
d:\Projekt\UpgradeBC190\BaseAppCustomized\TypeHelper.Codeunit.al(332,23): error AL0185: DotNet 'TimeZoneInfo' is missing
d:\Projekt\UpgradeBC190\BaseAppCustomized\TypeHelper.Codeunit.al(354,23): error AL0185: DotNet 'TimeZoneInfo' is missing
d:\Projekt\UpgradeBC190\BaseAppCustomized\TypeHelper.Codeunit.al(756,23): error AL0185: DotNet 'TimeZoneInfo' is missing
I addes to my dotnet.al file following entry, but something seems to be incorrect
assembly("System")
{
Version = '4.0.0.0';
Culture = 'neutral';
PublicKeyToken = "b77a5c561934e089";
type("System.TimeZoneInfo")
{
}
It is not clear to me how to declare all these DotNet, so that these errors disappear.
Best regards,
Markus
0
Answers
dotnet
{
assembly("System")
{
Version = '4.0.0.0';
Culture = 'neutral';
PublicKeyToken = 'b77a5c561934e089';
type("System.TimeZoneInfo")
{
}
type("System.Threading.CancellationToken")
{ }
}
}
.NET Type "System.TimeZoneInfo"
The type 'System.TimeZoneInfo' could not be found in assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'ALAL0452
.NET Type "System.Threading.CancellationToken"
The type 'System.Threading.CancellationToken' could not be found in assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'ALAL0452
./.netpackages
C:/Program Files/Assemblies
C:\Program Files\Microsoft Dynamics 365 Business Central\190\Service\Add-ins
C:\Windows\assembly
have you already found a solution for this problem?
I currently want to prepare a technical upgrade from BC19 to BC20 as described here: https://docs.microsoft.com/de-de/dynamics365/business-central/dev-itpro/upgrade/upgrade-technical-upgrade-v20
This also requires a small adjustment in the Base App from Microsoft.
I then received this information from a Microsoft support employee:
Basically, aside the BC assemblies, what is needed to be referenced in the assembly path are:
1. .NET Framework (19.x was built with 4.7x.
2. OpenXML 2.5 library (this can be downloaded as nuget package)
3. PowerShell management library (this is used only by one object)
For the last two items I got a zip package from Microsoft.
In settings.json should be the following entries:
"al.assemblyProbingPaths": [
"C:\LIBS\",
"C:\Program Files\Microsoft Dynamics 365 Business Central\190",
"C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\\190\RoleTailored Client",
"C:\Windows\\Microsoft.NET\Framework64",
"C:\Program Files (x86)\Reference Assemblies\\Microsoft\WindowsPowerShell\3.0"
], ...
However, I am currently unable to compile the Base App.
It would be interesting for me to know if you can compile the Base App and what settings you made for it.
at the moment I haven't solved the problem. As you told, that 19.x ist built with 4.7.x, I
checked out my installed versions:
Currently installed "classic" .NET Versions in the system:
2.0.50727.4927 Service Pack 2
3.0.30729.4926 Service Pack 2
3.5.30729.4926 Service Pack 1
4.0.0.0
4.8.04084
I got this information with a tool. But when I open "Apps and Features", it shows me,
that .NET Framework 4.7.1 SDK is installed.
I have solved my problem in the meantime.
I referenced a directory from a Docker image in the settings (settings.json) in the section "al.assemblyProbingPaths".
I created the Docker image with BcContainerHelper.
Here is the relevant section from settings.json:
"al.assemblyProbingPaths": [
"C:/LIBS/",
"./.netpackages",
"C:/ProgramData/BcContainerHelper/Extensions/bc193onprem/.netpackages/",
"C:/Program Files/Microsoft Dynamics 365 Business Central/190/Service",
"C:/Windows/Microsoft.NET/Framework64",
"C:/Program Files (x86)/Reference Assemblies/Microsoft/WindowsPowerShell/3.0"
]
I installed now an image with BCContainerhelpers, but I could not find the .netpackages directory in the C:/ProgramData/BcContainerHelper/Extensions...
BC is running in Container.
Could the .netpackages be installed elsewhere?
did you look for .netPackages-Directory here:
C:/ProgramData/BcContainerHelper/Extensions/<Containername>/.netPackages?
C:\ProgramData\BcContainerHelper\Extensions\mysandbox
There is only a directory called:
C:\ProgramData\BcContainerHelper\Extensions\mysandbox\my
could you show us this script?
$artifactUrl = Get-BcArtifactUrl -type sandbox -country us -select Latest
New-BCContainer -accept_eula -containerName mysandbox -artifactUrl $artifactUrl
$artifactUrl = Get-BcArtifactUrl -type sandbox -country us -select Latest
New-BCContainer -accept_eula -containerName mysandbox -artifactUrl $artifactUrl -includeAL -doNotExportObjectsToText