Replies: 1 comment 11 replies
-
IntroductionIn my opinion, we should make sure that NuGet works not only with DevOps but also covers other cases. I would prefer situation where NuGet server is the only source of apps inside a company. It means that people should also be able to go there, find and download packages. I understand that we are talking about DevOps here, but preparing for other scenarios will make this solution better and allow more people to use it. We want to use DevOps to create NuGet packages and then allow developers/consultants to access to that server to search and download apps. We are also going to use our own version of "Extension Management" page to install and update apps directly from NuGet servers with automatic dependency resolution inside WebClient. It will make creation of demo/dev/test environments easier and help us with customers servers maintenance (if there is no DevOps "installation" task). I was also showing an idea of NuGet version of "Download Symbols" command on my Directions session which could help developers to quickly switch between latest and lowest version of dependencies to check if their solution compiles. That idea could also be used in DevOps to quickly run that check before we create a docker (fail fast approach). Let's make it compatible with the specificationI would prefer if we make sure that our packages are 100% compatible with NuGet format and all NuGet tools/servers work without any problems. Unfortunately, it is not the case with the idea of adding NuSpec specification can be found here: Also, I don't see any benefit from keeping that information in .nuspec. Fortunately, it is ignored by AzureDevOps and GitHub NuGet repositories, so you can upload these incompatible packages there, but we should not assume that it will work with other hosting providers. NuGet servers have very nice set of APIs that allows to search and see packages properties (i.e., we can build list of dependencies to download without downloading any package), but because Proposed solutionUse NavxManifest.xml or app.json instead of
|
Beta Was this translation helpful? Give feedback.
-
BcNuGet
We want to create a standardized way of exchanging Business Central apps across different DevOps solutions. How can partners expose their apps or runtime packages as NuGet packages, which easily can be consumed by other partners.
Presentation from last weeks meeting: How do we solve the issue of having dependencies to AppSource apps.pdf
The description should also allow Microsoft to host a NuGet Server, in which we could host all AppSource Apps if we are allowed to do so by partners.
This discussion is an attempt to define the BcNuGet package format and also describe how the implementation of this should work in DevOps solutions.
Assumptions
Every BcNuGet will contain one app and a list of dependencies to other BcNuGet packages (apps) from that app.
A BcNuGet package can contain the app or runtime packages
If a BcNuGet package contains runtime packages, it must contain all necessary runtime packages (for all compatible versions) - see more under runtime packages
Test Apps can also be published as seperate BcNuGet packages if partners want you to run their test apps in your DevOps pipelines
File Format
In general, fields that are optional in app.json are also optional in the BcNuGet spec (like icon). Description however is a requirement in nuspec and if the app.json file doesn't contain a description, we will use the name instead.
The BusinessCentral tag is the only "custom" nuspec field, which then contains all Business Central specific properties.
Attributes on the Business Central tag are the simple app.json properties (mandatory properties are mandatory)
resourceExposurePolicy tag contains a copy of the resourceExposurePolicy tag from app.json as xml
idRanges tag contains a copy of the idRanges from app.json as xml
Where
$id, $version, $brief, $description, $publisher and $EULA are the corresponding values from app.json
$rpid is the runtime package identifier for that specific runtime package
$icon is the path and name of the icon within the package (optional)
$readme is the path and name of the readme.md file within the package(optional)
$projectUrl is a URL to the project, which hosts this project
$repository, $branch, $sha is the git repository, branch and sha from where the package was created
$releaseNotes markdown content of release notes for this version (max. 35000 characters)
$from, $to are object range from..to fields from app.json
Platform
Dependency handling
Default behavior of NuGet dependency resolution can be found here: https://learn.microsoft.com/en-us/nuget/concepts/dependency-resolution
Business Central doesn't really have a dependency resolution mechanism, but works after the rather simplified assumption that if you set a dependency to version 2.3.0.0 - then you are compatible with 2.3.0.0 and all subsequent versions (also 3.0.0.0 and 4.0.0.0 etc)
So, what is the right approach?
Let's have a look at this scenario?
What version of App B and App C do you get if you install App A, 1.0.0.0?
My suggestion would be to install App B version 1.0.1.0 - which is the latest build of version 1.0, which you have a dependency on.
Even if you are running BC version 20, as App B version 1.0.1.0 also should be compatible with 20.x
What version of App B and App C do you get if you install App A, 2.0.0.0?
My suggestion would be to install App B and App C version 2.0.0.0. When trying to install on 19.0, it would fail before starting the installation. If you already have App C 1.0.0.0 installed in the environment, it is upgraded to 2.0.0.0
What version of App B and App C do you get if you install App A, 2.1.0.0?
My suggestion would be to install App B version 2.1.0.0 and App C version 2.0.0.0. When trying to install on 19.0, it would fail before starting the installation. If you already have App C 1.0.0.0 installed in the environment, it is upgraded to 2.0.0.0
Beta Was this translation helpful? Give feedback.
All reactions