-
Notifications
You must be signed in to change notification settings - Fork 5k
Open
Labels
ClientThis issue is related to a non-management packageThis issue is related to a non-management packageDocsSystem.ClientModelBase Core libraryBase Core library
Milestone
Description
The documentation linked to https://aka.ms/no-modelreaderwritertypebuilder-found is not quite correct.
azure-sdk-for-net/sdk/core/System.ClientModel/src/docs/ModelReaderWriterContext.md
Lines 101 to 112 in 6fe19ec
## No ModelReaderWriterTypeBuilder found | |
If you encounter an error message like "No ModelReaderWriterTypeBuilder found for [Name]", it means that ModelReaderWriter attempted to read or write | |
a type for which no appropriate ModelReaderWriterTypeBuilder exists in your context. | |
Troubleshooting Steps | |
1. Ensure you have the System.ClientModel.SourceGeneration analyzers installed. In general simply adding | |
a package reference to System.ClientModel will do this but you can verify in your project dependencies that you see the reference. | |
2. Ensure you have a public partial class that inherits from [ModelReaderWriterContext](#context-class). | |
3. If the type is one of the [supported collections](#supported-collection-types) then add the [ModelReaderWriterBuildableAttribute](#modelreaderwriterbuildableattribute) for your missing type. | |
4. If the type is not one of the [supported collections](#supported-collection-types) then add a [custom type builder](#custom-type-builders) for your missing type. |
Instead, I had to add this line:
Line 7 in 6fe19ec
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles> |
Files then generated correctly:

I'm not sure if changes for this issues are related:
Metadata
Metadata
Assignees
Labels
ClientThis issue is related to a non-management packageThis issue is related to a non-management packageDocsSystem.ClientModelBase Core libraryBase Core library