error CS0200 on property's private setter

G

geraldbauer

<Intro>
I discovered an item worthy of discussion. This is in regards to
exception I discovered. Spefically error CS0200 that is referencing
System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns,
CompilerParameters parameters, Evidence evidence).

<How discovered>
I am working on an application that uses Microsoft's UIP 2.0. This
process has worked wonderfully for us. I made some changes to the code
base and was doing my unit testing when the application was not able to
launch. I was not able to create the first controller (and thus
windows form). After digging around I discovered that some private
setters on a property I created a week earlier was throwing up a CS0200
error that is referencing the
System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns,
CompilerParameters parameters, Evidence evidence).

<Observations>
These two private property setters are wrappers for two different
attributes on an xml document's xml nodes/elements. Here is another
interesting twist. I have other private setters in the same class that
is for a different attribute on the same xml node that is not being
complained about.

Having these two private setters worked wonderfully until today (for
about a week). I removed the private on the two setters as a test.
Everything works like a champ. I put them back in individually to see
if only one of the setters is the issue, not a chance.

The bottom-line is that I have a clean compile with private property
setters but I am not able to run the application with two specific
private setters.

<Work around>
I removed the two offending private setters for setting the attribute
values. Everything now works.

<Questions>
I am able to compile without any issues. Am I wrong to think that this
issue is a JIT serialization problem?

Has anyone else discovered this issue?

<Background Info>
The error I am talking about, error CS0200, generates the following
statement:
error CS0200: Property or indexer '[assembly name].[property name]'
cannot be assigned to -- it is read only\r\n at [assembly name].[other
stuff showing the method and assembly related path info]

<Conclusion>
I am looking for interesting answers to my discovery.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top