안녕하세요, 저는 현재 첫 번째 Windows 서비스에서 작업을 시작하고 있으며 이상한 오류가 발생했습니다. 어떤 이유로 컴 파일러는 이미지, 비트 맵, 그래픽 등과 같은 일반적인 클래스가 존재하지 않는다고 말합니다. 예를 들어, 정상적인 프로젝트에서 완벽하게 작동하는 다음 코드 줄은 많은 오류를 반환합니다.코드가 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
아이디어가 있습니까? (저는 이것이 간단한 대답이라는 느낌이 들지만, 제 서비스에서 이러한 수업이 절대적으로 필요합니다)
나는 당신에게 서비스를위한 호스트 프로젝트와 논리가있는 또 다른 클래스 라이브러리 프로젝트가있다. 호스트 프로젝트에서 적절한 어셈블리를 참조하지 않았습니까? – Menahem