Skip to content

Trouble Shooting

sung-su.kim edited this page Dec 15, 2022 · 17 revisions

Trouble Shooting

If you encounter problems when installing Tizen workload, you need to check the following:

Run PowerShell as Administrator

  • This scripts needs to be installed with admin rights.

Check PowerShellsecurity policy

  • RemoteSigned or higher ExecutionPolicy is required for this script execution. Or, UnauthorizedAccess, not digitally signed error will be occured.
about_Execution_Policies(https://go.microsoft.com/fwlink/?LinkID=135170)를 참조하십시오.
위치 줄:1 문자:1
+ .\workload-install.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : 보안 오류: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

$ Set-ExecutionPolicy RemoteSigned
$ Get-ExecutionPolicy
  RemoteSigned

DOTNET_ROOT environment variable

  • If dotnet sdk is not installed in the default path, it is necessary to set the $DOTNET_ROOT environment variable as the installation path.

Visual Studio Tizen extension

  • After you install the Visual Studio 2022 tools for Tizen extension, you need admin rights to install the Tizen workload at the first run.

Uninstall Tizen workload

  • using dotnet command with workload ID
$ dotnet workload list
Installed Workload Ids      Installation Source
----------------------------
tizen            SDK 6.0.300
$ dotnet workload uninstall tizen
  • Remove workload manifest directory C:\Program Files\dotnet\sdk-manifests\6.0.300\samsung.net.sdk.tizen

BadImageFormatException

In case you face a BadImageFormatException like below. You need to set a proper RuntimeIdentifier on your csproj.

E/DOTNET_LAUNCHER(11568): log.cc: stdErrRedirect(120) > Unhandled exception.
E/DOTNET_LAUNCHER(11568): log.cc: stdErrRedirect(120) > System.BadImageFormatException: Could not load file or assembly '/opt/usr/apps/com.companyname.HelloMaui/bin/HelloMaui.dll'. An attempt was made to load a program with an incorrect format.

The default RuntimeIdentifier for Tizen is tizen-x86, and you can modify it on your csproj to build tpk for device targets.

<PropertyGroup Condition="$(TargetFramework.Contains('-tizen'))">    
    <RuntimeIdentifier>tizen-armel</RuntimeIdentifier>
</PropertyGroup>

Workload installation fail

When you try to install a new workload, if the installation fails due to the tizen workload, you can use --skip-manifest-update option.

~$ dotnet workload install [workload ID] --skip-manifest-update