The current logic for getting the relative path for the embedded JSSDK (JS\CanvasAppSdk.js and JS\PublishedAppTesting.js) returns the current working directory path and therefore does not account for the application running from any directory (i.e., executable path added to the PATH variable and invoked from anywhere on the computer). Due to this, when executed from outside the source code default build output, the application looks for the embedded JSSDK within the directory from where the command was invoked (e.g., C:\Users\{username}\Desktop\JS\CanvasAppSdk.js) which is clearly incorrect.
This logic has now been changed wherein we will now compute the path to the executing assembly so that irrespective of where the application is invoked from, the relative path to the embedded JSSDK will always remain relative to the assembly location (where it is expected that the embedded JSSDK files will live alongside the assembly binary).
Checklist
[x] The code change is covered by unit tests. I have added tests that prove my fix is effective or that my feature works
[x] I have performed end-to-end test locally.
[x] New and existing unit tests pass locally with my changes
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
Description
The current logic for getting the relative path for the embedded JSSDK (
JS\CanvasAppSdk.js
andJS\PublishedAppTesting.js
) returns the current working directory path and therefore does not account for the application running from any directory (i.e., executable path added to the PATH variable and invoked from anywhere on the computer). Due to this, when executed from outside the source code default build output, the application looks for the embedded JSSDK within the directory from where the command was invoked (e.g.,C:\Users\{username}\Desktop\JS\CanvasAppSdk.js
) which is clearly incorrect.This logic has now been changed wherein we will now compute the path to the executing assembly so that irrespective of where the application is invoked from, the relative path to the embedded JSSDK will always remain relative to the assembly location (where it is expected that the embedded JSSDK files will live alongside the assembly binary).
Checklist