Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以像任何其他 winforms 或 webform 项目一样在 Visual C# Database Sql Server 项目中使用 app.config 文件。
在此先感谢犹大
不是真的,不。
您正在有效地创建一个类库项目。尽管您可以将app.config文件添加到此类项目(普通项目,而不是 SQL CLR 项目),但它们实际上在运行时并不可用(无需跳过很多圈) - 只有与 EXE 项目关联的配置文件被使用。
app.config
此外,在这种情况下,您的代码实际上将在 SQL Server 进程中运行。