I want to create a file relative to Program.cs
. This code in case of VSCode works correct:
string myFile1 = @".\temp1.txt";
File.Create(myFile1);
string myFile2 = "./temp2.txt";
File.Create(myFile2);
but Visual Studio IDE 2022 creates file in:
`MyProject\bin\Debug\net6.0`
Is there any universal solution?