Hi, Readers.
The public preview for Dynamics 365 Business Central 2024 release wave 2 (BC25) is available. Learn more: Link.
I will continue to test and share some new features that I hope will be helpful.
Pull extension source from GitHub when opening Visual Studio Code from web client:
Business value:
A year ago, you got the power to open a Visual Studio Code project from within the web client. This removed the hassle of creating projects so you could launch configurations and download symbols yourself. This is a great tool for exploring functionality and troubleshooting, whether it’s in sandboxes or production, and it empowers support, consultants, and developers. However, what if access to the extension code is blocked by IP resource exposure protection, but the source is in your GitHub repo? Or maybe you want to proceed with authoring your own code, such as hotfixing one of your apps or pulling the latest source version for changes or development? In 2024 release wave 2, this feature will make that possible.Feature details:
https://learn.microsoft.com/en-us/dynamics365/release-plan/2024wave2/smb/dynamics365-business-central/pull-extension-source-github-when-opening-visual-studio-code-web-client?wt.mc_id=DX-MVP-5004336
In this release, we’re building on the recent “Explore in Visual Studio Code” feature by using the source and build metadata in the manifest of an extension to offer pulling source from the related GitHub repository and from a specific build. This allows navigating code for the extensions that you have source access to and allows you to hotfix a given build or sync to get the latest changes for investigation or development.
As mentioned above, in Business Central 2023 wave 2 (BC23) Microsoft has brought us the feature of opening Visual Studio Code from the web client.
Test video (Use current project):
Test video (Create a new project): The automatically generated app name is GeneratedProject1
With this wave (BC25), Microsoft has taken this feature a step further. From the Extension Management list page, you now have a new Open Source in VS Code option in the context menu for an extension.
But if you check your extension now, this action may be grayed out.
The same is true for standard extensions.
This requires adding settings to your application’s app.json first.
source: Defines properties for source control.
repositoryUrl: URL of the repository where the source code of the project can be found.
commit: Commit ID of the source code for the current version of the project.
For example,
"source": {
"repositoryUrl": "https://github.com/yzhums/TestRepository0917.git",
"commit": "455cfc86fbb99b0d9ac7acaf68578334215b5063"
}
PS: Commit ID can be obtained by the following ways
1. On the Github site
455cfc86fbb99b0d9ac7acaf68578334215b5063
2. Using git log command
Once the above settings are set, this new button can be clicked on the Extension Management page.
If you invoke that, Visual Studio Code will open and ask you whether to clone or open the GitHub repo for the extension. It will use the repo metadata that was included in the extension when it was built.
Open Visual Studio Code?
Choose Open.
There are two situations here. If you do not open the current project, you can choose Open Repository or Clone Repository.
Open Repository:
Then you can see the following options. If you already have a current project open, you will skip the previous option and go directly to this step.
Test video:
Along with this update, the Extension Management page also saw some changes. First, you can directly see whether the code is allowed to be downloaded on the list page.
In the Extension Settings page, Microsoft added two new tabs.
Resource Protection Policies defined by the extension and Source control details
Resource Protection Policies was a new feature added in BC19 and is set in the app.json file. More details: Business Central 2021 wave 2 (BC19): Richer access control for extension source in cloud environments (‘showMyCode’ -> ‘resourceExposurePolicy’)
Source control details are the contents of the settings mentioned above.
For Microsoft extensions or AppSource extensions, these two tabs are not displayed.
If Source control details are not set in your extension, this tab will not be displayed.
Great, give it a try!!!😁
END
Hope this will help.
Thanks for reading.
ZHU
コメント