windows服务中遇到一个问题

wofan 2009-04-27 10:02:01
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.ServiceProcess;
using System.Text;
using System.IO;
using System.Timers;
using System.Data.SqlClient;



namespace WindowsService1
{
public partial class U8toDRP : ServiceBase
{
private string strconn;
private string strtime;
private WebReference.Service MyService = new WebReference.Service();
public U8toDRP()
{
InitializeComponent();
}

......

用FORM是可以用的,改为windows服务就不能定义了
"错误 1 找不到类型或命名空间名称“WebReference”(是否缺少 using 指令或程序集引用?) F:\ws\WindowsService1\WindowsService1\Service1.cs 20 17 WindowsService1
"
...全文
92 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
marvelstack 2009-04-28
  • 打赏
  • 举报
回复
试一下,在解决方案中选择Web引用下对应的Web引用,右键菜单选择更新。

或者删除重新编译添加以下,是否能够导出wsdl.

111,097

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧