Share via

Error in source code generator when referencing Xamarin.Forms views

John Hair 371 Reputation points
2021-10-02T11:19:38.05+00:00

Hi there,
Im trying to write a simple source code generator (based on ISourceGenerator) which works for simple examples, but as soon as I reference any of the views in Xamarin.Forms it doesn't build.

From some debugging I think it is throwing an error:
Exception was of type 'FileNotFoundException' with message 'Could not load file or assembly 'Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.

The source generator project has the latest Xamarin.Forms nuget, as does the client console project.

Any ideas?

Thanks
John

Developer technologies | .NET | Xamarin

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.