语言

Menu
Sites
Language
Compile error due to reference error

Hi! after updating all my nuget packages, vs2019 won't compile my solution. The error is the following:

 

Severity    Code    Description    Project    File    Line    Suppression State
Error    CS0234    The type or namespace name 'Forms' does not exist in the namespace 'Xamarin.Forms.Platform.Tizen' (are you missing an assembly reference?)  

Then, here there are my packages:

<ItemGroup>
    <PackageReference Include="Json.Net" Version="1.0.16" />
    <PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
    <PackageReference Include="NSoup.Standard" Version="2.0.1" />
    <PackageReference Include="sqlite-net-base" Version="1.6.292" />
    <PackageReference Include="SQLitePCLRaw.provider.sqlite3.netstandard11" Version="1.1.14" />
    <PackageReference Include="Tizen.NET" Version="5.0.0.14629">
      <ExcludeAssets>Runtime</ExcludeAssets>
    </PackageReference>
    <PackageReference Include="Tizen.NET.Sdk" Version="1.0.5" />
    <PackageReference Include="Tizen.Wearable.CircularUI" Version="1.3.2" />
    <PackageReference Include="Xamarin.Forms" Version="4.2.0.848062" />
    <PackageReference Include="Xamarin.Forms.Platform.Tizen" Version="2.5.1.444934" />
  </ItemGroup>

Any possible solution? thanks :)

查看选择的答案

响应

2 回复
Mark as answer
Tizen .NET

Hi,

Since Xamarin.Forms 4.2.0 version, namespace has been changed as follows:

Xamarin.Forms.Platform.Tizen -> Xamrin.Forms

global::Xamarin.Forms.Platform.Tizen.Forms.Init(app); -> global::Xamarin.Forms.Forms.Init(app);

There's one more thing.

    <PackageReference Include="Tizen.Wearable.CircularUI" Version="1.3.2" />
    <PackageReference Include="Xamarin.Forms" Version="4.2.0.848062" />
    <PackageReference Include="Xamarin.Forms.Platform.Tizen" Version="2.5.1.444934" />

Tizen.Wearable.CircularUI has a dependency on Xamarin.Forms. It's just enough by doing the following:

    <PackageReference Include="Tizen.Wearable.CircularUI" Version="1.3.2" />

If you use VS 2019 v 16.3+, please check this out. 

Without updating Tizen.NET.Sdk package from 1.0.3 to 1.0.5, the following runtime exception will happen.

System.IO.FileNotFoundException: Could not load file or assembly 'Xamarin.

 

Thanks.

feduss
Thanks :D! everything works now!