Errors when deploying code to robot

I am writing the code for my robot in C++. I tried to deploy the code to my robot by right-clicking the project and then going to Run As>WPILIB C++ deploy. I have been able to build the code before without getting any errors but when I deploy it I get an error in build.xml

Here is the file:

<?xml version="1.0" encoding="UTF-8"?>

<project name="FRC Deployment" default="deploy">

  The following properties can be defined to override system level
  settings. These should not be touched unless you know what you're
  doing. The primary use is to override the wpilib version when
  working with older robots that can't compile with the latest

  <!-- By default the system version of WPI is used -->
  <!-- <property name="version" value=""/> -->

  <!-- By default the system team number is used -->
  <!-- <property name="team-number" value=""/> -->

  <!-- By default the target is set to 10.TE.AM.2 -->
  <!-- <property name="target" value=""/> -->

  <property file="${user.home}/wpilib/"/>
  <property file=""/>
  <property file="${user.home}/wpilib/cpp/${version}/ant/"/>

  <import file="${wpilib.ant.dir}/build.xml"/>


The error is in line 3 and it says that “Default target deploy does not exist in this project”, here is the line:

<project name="FRC Deployment" default="deploy">

There is also a warning in like 26 which says, “Cannot find /Users/victordusa/workspace/MyRobot/${wpilib.ant.dir}/build.xml imported from /Users/victordusa/workspace/MyRobot/build.xml”, here is that line:

<import file="${wpilib.ant.dir}/build.xml"/>

Also when I try to deploy this is what I get in the console:
Buildfile: /Users/victordusa/workspace/MyRobot/build.xml

/Users/victordusa/workspace/MyRobot/build.xml:26: Cannot find /Users/victordusa/workspace/MyRobot/${wpilib.ant.dir}/build.xml imported from /Users/victordusa/workspace/MyRobot/build.xml

Total time: 197 milliseconds

I have no idea what the problem is. Any help is appreciated.

Try creating a new “dummy” project (you can delete it after creation) then try building your old project.

Creating a dummy project did not work, also I am curious about what is in the ${wpilib.ant.dir}/build.xml file. Could I just remove the line to fix part of the problem without cause more problems??

I’ve tried this on two computers one running osx one running windows 7 and both have the same problem.

I am having this same problem. Mine happened when I brought code in from github and it just wont work now.

We’ve had the same problem. We found that disabling the wired and wireless LAN adapters on the laptop and only using the USB cable makes the deploy option work.