Open Luk164 opened 3 years ago
Thanks for the feedback. We will take it into consideration.
You can currently use HotReload feature by installing TizenHotReloader_4 nuget to the generated template app, but you need to make some modifications to it. After installing TizenHotReloader_4 nuget, modify the followings:
Constructor in App.xaml.cs
public App()
{
InitializeComponent();
#if DEBUG
TizenHotReloader.HotReloader.Open(this);
#endif
}
CSPROJ file Be careful not to mention TizenHotReloader_4 several times in CSPROJ file.
<PropertyGroup>
<ProjectTypeGuids>{B484D2DE-331C-4CA2-B931-2B4BDAD9945F}</ProjectTypeGuids>
</PropertyGroup>
<ItemGroup Condition="'$(Configuration)' != 'Release'">
<PackageReference Include="TizenHotReloader_4" Version="1.0.0" />
</ItemGroup>
This instruction is for Tizen 4.0 emulator. If you are using Tizen 5.0 or above emulator, you should install TizenHotReloader nuget instead of TizenHotReloader_4.
Then, your application is ready for use HotReload feature. You can find the guide how to use Hot Reload in Validate Your Application Changes using XAML Hot Reload.
@edenlee1212 Well that is weird, I tried exactly that before posting this issue using the above mentioned template as an example and it did not work. Making changes to xaml and saving does not seem to trigger anything. There is no change and nothing in debug logs.
@Luk164 Please let me know emulator version and nuget(TizenHotReloader or TizenHotReloader_4). In addition, did you enable XAML Hot Reload and start debugging as mentioned in Validate Your Application Changes using XAML Hot Reload?
Emulator version: Tizen4/Unified 4.0.0 (i386) VERSION = 4.0.0 CODENAME = Next BUILD_ID=tizen-4.0-unified_20191115.1_wearable-emulator-circle
My constructor in App.xaml.cs:
public App()
{
InitializeComponent();
#if DEBUG
TizenHotReloader.HotReloader.Open(this);
#endif
}
My .csproj file:
<Project Sdk="Tizen.NET.Sdk/1.0.8">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>tizen40</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Update="Resources\AppResources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>AppResources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Resources\AppResources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>AppResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Folder Include="res\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8" />
<PackageReference Include="Samsung.Sap" Version="1.0.0" />
<PackageReference Include="sqlite-net-base" Version="1.7.335" />
<PackageReference Include="SQLitePCLRaw.provider.sqlite3.netstandard11" Version="1.1.14" />
<PackageReference Include="Tizen.Wearable.CircularUI" Version="1.5.2" />
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1821" />
</ItemGroup>
<ItemGroup Condition="'$(Configuration)' != 'Release'">
<PackageReference Include="TizenHotReloader_4" Version="1.0.0" />
</ItemGroup>
</Project>
@edenlee1212 Forgot to tag
@Luk164 In order to use Hot Reload on Tizen, you need to enable XAML Hot Reload for Tizen. You can find it in Tools > Options > Tizen > Tools.
@edenlee1212 was already enabled
@Luk164 In addition, the following must be added in csproj file.
<PropertyGroup>
<ProjectTypeGuids>{B484D2DE-331C-4CA2-B931-2B4BDAD9945F}</ProjectTypeGuids>
</PropertyGroup>
@edenlee1212 Added the property group, still nothing. Even in the debug output I do not get the message I normally would if I saved, so it is not even trying. I am getting a lot of these though:
Loaded '[vdso]'. Cannot find or open the symbol file. Loaded 'linux-gate.so.1'. Cannot find or open the symbol file. Loaded 'JIT(0x80940930)'. Cannot find or open the symbol file. Loaded 'JIT(0x80b78420)'. Cannot find or open the symbol file. Loaded 'JIT(0x80b28eb8)'. Cannot find or open the symbol file.
Could be a clue
@Luk164 Please close your solution and reopen it. Then try agian. Because I'm not in charge of Hot Reload, I don't know the reason but it's working for me.
@edenlee1212 It works! For some reason reloading the project did the trick! Thank you
Is your feature request related to a problem? Please describe. Unlike the old "Tizen Wearable XAML App" template, TTS does not have hotreload by default.
Describe the solution you'd like HotReload to be added to generated project and working for every view.
Additional context There is a possible complication in that tizen 4 has a different hotreload library version than the subsequent versions. This would have to be accounted for in templates based on users platform version selection.