Samsung / Tizen.NET

Welcome to Tizen .NET
Other
213 stars 32 forks source link

Can not build Tizen .NET MAUI apps as of 2023-04-16 #238

Closed MikeyWetzel closed 1 year ago

MikeyWetzel commented 1 year ago

I followed all directions for a fresh install to build Tizen .NET MAUI apps (the Tizen VS extensions, SDK, workload, etc.). However, the target platform is net6.0-tizen is not recognized. (It does the same if I try to build for net7.0-tizen). The command "dotnet workload list" does NOT show tizen.

I followed other suggestions in this forum to manually download/run workload-install.ps1, which are not presumably out of date. That script gives 404 not found errors. Also, something about a "Wrong Id".

Here's the full text output for workload-install.ps1:

Check Tizen Workload for sdk 6.0.100-rc.2.21505.57 Id: Samsung.NET.Sdk.Tizen.Manifest-6.0.100 An exception was caught: The remote server returned an error: (404) Not Found. Id: Samsung.NET.Sdk.Tizen.Manifest-6.0.100 An exception was caught: The remote server returned an error: (404) Not Found. Id: Samsung.NET.Sdk.Tizen.Manifest-6.0.100 An exception was caught: The remote server returned an error: (404) Not Found. Return cached latest version. Removing Samsung.NET.Sdk.Tizen.Manifest-6.0.100/7.0.101 from C:\Program Files\dotnet\sdk-manifests\6.0.100... Removing Samsung.Tizen.Sdk/7.0.101... Removing Samsung.Tizen.Ref/7.0.101... Removing Samsung.Tizen.Templates/7.0.101... Removing Samsung.NETCore.App.Runtime.tizen/7.0.101... Installing Samsung.NET.Sdk.Tizen.Manifest-6.0.100/7.0.101 to C:\Program Files\dotnet\sdk-manifests\6.0.100... Installing Samsung.Tizen.Sdk/7.0.101... Installing Samsung.Tizen.Ref/7.0.101... Installing Samsung.Tizen.Templates/7.0.101... Installing Samsung.NETCore.App.Runtime.tizen/7.0.101... Done installing Tizen workload 7.0.101

Check Tizen Workload for sdk 7.0.300-preview.23179.2 Id: Samsung.NET.Sdk.Tizen.Manifest-7.0.300-preview.23179 An exception was caught: The remote server returned an error: (404) Not Found. Id: Samsung.NET.Sdk.Tizen.Manifest-7.0.300-preview.23179 An exception was caught: The remote server returned an error: (404) Not Found. Id: Samsung.NET.Sdk.Tizen.Manifest-7.0.300-preview.23179 An exception was caught: The remote server returned an error: (404) Not Found. Failed to install Tizen Workload for sdk 7.0.300-preview.23179.2 Wrong Id: Samsung.NET.Sdk.Tizen.Manifest-7.0.300-preview.23179

MikeyWetzel commented 1 year ago

Some of the workload-install.ps1 errors go away if you put the manifest name in lowercase:

$ManifestBaseName = "samsung.net.sdk.tizen.manifest"

You can test this manually in a browser that this does not work: https://api.nuget.org/v3-flatcontainer/Samsung.NET.Sdk.Tizen.Manifest-7.0.100/index.json But this does: https://api.nuget.org/v3-flatcontainer/samsung.net.sdk.tizen.manifest-7.0.100/index.json

However, even though this removed some errors in the script, it still did not fixed the problem, and dotnet workload list still does not show tizen.

sung-su commented 1 year ago

@MikeyWetzel Could share your dotnet --verion and dotnet --list-sdks result ? I will check.

MikeyWetzel commented 1 year ago

dotnet --verion 7.0.300-preview.23179.2

MikeyWetzel commented 1 year ago

dotnet --list-sdks 6.0.100-rc.2.21505.57 [C:\Program Files\dotnet\sdk] 7.0.300-preview.23179.2 [C:\Program Files\dotnet\sdk]

MikeyWetzel commented 1 year ago

Please note, I don't do anything fancy with dotnet versions or SDKs. I literally just have 2022 Visual Studio Community installed and update it when it tells me there's an update. I had this problem BEFORE I updated Visual Studio to the current versions. When Tizen projects did not build, I noticed Visual Studio had an update so I installed it. After the update (which is the version/SDKs above), it still does not recognize net6.0tizen as a target.

sung-su commented 1 year ago

I understand your inconvenience. But I needed information request to reproduce your issue.

How did you install dotnet sdk 7.0.300-preview.23179.2 ? It is not released dotnet sdk version. Even the dotnet sdk version installed by the latest VS update is 7.0.203. So please use the released version of the dotnet sdk.

Thanks

MikeyWetzel commented 1 year ago

OK, I did as you requested, but having the same problem. I uninstalled VS 2022 Community Preview, and installed VS 2022 Community. Then I reinstalled the Tizen VS extension, and followed instructions to setup the Tizen SDK, project manager, device manager, and emulator manager. But can't build the project (same errors, below).

dotnet --version 7.0.203

dotnet --list-sdks 6.0.100-rc.2.21505.57 [C:\Program Files\dotnet\sdk] 7.0.203 [C:\Program Files\dotnet\sdk]

dotnet workload list Installed Workload Id Manifest Version Installation Source

tizen 7.0.105/7.0.200 SDK 7.0.200 maui-windows 7.0.81/7.0.100 VS 17.5.33530.505 maui-maccatalyst 7.0.81/7.0.100 VS 17.5.33530.505 maccatalyst 16.2.2035/7.0.100 VS 17.5.33530.505 maui-ios 7.0.81/7.0.100 VS 17.5.33530.505 ios 16.2.2035/7.0.100 VS 17.5.33530.505 maui-android 7.0.81/7.0.100 VS 17.5.33530.505 android 33.0.46/7.0.100 VS 17.5.33530.505

I see tizen in there, so that's progress.

But when I create a new MAUI project using .NET 7.0 and uncomment the tizen line in the .csproj file, I still get the following errors: Severity Code Description Project File Line Suppression State

Error NETSDK1139 The target platform identifier tizen was not recognized. TVApp4 C:\Program Files\dotnet\sdk\7.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets 112

Error NU1012 Platform version is not present for one or more target frameworks, even though they have specified a platform: net7.0-tizen TVApp4 C:\temp\code\TVApp4\TVApp4.csproj 1

Note: I tried with .NET 6.0 as well, and same errors, only for net6.0tizen.

MikeyWetzel commented 1 year ago

Here's what running workload-install.ps1 outputs:

heck Tizen Workload for sdk 7.0.203 Id: Samsung.NET.Sdk.Tizen.Manifest-7.0.200 An exception was caught: The remote server returned an error: (404) Not Found. Id: Samsung.NET.Sdk.Tizen.Manifest-7.0.200 An exception was caught: The remote server returned an error: (404) Not Found. Id: Samsung.NET.Sdk.Tizen.Manifest-7.0.200 An exception was caught: The remote server returned an error: (404) Not Found. Return cached latest version. Tizen Workload 7.0.105 version is already installed.

MikeyWetzel commented 1 year ago

Since my last comment, I got a little closer. For the .NET 6.0 project, I changed Project Settings -> Application -> Tizen Targets -> Target Tizen Framework from blank to 6.5. Now, the errors above go away.

But...

...I get a new error after building during the Deploy step: DEP1700: The recipe file "c:\temp\code\TVApp3\bin\Debug\net6.0-tizen6.5\tizen-x86\TVApp3.build.appxrecipe" does not exist. You may need to build your project.

I added .NET SDK 6.0.408 in case that was the problem.

sung-su commented 1 year ago

@MikeyWetzel

1. It seems that maui-tizen workload is not installed due to the last problem. Please install maui-tizen workload manually. e,g, dotnet workload install maui-tizen

2. Could you check the installed version of Visual Studio tools for Tizen extension ? Please update to latest version 3.8.0.0.

I hope this solves problem.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days