The type 'Application' is defined in an assembly that is not referenced. You must add a reference to assembly 'Uno.UI, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null' #19066
-
On building for the
The only reference I have is in a csproj that looks like the following:
I found this StackOverflow question discussing the error: But it does not appear to apply to me as I am not using the toolkit (that I know of). Any assistance in determining this error and how to solve it would be appreciated. Thank you for your assistance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Thanks for the report! Are you able to extract a repro? |
Beta Was this translation helpful? Give feedback.
-
@Mike-E-angelo I think mine done the same in the past. I normally do a "cleanup projectmap" and rebuild it. If that not helps at this point, reopen visual studio, to cause the nuget restore packages normally resolves it on my side 😄 |
Beta Was this translation helpful? Give feedback.
Thanks. The issue here is that the projects tree from this point, only has one
net9.0
target framework which is used by uno to refer to skia/webassembly compatible targets.To fix this, you an either specify a list of
TargetFrameworks
in all the projects referenced by your head that matches at least your top-level project (if you want to use Uno API in those projects), or you can replace theSdk="uno.sdk"
line bySdk="Microsoft.Net.Sdk"
at the top of the child projects (if you only want to use plain .NET BCL APIs).The Uno Platform Library template contains the
TargetFrameworks
that need to be present, if you need an example.Note also that it is generally not a good idea to set the
Targe…