Replies: 1 comment
-
Solved this by moving the attributes the source generator was looking for into a separate project so I could add the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I've created a simple source generator for finding and doing service DI registration. It works great and I can deploy to Android, but when I try to deploy on iOS the hot reload blows up with this error:
I've tried looking at the CommunityToolkit MVVM project(s) on GitHub and tried lowering the version of
Microsoft.CodeAnalysis.CSharp
, but I still get the error but with different version numbers.I don't know why hot reload wants access to
Microsoft.CodeAnalysis
as the MAUI project does not have a reference to it. One thing I am thinking could be the culprit is that I reference the source generator project like this:<ProjectReference Include="<path to .csproj>" OutputItemType="Analyzer" />
I am not specifying
ReferenceOutputAssembly="false"
as the project contains attributes that I am looking for. Perhaps moving the attributes to a separate project and have that reference the source generator project?Update
I was able to get it "working" by adding this to my app's csproj file:
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
However, I feel that something is wrong in me having to add that reference...
Beta Was this translation helpful? Give feedback.
All reactions