You generally cannot build a shed against your fence. If the fences are your property lines, you may have to build the structure 10 feet (3 meters) from the back fence and 15 feet (4.5 meters) from the side fences. However, this also depends on your city restrictions.