-
Notifications
You must be signed in to change notification settings - Fork 743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating solution with Uno default templates yields round about 20,000 errors #3897
Comments
Hi @SetTrend . I have been trying to reproduce the error you mentioned here but I haven't been able to do it. To start I created a File -> New project but also cloned the repository you provided. In both cases, I build the solution with 0 errors. Build log
I want you to try a couple of things on your side:
Hope any of this could help you, but if you are still running into issues just update this so we can check on it. |
Thank you, @ajpinedam, for taking the time. I followed your steps, but to no avail. To give a better impression of what's happening I created a screencast of me creating a Uno Platform app solution in Visual Studio 2019: Does my "offline Live Share" shed some light on the issue? Perhaps you want to perform a Live Share session? |
Probably my Visual Studio 2019 settings may give some more details on this issue: Just import my Visual Studio 2019 settings (Visual Studio 2019: The "Yes, save my current settings" option saves your settings to disk for backup. After analyzing this issue you can simply import your settings back again and everything is just like before. |
It looks like your Active Configuration doesn't rebuild all projects (3 skipped). Can you make sure to either remove projects you can't build from the solution or change configuration to rebuild them all (or rebuild all heads manually, one at the time)? |
Hi @francoistanguay, I rebuilt all the projects in the solution, both by Configuration Manager and manually, but to no avail. For the sake for comprehensiveness and reproducibility I created a screencast of the build session, in case this may shed some light on the issue: |
Thanks for the update. Could you provide the full list of the errors in a text file? It looks like specific issue with the android project. Does the count go down if you unload the android project ? In many cases, though, the tasks view is not useable as it does not respect the same build settings as the actual build process, and it's better to rely on the output window. |
Thanks, @jeromelaban, yes, you're right, all the errors are coming from the Android project. When I unload the project, no errors are listed. Please find the error list in the following attachment: In attached ZIP file I also copied the data into an MS Excel file for easier sorting, filtering and other data aggregation. Which "tasks view" are you referring to? Am I the only one getting all these errors? You all have zero errors and warnings? So, you cannot reproduce this situation on your machines? |
Thanks for the logs. This issue is caused by the Xamarin.Android resource generator, which for some reason is incorrectly considering two files, or two definitions of the same file. I'm wondering if this could be caused by the fact that there's space in your project's path. Could you try with a path without a space ? Also, could you try removing this line:
from your android csproj file ? About the tasks view, this is the window that show all the errors, which aggregates both intellisense and actual build messages. |
I tried both, but no change, I'm afraid. I could clone my VM and we can have a Life Share session, if you like, so you can see and check for yourself. I believe it would be more efficient if you checked things yourself, rather than asking me to play I spy with my little eye. What do you think? I may be available as of approx. 11 p.m. CEST if that'd be a time that'd be comfortable for you? |
Thanks for the update, this is caused by a Xamarin.Android issue for the A workaround can be added as follows, at the end of the android csproj file: <Project ...>
...
<Target Name="Issue3897Workaround"
Condition=" '$(ManagedDesignTimeBuild)' == 'True' "
AfterTargets="_RemoveLegacyDesigner">
<!-- https://github.com/unoplatform/uno/issues/3897 -->
<ItemGroup>
<Compile Remove="$(_AndroidResourceDesignerFile)"/>
</ItemGroup>
</Target>
</Project> We'll update the Uno templates to include this workaround. |
Thanks so much for dealing with this issue! 👍👍👍 The plethora of errors are gone now. However, there are still 2 errors and 7 warnings left in the template: (Two of the warnings are in conjunction with me not having a Mac connected but about to build an iOS front-end. I take these two warnings as correctly raised.) Would you want to keep this situation within this issue or would you want me to raise another issue on the remaining template errors? |
On my machine, whatever I do, the errors won't disappear. Neither ...
... seems to get rid of the errors I can see there are I'm not familiar with the VS build system. Do you believe the VS issue you mentioned in your previous post will solve this issue? Or is this probably Uno related, though? … and what about the warnings? How to get rid of these? Why are there binding issues in a blank template? |
Thanks. You'll notice that the project that exhibits these errors is the macOS project. For these errors do disappear, all project shave to be rebuilt. For the warnings, many are related to the way Xamarin interacts with more recent builds of VS, and may be related to Xamarin specifically, which will be again resolved by .NET 5. Your best bet here is still to use the output window and the result of the build, not the "errors window". |
Thank you for your extensive help. After restarting Windows and starting Visual Studio 2019 again, now the errors are gone. As you can see from the screencast I posted along with my previous message, I actually built the MacOS project: Maybe the restart requirement has got to do with #3915. Anyway, the errors are gone now 😌 During my development cycle, I'm actually making heavy use of the messages in the Tasks window. Some VS Solution policies of my clients even require an empty Tasks list for production (e.g. "Treat warnings as errors" for Release builds). |
Thanks for the update. I agree that warnings should not be there, though the ones that are there are not compiler warnings but msbuild warnings, which generally don't fail in that "warnings as errors" category. |
Current behavior
After having created a mint Uno App solution, and after having updated all Uno NuGet packages, Visual Studio 2019 (latest) shows 19,666 errors plus warnings and messages:
This is highly confusing and blocking me from developing using Uno.
See (just click):
Build log
Even though build runs without errors, I'm not able to find my own bugs in this pile of other errors.
Expected behavior
Everything should install clean and smoothly; i.e. without any warnings, messages or errors.
How to reproduce it (as minimally and precisely as possible)
Here's my sample repo.
(It's just the plain, empty Uno template with updated Uno NuGet package references.)
Workaround
n/a
Environment
Visual Studio 2019
See (just click):
Visual Studio 2019 details
Affected platform(s):
IDE:
The text was updated successfully, but these errors were encountered: