开发者

Custom building SGEN assemblies and including in installer

开发者 https://www.devze.com 2023-04-02 15:23 出处:网络
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 s

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 (exam开发者_JS百科ple 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.


Discovered the following post which talks about adding the <SGenUseProxyTypes>Off</SGenUseProxyTypes> to the csproj file which seems to work :)

0

精彩评论

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