开发者

Can't use Lambda expressions in Windows services?

开发者 https://www.devze.com 2022-12-10 15:58 出处:网络
I\'ve developed a server software for .net 3.5 which I tried to convert to a windows service application. So I created a new Windows service project and added all my classes. But I can\'t compile it b

I've developed a server software for .net 3.5 which I tried to convert to a windows service application. So I created a new Windows service project and added all my classes. But I can't compile it because it doesn't understand the lambda expressions i've used. I've checked so that all references are imported. But it seems like it isn't possible开发者_JAVA技巧 to change the target framework in a windows service project and I suspect that it's the problem.


If you try to use the LINQ extension methods but you don't import System.Linq it won't compile. Try:

using System.Linq;


Check your references. Sounds like you are missing a required type. If you post the entire compiler error and maybe some sample code we could probably provide more insight.

0

精彩评论

暂无评论...
验证码 换一张
取 消