question

JohnHair avatar image
0 Votes"
JohnHair asked WenyanZhang-MSFT commented

Error in source code generator when referencing Xamarin.Forms views

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

dotnet-xamarinforms
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

You could try to clear obj and bin folders, make sure the path of project is legal. And may I ask you what the version of VS you used is?

0 Votes 0 ·

0 Answers