-
I have been working on a MAUI app. My targets are iOS, Android and Mac. I have several MAUI libraries and the main application. I am working on a Mac in VSCode. I was debugging on the Android simulator just 15 minutes ago, made a couple of minor changes to some xaml and went to debug again and all of a sudden I am getting i errors like this one:
I asked Copilot about it and it told me I need to remove any AssemblyInfo.cs files and [assembly: tags. Well, I don't have any of those and never did. Like I said it was building and debugging just 15 minutes ago. I didn't change anything like that or change any libraries or projects or anything. I literally just modified some xaml. I tried deleting all obj and bin folders in all the projects in the solution. That didn't fix the errors. I am still able to debug on Mac and iOS just fine. I can see in the MAUI libraries and main app obj folder that there are generated files that contain that stuff, but that shouldn't have changed between 15 minutes ago and now. Any ideas what in the world is going on? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
I was building for iOS since Android wasn't working and now all of a sudden the iOS build is doing the exactly same thing. Clean builds don't help. What changed in just a few minutes? The Mac Catalyst build seems to continue to work fine. |
Beta Was this translation helpful? Give feedback.
-
I have another project that is an older maui project. It targets dotnet 8 instead of dotnet 9, but is still using the latest 9.0.300 SDK to build it. This other project seems to still build fine. I have no idea what would be different about this other project. |
Beta Was this translation helpful? Give feedback.
-
Same problem here, for debug builds in ios by deleting the lines with errors in AssemblyInfo.cs it works, for release builds it doesnt work. |
Beta Was this translation helpful? Give feedback.
I found what caused my error: i think the pre-release extensions of vscode for maui during a build accidentally created the bin and obj folders in the wrong directory. After a couple of builds when the Duplicate 'System.Reflection.AssemblyCompanyAttribute' attribute started happening i noticed bin and obj where created in another folder other than the main project folder, i found them in my "Views" folder, which i noticed, and then i found them in "Platforms/iOS/", after deleting the duplicates my project started working again