c# - auto-generated code throw lots of warning in visual studio 2015 -
i upgrade visual studio 2013 2015. when open projects see many warning in auto generated code code ca2235.
here 1 of warnings:
warning ca2235 field extensiondatafield member of type webserviceinputtrafficfinesinquiry serializable of type system.runtime.serialization.extensiondataobject not serializable
simpayrobot c:\users\admin\desktop\projects\simpayrobot_svn\trunk\simpayrobot\simpayrobot\service references\rahvarservice\reference.cs 22
all fields cannot serialized directly should have nonserializedattribute. types have serializableattribute should not have fields of types not have serializableattribute unless fields marked nonserializedattribute.
the project works fine makes programming uncomfortable. don't know do. auto generated code , don't want edit it.
how can rid of these warnings? 1 more thing: warnings because of soap service reference added project.
update: don't want suppress warning! why should it? want solve problem.
here line 22:(it part of auto generated code.)
[system.nonserializedattribute()] private system.runtime.serialization.extensiondataobject extensiondatafield;
i ran same problem when started checking source code fxcops. starting investigation post seems ca2235 warnings in reference.cs (automatically generated wcf-services) classified issue solved in visual studio update 3 (see link https://github.com/dotnet/roslyn/issues/3898 further information)
regards jrb
Comments
Post a Comment