Error in source code generator when referencing Xamarin.Forms views

John Hair 371 Reputation points

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=, 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?


A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,324 questions
{count} votes