Azure / autorest.csharp

Extension for AutoRest (https://github.com/Azure/autorest) that generates C# code
MIT License
142 stars 165 forks source link

Duplicate classes in our generator #4190

Open ArcturusZhang opened 8 months ago

ArcturusZhang commented 8 months ago

Describe the issue or request

We have two places trying to load the previous contract:

We should consolidate and unify them

ArcturusZhang commented 8 months ago

FYI @live1206 @pshao25

live1206 commented 8 months ago

https://github.com/Azure/autorest.csharp/blob/005a11ec99c2535428cd4df5bc49f26fed4adc53/src/AutoRest.CSharp/Common/Input/Configuration.cs#L182

This one works base on https://github.com/Azure/azure-sdk-tools/pull/5587, which did not get merged in the end. We had a design agreement with @weshaggard that we would get the previous GA contract via Nuget DLL, which is the second option: https://github.com/Azure/autorest.csharp/blob/005a11ec99c2535428cd4df5bc49f26fed4adc53/src/AutoRest.CSharp/Common/Input/Source/SourceInputModel.cs#L140

We should update the usage of the first one to the second one.