59

NuGet packages are extremely useful for adding and updating dependencies to .NET projects, especially in complicated cases. It would makes sense to be able to add NuGet packages to X++ projects in the same way as to C# projects, for instance.

I can recognize several scenarios:
- Traditional NuGet packages with compiled code and other resources, such as resource files and images. For example, let's say I want to add WindowsAzure.ServiceBus to my X++ project. It should support all existing packages with appropriate requirements (version of .NET Framework). It must resolve all packages, copy files to the modelstore and add appropriate references to AOT.
- Packages including source code / metadata ("content"). For example, the package will add an X++ class with a default implementation that can be changed by developers as needed. NuGet supports this scenario. It could also support source code transformations - I don't have any good scenario for it in the moment, but making sure that this NuGet feature doesn't get broken will give us some extra options.
- Deployable packages created from X++ code. For example, an open-source extensible control (in its own model+package) could be distributed as a NuGet package, therefore everybody would be able to add it to their solutions and receive updates from the same source. Installation scripts of the NuGet package would install the deployable package in the usual way. What needs to be addressed are requirements such as a specific minimum version of AX platform.

The implementation should utilize the existing integration to Visual Studio whenever possible, such as respecting custom package sources (Options > NuGet Package Manager > Package Sources).

Category: Development
STATUS DETAILS
Under Review
Ideas Administrator

Changes to dev tools that are coming in the Autumn of 2019 will get us closer to the ideas suggested here.