开发者

Namespace management with Web References

I have a seemingly simple goal, but I'm tripping over namespace issues. I wrote a sharepoint web service client class, called sharepoint.cs, and it has its own namespace. I want to re-use this class in other applications. The problem is it needs to reference a web service reference. Right now, when I add a web reference to the project, it adds it to the top level namespace, and the only way I can use it in my class is to reference this top-level namespace 开发者_StackOverflow中文版in my class. That means every project in which I use this class, I need to change this reference to whatever top-level namespace my project is using. There must be a way to write a portable web service class.


I resolved this simply by putting the sharepoint class in its own project. Then I can set the references at this project level, and any other solution can simply include this project in their solution.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜