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
Based on .NET guidelines for capitalization, preview ServiceVersion values should be PascalCase, e.g. "V2021_09_21_Preview" instead of "V2021_09_21_preview". This violates the AZC0016 analyzer recently added to catch cases like this.
At this time, this is caused by a generator bug but, even when fixed, you should consider whether this introduces an undesirable breaking change. For example, if you've already shipped to customers but haven't changed the preview version, you may want to keep it by redefining the same class outside the "Generated" folder.
The easiest way is to move the entire options class that defines your ServiceVersion to the project folder outside the "Generated" folder and next to your client class. When the code is generated again, this class will not be re-generated and you fully own all updates. This is often desirable when you have to maintain multiple versions as well, such as after you ship your first GA and want to ship another preview of GA, or even if you support multiple previews.
If you are able to rename the value to use the uppercase "_Preview" suffix, please remove the GlobalSuppressions.cs file added to your project in PR #23793.
The text was updated successfully, but these errors were encountered:
If you haven't shipped, renaming the property in a non-generated source file as described in the issue is best; however, if you have shipped, see #23793 (review) for a good suggestion to define additional members and hide the old ones. These preview ServiceVersions should be deleted once you GA anyway, so you would not have to support them forever
Based on .NET guidelines for capitalization, preview
ServiceVersion
values should be PascalCase, e.g. "V2021_09_21_Preview" instead of "V2021_09_21_preview". This violates the AZC0016 analyzer recently added to catch cases like this.At this time, this is caused by a generator bug but, even when fixed, you should consider whether this introduces an undesirable breaking change. For example, if you've already shipped to customers but haven't changed the preview version, you may want to keep it by redefining the same class outside the "Generated" folder.
The easiest way is to move the entire options class that defines your
ServiceVersion
to the project folder outside the "Generated" folder and next to your client class. When the code is generated again, this class will not be re-generated and you fully own all updates. This is often desirable when you have to maintain multiple versions as well, such as after you ship your first GA and want to ship another preview of GA, or even if you support multiple previews.If you are able to rename the value to use the uppercase "_Preview" suffix, please remove the GlobalSuppressions.cs file added to your project in PR #23793.
The text was updated successfully, but these errors were encountered: