Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: localDevEnv.ps1 Script Fails to Create Local Development Environment for Multi-Project Repositories #1371

Open
ivandjordjevic opened this issue Dec 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ivandjordjevic
Copy link

ivandjordjevic commented Dec 20, 2024

AL-Go version

6.1

Describe the issue

When running the localDevEnv.ps1 script from VS Code using the PowerShell extension (as Administrator), the script fails during execution while attempting to compile apps in a multi-project repository. The same issue occurs when running the script from PowerShell ISE, also as Administrator.

The error happens during Compilation of the app file.

Compiling D:\projects\sparkrock\development\repo\github\testing\test-al-go\sr365-base\app
Copying DLLs from C:\Program Files\Microsoft Dynamics NAV\252\Service to assemblyProbingPath
Compile-AppInBcContainer Telemetry Correlation Id: 5c00234e-7633-4012-af3c-be6a2788821b
Run-AlPipeline Telemetry Correlation Id: b828cd72-3b7f-49c9-adf6-fc75e30689d5
Error: Error executing script in Container
Stacktrace: at Invoke-ScriptInBcContainer, C:\ProgramData\BcContainerHelper\6.0.30\BcContainerHelper\ContainerHandling\Invoke-ScriptInNavContainer.ps1: line 293
at Compile-AppInBcContainer, C:\ProgramData\BcContainerHelper\6.0.30\BcContainerHelper\AppHandling\Compile-AppInNavContainer.ps1: line 159
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.30\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1139
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.30\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 2184
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.30\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1692
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.30\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1687
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.30\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1259
at Run-AlPipeline, C:\ProgramData\BcContainerHelper\6.0.30\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1244
at CreateDevEnv, C:\Users\Computer\AppData\Local\Temp\cf1ec83b-a9a2-4c7a-a86b-089ec96d388a\AL-Go-Helper.ps1: line 1941
at <ScriptBlock>, D:\projects\sparkrock\development\repo\github\testing\test-al-go\sr365-base\.AL-Go\localDevEnv.ps1: line 139
at <ScriptBlock>, <No file>: line 1

I have created our public repository for troubleshooting.

Full logs are attached: localDevEnvLog.txt

Suggestion: It may be more efficient for localDevEnv.ps1 to publish .app files straight from the latest CI/CD workflow instead, using the development scope. This would eliminate the need to recompile all apps locally in a multi-project repository.

Additionally, providing an option to create environments (Current, NextMinor, or NextMajor) using the respective artifacts from CI/CD workflows (Test Current, Test NextMinor, Test NextMajor) would be even better. New changes, published manually from VS Code would then also be validated against the latest builds.

Expected behavior

Local development environment is created with all the apps from the repo (including tests) published.

Steps to reproduce

  1. Clone the repository: https://github.com/sparkrock-eng/test-al-go-public
  2. Open the workspace in VS Code, run as Administrator.
  3. Use the PowerShell extension in VS Code to run .ps1 files.
  4. Run localDevEnv.ps1 and use default options for all container prompts. Use localDevEnv.ps1 from any project.
  5. Observe the error during the build stage.

Additional context (logs, screenshots, etc.)

No response

@ivandjordjevic ivandjordjevic added the bug Something isn't working label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant