嘿伙计们,我目前正在开始我的第一个Windows服务工作,我遇到了我发现的一个奇怪的错误。由于某种原因,编译器告诉我一堆典型的类(如图像,位图,图形等)不存在。例如,这些简单的代码行在正常项目中完美运行,会返回一堆错误:
Bitmap b = new Bitmap(destWidth, destHeight); //Error 13 The type or namespace name 'Bitmap' could not be found (are you missing a using directive or an assembly reference?)
Graphics g = Graphics.FromImage((Image)b); //Error 17 The type or namespace name 'Image' could not be found (are you missing a using directive or an assembly reference?)
g.InterpolationMode = InterpolationMode.HighQualityBicubic; //Error 18 The name 'InterpolationMode' does not exist in the current context
有什么想法吗? (我觉得这是一个简单的答案,但我在服务中绝对需要这些课程)