[SOLVED] Compiler Error "DotNet is missing" in Business Central 19.3

NAVFuchs
Member Posts: 77
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
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
-
-
I tried this already, but it seems to be wrong.
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
0 -
Have you provided the path to the assemblies in the VS Code's user settings?
United Kingdom0 -
I have defined following path:
./.netpackages
C:/Program Files/Assemblies
C:\Program Files\Microsoft Dynamics 365 Business Central\190\Service\Add-ins
C:\Windows\assembly
0 -
try in each al object add dotnet {} referenceUnited Kingdom0
-
But this cannot be the solution. This is the base application of bc190.
0 -
ah ok , I thought it was your customised app. if it is a base app then this is weird.United Kingdom0
-
Hello,
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.
1 -
Hello,
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.
0 -
Hello,
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"
]
0 -
Hi,
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?0 -
Hi,
did you look for .netPackages-Directory here:
C:/ProgramData/BcContainerHelper/Extensions/<Containername>/.netPackages?0 -
yes, I looked in:
C:\ProgramData\BcContainerHelper\Extensions\mysandbox
There is only a directory called:
C:\ProgramData\BcContainerHelper\Extensions\mysandbox\my0 -
did you create a powershell script for creating your container?
could you show us this script?0 -
I have used this one:
$artifactUrl = Get-BcArtifactUrl -type sandbox -country us -select Latest
New-BCContainer -accept_eula -containerName mysandbox -artifactUrl $artifactUrl0 -
could you try to create a new container with this script:
$artifactUrl = Get-BcArtifactUrl -type sandbox -country us -select Latest
New-BCContainer -accept_eula -containerName mysandbox -artifactUrl $artifactUrl -includeAL -doNotExportObjectsToText0 -
change containername "mysandbox" to "mynewsandbox"0
-
Thanks a lot for this great help! it works, the package could be compiled successully.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions