Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support /t in the project settings for sgen #27326

Closed
huanwu opened this issue Sep 6, 2018 · 3 comments
Closed

Support /t in the project settings for sgen #27326

huanwu opened this issue Sep 6, 2018 · 3 comments
Assignees
Milestone

Comments

@huanwu
Copy link
Contributor

huanwu commented Sep 6, 2018

Support type parameter in project settings so the customer can serialize just single class.
Refer dotnet/corefx#24491

@AroglDarthu
Copy link

We've tried to use the generator in a project that has classes based on XSD schema's. The resulting dll is over 3 MB. Without using the /t parameter, the xml serializer generator just hangs itself. Never ends. No failures, no exception. Just hangs.
What we did for now is to include the generator dll directly in our project and we created a target that passes --type on to it. Works like a charm, but it is a very cumbersome method...

@jiayi11
Copy link
Member

jiayi11 commented Feb 16, 2019

@huanwu Do we want to support customers to specify the types in their project file PropertyGroup like the following?

<PropertyGroup>
    <SerializationType>project1.type1; project1.type2</SerializationType>
</PropertyGroup>

@jiayi11
Copy link
Member

jiayi11 commented Apr 5, 2019

Pr dotnet/corefx#36085 merged. Closing this issue.
Users will be able to modify the sgen command parameters using msbuild properties in their csproj file like the following:

<PropertyGroup>
    <SGenReferences>C:\myfolder\abc.dll;C:\myfolder\def.dll</SGenReferences>
    <SGenTypes>SgenTestProgram.MyType1;SgenTestProgram.MyType2</SGenTypes>
    <SGenProxyTypes>false</SGenProxyTypes>
    <SGenVerbose>true</SGenVerbose>
    <SGenKeyFile>mykey.snk</SGenKeyFile>
    <SGenDelaySign>true</SGenDelaySign>
</PropertyGroup>

@jiayi11 jiayi11 closed this as completed Apr 5, 2019
@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 3.0 milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants