【发布时间】:2011-01-07 01:15:51
【问题描述】:
如果我想重用的类在另一个程序集中,我没有问题。
但是,如果我想向包含我希望重用服务引用的类的程序集添加服务引用,它们不会被重用。正如here 指出的那样,我怀疑它与它的工作方式有关:
The service reference code generator is unable to recognize the re-used types unless the referenced assembly that contains the re-used types is built and on the disk.
显然,由于我要添加引用的程序集还包含类,因此它不能按原样在磁盘上为代码生成器编译。这是一种catch-22。但是有没有一种简单的方法来实现这一点,而无需手动创建服务引用或为我的模型使用附属程序集?
【问题讨论】:
标签: .net code-generation service-reference