定制构建 SGEN 组件并包含在安装程序中
我对 SGEN 的一些东西感到相当困惑。我已经为我的一个项目启用了序列化程序集的生成。最初我遇到了以下错误,我相信我已经通过在远程程序集上执行一些 caspol 操作来解决该错误。
无法加载一种或多种请求类型。检索 LoaderExceptions 属性了解更多信息
但是现在,我没有生成程序集。添加一些调试/详细输出会提供消息“SS.dll 不包含任何可以使用 XmlSerializer 序列化的类型”。我读到这是因为 VS 应用了代理开关。奇怪的是,这似乎对任何其他项目都没有问题。
因此,如果我禁用代理开关(示例),似乎去工作。然而,链接的构建事件似乎适用于所有项目。我对 MSBuild 的了解不够,无法调整到单个项目,有人知道我需要更改什么吗?
此外,如果进行此更改,是否有办法自动将其包含在安装程序(VDProj)中?我无法静态链接到 SS.XmlSerializers.dll,因为每个开发人员都使用自定义路径。
I've been rather confused by some SGEN stuff. I've enable the generation of serialization assemblies for one of my projects. Originally I got the follow error which I believe I've solved by doing some caspol stuff on a remote assembly.
Unable to load one or more of the request types. Retrieve the
LoaderExceptions propery for more information
Now however, I don't get an assembly generated. Adding some debugging/verbose output provides the message "SS.dll does not contain any types that can be serialized using XmlSerializer". I've read that this is because of a proxy switch applied by VS. The odd thing is it doesn't seem to be a problem with any other project.
So if I disable the proxy switch (example here) it seems to work. The linked build events however seem to do all projects. I don't know enough about MSBuild to tweak to just a single project, does anyone know what I need to change?
Additionally, if this change is made, is there a way I can automatically include this in a installer (VDProj)? I can't statically link to the SS.XmlSerializers.dll because the each dev uses a custom path.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
发现了以下帖子,其中讨论了添加
;Off
到 csproj 文件,该文件似乎有效:)Discovered the following post which talks about adding the
<SGenUseProxyTypes>Off</SGenUseProxyTypes>
to the csproj file which seems to work :)