C# ';绝对路径';SQLiteConnection.CreateFile出错
运行时,这会给我以下错误: System.ArgumentException:需要绝对路径信息 如何修复此问题?尝试以下方法:C# ';绝对路径';SQLiteConnection.CreateFile出错,c#,sqlite,C#,Sqlite,运行时,这会给我以下错误: System.ArgumentException:需要绝对路径信息 如何修复此问题?尝试以下方法: SQLiteConnection.CreateFile(Directory.GetCurrentDirectory() + "\\Plugins\\Data.sqlite"); 那么,Directory.GetCurrentDirectory()返回什么呢?C:\Users\Jack\Desktop\Coding\minet server由于某些原因,我不能使用App
SQLiteConnection.CreateFile(Directory.GetCurrentDirectory() + "\\Plugins\\Data.sqlite");
那么,
Directory.GetCurrentDirectory()
返回什么呢?C:\Users\Jack\Desktop\Coding\minet server由于某些原因,我不能使用Application.ExecutablePath。我使用的是.dll而不是.exe
SQLiteConnection.CreateFile(
Path.Combine(
Application.ExecutablePath,
"Plugins",
"Data.sqlite"
)
);