RF0104: Exported property needs a getter
A write-only property cannot supply a value for display and persistence.
For a C# project using Reckfell.NET.Sdk 1.0.0. Fix the first build error first: later messages may be a consequence.
Cause
A write-only property cannot supply a value for display and persistence.
Fix
Add a getter and value storage, or remove Export when this is only a write command.
Failing example
Save the file in a test C# project and run dotnet build. This version intentionally fails to build.
Example.cs
using Reckfell;
namespace DiagnosticExamples.RF0104;
public partial class Example : Entity { [Export] public int Value { set { } } }Expected messages: RF0104.
Working version
Replace the failing version with these files; do not keep both declarations in the project.
Example.cs
using Reckfell;
namespace DiagnosticExamples.RF0104;
public partial class Example : Entity { [Export] public int Value { get; set; } = 7; }Result
Get("Value") returns 7: the property can be read.
Related material
Reckfell Engine documentationBack to top ↑