Issue importing 2019 project to 2020


I’ve been trying to import a WPI Project we used last fall into the updated 2020 VS using the Project Importer. It appears to find the build.gradle file; however we get this error after hitting the Import Project button

‘Failed to detect project type. Did you select the build.gradle file of a wpilib project’

This was a WPI Project that was deployed to a robot only a few weeks ago.

1 Like

Do you have a .wpilib folder and a wpilib_preferences.json file in that folder. That file is required in order for the update to work

Thanks for the quick response!

I didn’t copy over the entire folder structure.

My team is also having this issue. The imported looks to have worked with our code we ran last year but nothing we were working on in the off-season. What ended up working was adding “2019” and “java” to the wpilib_preferences.json, they were originally in there as “none”, in the “.wpilib” folder. Try that first. image If that doesn’t work, It also looks like there is a difference between our launch.json file and I was missing a settings.json file from the “.vscode” folder. I don’t actually know what I am doing so I replaced the launch.json file and added the settings.json from last years code. Everything is converted and more importantly everything still build once I added the 3rd party libraries back in.


This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.