App.config和csc.exe
|
我已经创建了一些C#控制台程序来测试我在MSSQL数据库中的存储过程。我正在将连接字符串存储到app.config中的数据库。项目中的每个类都引用连接字符串,但是它们中都有一个main方法,因此我编写了此脚本来进行编译:
@echo off
SET csc=C:\\WINDOWS\\Microsoft.NET\\Framework\\v4.0.30319\\csc.exe /nologo
SET tgt=/target:exe
SET cfg=/appconfig:app.config
%csc% /out:Update_Workorder_Status %cfg% %tgt% Update_Workorder_Status.cs
%csc% /out:Get_Workorders_By_User %cfg% %tgt% Get_Workorders_By_User.cs
%csc% /out:Get_Workorders_By_Customer %cfg% %tgt% Get_Workorders_By_Customer.cs
我收到此错误:
CS0103 \“名称\'Properties \'在当前上下文中不存在。\“
我还需要传递编译器吗?
没有找到相关结果
已邀请:
2 个回复
咳累录酬
距相镭