microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.55k stars 899 forks source link

C# load csx script not working with relative paths #10530

Open miguelelvir opened 4 years ago

miguelelvir commented 4 years ago

Steps to Reproduce:

  1. Enable Notebook: Show All Kernels on Settings under Features->Notebook.
  2. Create a simple Test.csx file under a Scripts folder in the root of your repo.
  3. Create a Jupyter notebook and switch to C# kernel.
  4. Add a code cell with the following statement: #load ".\Scripts\Test.csx"
  5. Verify error displays: error CS1504: Source file '.\Scripts\Test.csx' could not be opened -- Could not find file.
  6. Can also confirm working directory is not the repo root by using this code script in the notebook: Console.WriteLine(System.IO.Directory.GetCurrentDirectory());
miguelelvir commented 4 years ago

Confirmed this works when using Jupyter notebook outside ADS

chlafreniere commented 4 years ago

We've seen this bug manifested in a couple of ways. We'll take a look at this.