CS8012 - How to solve warning "Referenced assembly targets a different processor than the application"

wire_jp 216 Reputation points
2023-03-30T13:33:38.0766667+00:00

I have built a .NET MAUI app in .net 6 and it includes to a Mopups(1.0.0) nuget package reference.

When I build the output solution, I received the following warning: -

Severity	Code	Description	Line	Suppression State
Warning	CS8012	Referenced assembly 'Mopups, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' targets a different processor.	1	Active

The build is targeting "Any CPU". I tried to change the Platform Target in the Build in the Properties under the Solution Explorer (right click on the App folder in the Solution Explorer, select Properties > Build > Platform Target) from "Any CPU" to target "x64" but the error still persists. Please advise

Developer technologies | .NET | .NET MAUI
Developer technologies | Visual Studio | Other
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2023-03-31T05:46:58.89+00:00

    Hello,

    I found this issue was reported in the Mopups GitHub page.

    Referenced assembly Mopups targets a different processor.

    Please waiting for Mopups PG’s update.

    Mopups is a third-partly plugin, alternatively, you can install .NET MAUI Community Toolkit nugget package

    Then use Popup control to pop up a page.

    Best Regards,

    Leon Lu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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