Languages

Menu
Sites
Language
DLL libraries are not copied into the .tpk package in Visual Studio 2019

I have a Xamarin.Forms Tizen project for a Samsung watch. When I compile it with the Visual Studio 2017, it works correctly. The resulting .tpk archive is 6500 kB large and contains all the data. But when I open the project in the Visual Studio 2019 and select the Release, the resulting .tpk archive is only 425 kB large. It cannot be used in the watch, or started in the simulator.

When I open the Release folder, I can see that the /tpkroot/bin folder contains only one .dll file of the main project. Other projects in the solutions are not there, also the referenced Nuget libraries are not there. When I unzip the .tpk file, I can also see that it contains only one .dll file (see the image).

My target framework is Tizen 4.0, compiled with the Tizen.NET 5.0.0, Microsoft.CSharp 4.7.0, Xamarin.Forms 4.8.0

What has changed in the Visual Studio 2019? How can I make it work?

I found that I can add this line into the project file:

<PropertyGroup>
  <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

This copies all the needed libraries into the release folder, but not into the /tpkroot/bin and into the .tpk file. We need to compile the app with the Visual Studio 2019, it's installed on our build servers.

Responses

1 Replies
Tomas Slavicek

Aah, this is the fix: The project still used the Tizen.SDK 1.0.3 (I did not realize it, it was not visible in the list of nuget packages, only in the project file).

I changed the first line of all .csproj files to this:

<Project Sdk="Tizen.NET.Sdk/1.0.9">

And run this in the Nuget Package Manager console:

Install-Package Tizen.NET.Sdk -Version 1.0.9

It fixed the problem. Now all .dll libraries are correctly copied into the bin folder and into the .tpk package.