【发布时间】:2014-02-26 22:00:01
【问题描述】:
我试图在 gwan csp 文件夹中包含一个 c# servlet CompanyListService.cs 并收到编译错误“找不到类型或命名空间名称“PropertyManagement”。您是否缺少 using 指令或程序集引用?'
PropertyManagement.sql.dll 位于同一文件夹中。还尝试将其安装在 GAC 中,但没有运气。
如果使用'mcs CompanyListService.cs -r:PropertyManagement.Sql.dll',它会解析程序集
现有的 Hello.cs 和 Loan.cs 工作正常。任何帮助将不胜感激?
谢谢 拉姆
// C servlet example for the G-WAN Web Application Server
// http://gwan.ch/
// hello.cs: G-WAN supports .NET C# servlets
using System;
using System.Collections.Generic;
//using PropertyManagement.Sql;
//using System.Runtime.Serialization.Json;
using System.Text;
public class CompanyListService
{
public static int Main(string[] args)
{
PropertyManagement.Sql.CompanyRepository Repository = new PropertyManagement.Sql.CompanyRepository();
List<PropertyManagement.Sql.Company> CompanyList = Repository.GetCompanyList();
//string json = JsonSerializer<List<Company>>(CompanyList);
Gwan.xbufCat(Gwan.getReply(args[0]), "test");
return 200; // HTTP status (200:'OK')
}
}
【问题讨论】: