typespec icon indicating copy to clipboard operation
typespec copied to clipboard

Fix Issue in Roslyn MetadataReference Resolver

Open jorgerangel-msft opened this issue 2 years ago • 1 comments

It seems that the custom metadata resolver that was added to the generator may not be working as expected. Some generated types are still not being resolved correctly, ie. https://github.com/microsoft/typespec/blob/main/packages/http-client-csharp/generator/TestProjects/Local/Unbranded-TypeSpec/src/Generated/Models/ModelWithFormat.cs#L15 (System.Uri) should just be generated Uri.

We should investigate if the resolver has a bug, or if it's not correct to use it for this scenario. If so, we will need an alternative to the resolver that doesn't add all the trusted assemblies on disk to the generated project.

jorgerangel-msft avatar May 15 '24 22:05 jorgerangel-msft

We can close this issue if adding the reduce method resolves this problem: https://github.com/Azure/autorest.csharp/issues/4530.

jorgerangel-msft avatar May 21 '24 20:05 jorgerangel-msft