You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error serializing type chocolatey.infrastructure.app.domain.Registry:
System.InvalidOperationException: Unable to generate a temporary class (result=1
).
error CS0200: Property or indexer 'chocolatey.infrastructure.app.domain.Registry
.RegistryKeys' cannot be assigned to -- it is read only
error CS0200: Property or indexer 'chocolatey.infrastructure.app.domain.Registry
.RegistryKeys' cannot be assigned to -- it is read only
at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlS
erializerCompilerParameters xmlParameters, Evidence evidence)
at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMap
pings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCo
mpilerParameters parameters, Assembly assembly, Hashtable assemblies)
at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xml
Mapping, Type type, String defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultName
space)
at chocolatey.infrastructure.services.XmlService.serialize[XmlType](XmlType x
mlType, String xmlFilePath)
Unable to generate a temporary class (result=1).
error CS0200: Property or indexer 'chocolatey.infrastructure.app.domain.Registry
.RegistryKeys' cannot be assigned to -- it is read only
error CS0200: Property or indexer 'chocolatey.infrastructure.app.domain.Registry
.RegistryKeys' cannot be assigned to -- it is read only
It does appear that it may have something to do with permissions as well from the OP.
The text was updated successfully, but these errors were encountered:
When using private or internal sets, some systems will run into the
CS0200 issue. The error manifests itself in the following manner:
```
Error serializing type chocolatey.infrastructure.app.domain.Registry:
System.InvalidOperationException: Unable to generate a temporary class
(result=1
).
error CS0200: Property or indexer
'chocolatey.infrastructure.app.domain.Registry
.RegistryKeys' cannot be assigned to -- it is read only
error CS0200: Property or indexer
'chocolatey.infrastructure.app.domain.Registry
.RegistryKeys' cannot be assigned to -- it is read only
```
Leaving a note where it is required not to convert to private sets,
even though that is preferred and making the set public is how this
error is avoided.
* stable:
(version) 0.9.9-rc6
(chocolateyGH-7) Upgrade improvements
(chocolateyGH-99) Warn when admin is not elevated
(log) update what confirm (`-y`) does
(chocolateyGH-82) Set Modify for Installing User
(chocolateyGH-91) Terminating errors - choco upgrade fail
(chocolateyGH-7) Check debug env var for 'true'
(maint) fix logging message
(chocolateyGH-97) Noop shows number of upgrades available
(chocolateyGH-91) Remove global ErrorActionPreference Stop
(command) accept features as alias
(chocolateyGH-7) warn when install is not done in admin mode
(doc) add changelog for 0.9.8.33
(posh) dynamically export helpers
(chocolateyGH-87) Backup improvements
(chocolateyGH-94) Remove rollback on success
(chocolateyGH-87) shorten rollback suffix
(chocolateyGH-93) Avoid CS0200 Serialization w/private set
(chocolateyGH-92) PowerShell - handle spaces in module path
(shimgen) Fix company name on shims
This seems to affect .NET 4.0, where an in place upgrade of .NET 4.5 works around it.
Reference: http://stackoverflow.com/q/23809092/18475
It does appear that it may have something to do with permissions as well from the OP.
The text was updated successfully, but these errors were encountered: