Search Unity

Question updated API causes build errors

Discussion in 'Unity MARS' started by cam415, Jul 15, 2020.

  1. cam415

    cam415

    Joined:
    Mar 26, 2014
    Posts:
    46
    I did an api update and now am getting a bunch of errors when I try to build. All of the errors are linked to scripts in the MARS/Generated folder. Help please...
     
  2. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    297
    Hello @cam415,

    If you delete the Generated folder; do errors persist?; what exactly did you update?.
    Could you provide us with more insight on what do the errors say?
     
  3. cam415

    cam415

    Joined:
    Mar 26, 2014
    Posts:
    46
    Hi @jmunozarUTech,
    Yes. I tried deleting the Generated folder but it seems to automatically create a new Generated folder every time I try to delete it.
    I had clicked "I made back up, go ahead" when the automatic updater window popped up.
    Visual studio build output errors attached...
    Thanks
     

    Attached Files:

  4. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    297
    Yes, the generated folder is expected to re-generate; what packages have you installed in the package manager?
     
    Last edited: Jul 15, 2020
  5. cam415

    cam415

    Joined:
    Mar 26, 2014
    Posts:
    46
    installed packages attached...
    Does not include assets installed from the asset store...
     

    Attached Files:

  6. cam415

    cam415

    Joined:
    Mar 26, 2014
    Posts:
    46
    The only ones I remember installing directly from the package manager were
    -probuilder
    -progrids
    -arkit
    -arcore
    -vector graphics
    -postprocessing
     
  7. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    297
  8. cam415

    cam415

    Joined:
    Mar 26, 2014
    Posts:
    46
    AR foundation 2.1.8 is already installed. Not sure why it doesn't show up when I have "In Project" selected in my package manager. It shows up as installed in my project when I select "All packages"
    The version installed matches ARCore XR Plugin 2.1.8 and ARKit 2.1.9
     
  9. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    297
    do you get the errors also in the Unity Console? no the VS one. What was the API update you did, which Unity version are you running; what OS and what is your target build
     
  10. cam415

    cam415

    Joined:
    Mar 26, 2014
    Posts:
    46
    No, I do not get any errors in the Unity Console just the VS one. The errors show when I try to build any script.
    windows 10
    building for android
    unity 2019.3.10f1
    I'm not completely sure what API got updated. I imported several assets from the asset store in the past couple of days and started receiving the "API update required" pop up window every time I opened my project. I assumed one of the assets I got was maybe using obsolete APIs so I ran the API updater as the pop-up window requested.
    My project seems to be running fine when I press play in the editor. It's just not building.
    I'm going to try to do an ios build on my mac to see if I get the same results...
     
  11. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    297
  12. cam415

    cam415

    Joined:
    Mar 26, 2014
    Posts:
    46
    ahh ok. I was able to get a successful build on my android so the problem does just seem to be happening on the VS side. Looks like the issue you listed so I'll take a deeper look into that and get back to you. Thank you!
     
  13. mtschoen

    mtschoen

    Unity Technologies

    Joined:
    Aug 16, 2016
    Posts:
    194
    > started receiving the "API update required" pop up window every time I opened my project

    This is quite strange. If you are still seeing this behavior, can you submit a bug report? You can do this by going to Help -> Report a bug...

    Please make sure to upload your project folder so that we can reproduce the issue. If you are unable/unwilling to share the project folder, please try to reproduce the issue in a new project and upload that.

    Did you update the MARS package itself at any point? The current version is 1.0.2, which went live last week. I'm at a loss for what could be causing this issue, so I think the best bet is for one of us to be able to reproduce the issue locally.

    As for the build issue, I think @jmunozarUTech is on the right track--this sounds like an issue with the generated IDE project. Some users have had trouble getting around this, even with the `Generate all .csproj files` setting enabled. In that case, updating to 2019.4 may help, because it uses an updated version of the Visual Studio integration.

    Hope this helps!
     
    jmunozarUTech likes this.
  14. cam415

    cam415

    Joined:
    Mar 26, 2014
    Posts:
    46
    This worked for me-
    -Deleted all existing .csproj and .sln files in the project folder
    -Updated to 2019.4.4f1
    -Checked "Registry Packages" option in preferences/external tools
    -Regenerated project files.

    Thanks for your help!
     
    mtschoen and jmunozarUTech like this.