Closed gsgoodluck closed 2 years ago
已启动生成... 1>------ 已启动生成: 项目: MES.Core, 配置: Debug Any CPU ------ 1>你正在使用 .NET 的预览版。请查看 https://aka.ms/dotnet-support-policy 1>C:\Program Files\dotnet\sdk\7.0.100-preview.6.22352.1\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.Shared.targets(152,5): warning NETSDK1023: 项目中包含了“Microsoft.Maui.Extensions”的 PackageReference。此包由 .NET SDK 隐式引用,且通常情况下你无需从项目中对其进行引用。有关详细信息,请参阅 https://aka.ms/sdkimplicitrefs 1>E:\MAUI\PrismMaui\MES\MES.Core\UserManagement\UserManagementService.cs(16,7,16,25): warning CS0105: “MES.UserManagement”的 using 指令以前在此命名空间中出现过 1>E:\MAUI\PrismMaui\MES\MES.Core\UserManagement\UserManagementService.cs(24,19,24,21): warning CS0108: “UserManagementService.DB”隐藏继承的成员“ServiceBase.DB”。如果是有意隐藏,请使用关键字 new。 1>E:\MAUI\PrismMaui\MES\MES.Core\DataBaseManager\DataBase.cs(66,30,66,32): warning CS0168: 声明了变量“ex”,但从未使用过 1>E:\MAUI\PrismMaui\MES\MES.Core\UserManagement\Authorization.cs(170,21,170,23): warning CS0168: 声明了变量“ex”,但从未使用过 1>E:\MAUI\PrismMaui\MES\MES.Core\DataBaseManager\DataBase.cs(506,25,506,39): warning CS0472: 由于“int”类型的值永不等于“int?”类型的 "null",该表达式的结果始终为“true” 1>E:\MAUI\PrismMaui\MES\MES.Core\DataBaseManager\DataBase.cs(495,20,495,23): warning CS0219: 变量“Key”已被赋值,但从未使用过它的值 1>C:\Program Files\dotnet\sdk\7.0.100-preview.6.22352.1\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.Shared.targets(152,5): warning NETSDK1023: 项目中包含了“Microsoft.Maui.Dependencies”的 PackageReference。此包由 .NET SDK 隐式引用,且通常情况下你无需从项目中对其进行引用。有关详细信息,请参阅 https://aka.ms/sdkimplicitrefs 1>C:\Program Files\dotnet\sdk\7.0.100-preview.6.22352.1\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.Shared.targets(152,5): warning NETSDK1023: 项目中包含了“Microsoft.Maui.Extensions”的 PackageReference。此包由 .NET SDK 隐式引用,且通常情况下你无需从项目中对其进行引用。有关详细信息,请参阅 https://aka.ms/sdkimplicitrefs 1>已完成生成项目“MES.Models.csproj”的操作。 1>MES.Core -> E:\MAUI\PrismMaui\MES\MES.Core\bin\Debug\net6.0\MES.Core.dll 1>已完成生成项目“MES.Core.csproj”的操作。 2>------ 已启动生成: 项目: MES.Production, 配置: Debug Any CPU ------ 2>MES.Production -> E:\MAUI\PrismMaui\MES\MES.Production\bin\Debug\net6.0\MES.Production.dll 3>------ 已启动生成: 项目: MES, 配置: Debug Any CPU ------ 3>你正在使用 .NET 的预览版。请查看 https://aka.ms/dotnet-support-policy 3>你正在使用 .NET 的预览版。请查看 https://aka.ms/dotnet-support-policy 3>你正在使用 .NET 的预览版。请查看 https://aka.ms/dotnet-support-policy 3>E:\MAUI\PrismMaui\MES\MES\MES\ViewModels\MainPageViewModel.cs(21,24,21,46): warning CS1998: 此异步方法缺少 "await" 运算符,将以同步方式运行。请考虑使用 "await" 运算符等待非阻止的 API 调用,或者使用 "await Task.Run(...)" 在后台线程上执行占用大量 CPU 的工作。 3>E:\MAUI\PrismMaui\MES\MES\MES\ViewModels\MainPageViewModel.cs(9,17,9,23): warning CS0169: 从不使用字段“MainPageViewModel._count” 3>C:\Program Files\dotnet\sdk\7.0.100-preview.6.22352.1\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.Shared.targets(152,5): warning NETSDK1023: 项目中包含了“Microsoft.Maui.Dependencies”的 PackageReference。此包由 .NET SDK 隐式引用,且通常情况下你无需从项目中对其进行引用。有关详细信息,请参阅 https://aka.ms/sdkimplicitrefs 3>C:\Program Files\dotnet\sdk\7.0.100-preview.6.22352.1\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.Shared.targets(152,5): warning NETSDK1023: 项目中包含了“Microsoft.Maui.Extensions”的 PackageReference。此包由 .NET SDK 隐式引用,且通常情况下你无需从项目中对其进行引用。有关详细信息,请参阅 https://aka.ms/sdkimplicitrefs 3>已完成生成项目“MES.Models.csproj”的操作。 3>E:\MAUI\PrismMaui\MES\MES\MES\ViewModels\MainPageViewModel.cs(21,24,21,46): warning CS1998: 此异步方法缺少 "await" 运算符,将以同步方式运行。请考虑使用 "await" 运算符等待非阻止的 API 调用,或者使用 "await Task.Run(...)" 在后台线程上执行占用大量 CPU 的工作。 3>E:\MAUI\PrismMaui\MES\MES\MES\ViewModels\MainPageViewModel.cs(9,17,9,23): warning CS0169: 从不使用字段“MainPageViewModel._count” 3>E:\MAUI\PrismMaui\MES\MES\MES\ViewModels\MainPageViewModel.cs(21,24,21,46): warning CS1998: 此异步方法缺少 "await" 运算符,将以同步方式运行。请考虑使用 "await" 运算符等待非阻止的 API 调用,或者使用 "await Task.Run(...)" 在后台线程上执行占用大量 CPU 的工作。 3>E:\MAUI\PrismMaui\MES\MES\MES\ViewModels\MainPageViewModel.cs(9,17,9,23): warning CS0169: 从不使用字段“MainPageViewModel._count” 3>C:\Program Files\dotnet\sdk\7.0.100-preview.6.22352.1\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.Shared.targets(152,5): warning NETSDK1023: 项目中包含了“Microsoft.Maui.Extensions”的 PackageReference。此包由 .NET SDK 隐式引用,且通常情况下你无需从项目中对其进行引用。有关详细信息,请参阅 https://aka.ms/sdkimplicitrefs 3>已完成生成项目“MES.Core.csproj”的操作。 3>已完成生成项目“MES.Production.csproj”的操作。 3>MES -> E:\MAUI\PrismMaui\MES\MES\MES\bin\Debug\net6.0-maccatalyst\maccatalyst-x64\MES.dll 3>MES -> E:\MAUI\PrismMaui\MES\MES\MES\bin\Debug\net6.0-ios\iossimulator-x64\MES.dll 3>MES -> E:\MAUI\PrismMaui\MES\MES\MES\bin\Debug\net6.0-android\MES.dll 3>E:\MAUI\PrismMaui\MES\MES\MES\ViewModels\MainPageViewModel.cs(21,24,21,46): warning CS1998: 此异步方法缺少 "await" 运算符,将以同步方式运行。请考虑使用 "await" 运算符等待非阻止的 API 调用,或者使用 "await Task.Run(...)" 在后台线程上执行占用大量 CPU 的工作。 3>E:\MAUI\PrismMaui\MES\MES\MES\ViewModels\MainPageViewModel.cs(9,17,9,23): warning CS0169: 从不使用字段“MainPageViewModel._count” 3>E:\MAUI\PrismMaui\MES\MES\MES\ViewModels\MainPageViewModel.cs(21,24,21,46): warning CS1998: 此异步方法缺少 "await" 运算符,将以同步方式运行。请考虑使用 "await" 运算符等待非阻止的 API 调用,或者使用 "await Task.Run(...)" 在后台线程上执行占用大量 CPU 的工作。 3>E:\MAUI\PrismMaui\MES\MES\MES\ViewModels\MainPageViewModel.cs(9,17,9,23): warning CS0169: 从不使用字段“MainPageViewModel._count” 3>已完成生成项目“MES.Production.csproj”的操作。 3>已完成生成项目“MES.csproj”的操作。 3>MES -> E:\MAUI\PrismMaui\MES\MES\MES\bin\Debug\net6.0-windows10.0.19041.0\win10-x64\MES.dll ========== “生成”: 3 成功,0 失败,2 更新,0 已跳过 ==========
Thank you so much for your bug report! Unfortunately, this report seems to be missing some details that will help us diagnose (and therefore hopefully fix) the potential bug. We would like to ask you to use the bug report template when opening an issue and fill that out with all the details you have. Especially any error message, stacktrace and/or relevant code that lead up to the issue would be very helpful.
Ideally we would love to have a minimal, reproducible example that you upload to a GitHub repository and link us to. That should greatly speed up the process, thanks!
Hi @gsgoodluck. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
Hi @gsgoodluck. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
Hi This example compiles with the same error Release Prism.Maui-master.zip
The Prism.Maui repo is not a valid reproduction @gsgoodluck
Hi Change here
Prism.Maui.Rx
global.json
{ "sdk": { "version": "6.0", "rollForward": "latestPatch", "allowPrerelease": true } }
I am not sure, is this still an issue?
Also, this looks to be an issue with the android build tasks and not maui itself:
3>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.424\tools\Xamarin.Android.Common.targets(1442,3):
System.ArgumentException: 已添加了具有相同键的项。
在 System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
在 System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
在 Xamarin.Android.Tasks.TypeMapGenerator.GenerateRelease(Boolean skipJniAddNativeMethodRegistrationAttributeScan, List`1 javaTypes, String outputDirectory, ApplicationConfigTaskState appConfState)
在 Xamarin.Android.Tasks.GenerateJavaStubs.WriteTypeMappings(List`1 types, TypeDefinitionCache cache)
在 Xamarin.Android.Tasks.GenerateJavaStubs.Run(DirectoryAssemblyResolver res)
在 Xamarin.Android.Tasks.GenerateJavaStubs.RunTask()
在 Microsoft.Android.Build.Tasks.AndroidTask.Execute() 位置 /Users/runner/work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:行号 17
Could you open the issue again at https://github.com/xamarin/xamarin-android/ and make sure to attach a reproducible sample? This is very much likely to either build cache issues or a nuget package bringing in duplicate artifacts. At least the Android team over there will be able to help you find it.
Hi @gsgoodluck. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
Use maui Template,Release (Windows......) Error System.ArgumentException: 已添加了具有相同键的项。
You can try it
Description
XAGJS7004 System.ArgumentException: [已添加了具有相同键的项。] 在 System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) 在 System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) 在 Xamarin.Android.Tasks.TypeMapGenerator.GenerateRelease(Boolean skipJniAddNativeMethodRegistrationAttributeScan, List1 javaTypes, String outputDirectory, ApplicationConfigTaskState appConfState) 在 Xamarin.Android.Tasks.GenerateJavaStubs.WriteTypeMappings(List`1 types, TypeDefinitionCache cache) 在 Xamarin.Android.Tasks.GenerateJavaStubs.Run(DirectoryAssemblyResolver res) 在 Xamarin.Android.Tasks.GenerateJavaStubs.RunTask() 在 Microsoft.Android.Build.Tasks.AndroidTask.Execute() 位置 /Users/runner/work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:行号 17 MES C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.424\tools\Xamarin.Android.Common.targets 1442
Steps to Reproduce
User Prism.Maui.Template https://github.com/PrismLibrary/Prism.Maui/issues/91
Android Setting
Version with bug
Unknown/Other (please specify)
Last version that worked well
Unknown/Other
Affected platforms
Android, Windows
Affected platform versions
net6.0-android;net6.0-ios;net6.0-maccatalyst
Did you find any workaround?
No
Relevant log output