A semiconductor device comprising: a terminal including a first end portion, a trunk portion, and a second end portion in this order; a circuit substrate to which the first end portion of the terminal is secured, wherein the trunk portion is substantially upright in respect to the circuit substrate; a case body including a main surface and side faces adjacent to the main surface, an opening portion that houses the circuit substrate and is on a side opposing the main surface, and a groove hole (2, 2a) formed from the outside of the case body on the main surface and having a beam portion formed on a bottom surface side of the groove hole (2, 2a), wherein in the groove hole (2, 2a) there are formed a first corner portion, a sidewall, and a second corner portion in this order that are located toward the opening portion from the main surface and a through hole located adjacent to the second corner portion; and a positioning component that includes a first side face, a second side face opposing the first side face, a front end face positioned between the first side face and the second side face, and a back end face opposing the front end face wherein the positioning component is secured in the groove hole (2, 2a) and wherein the back end face of the positioning component is positioned at the inlet of the groove hole (2, 2a) at one of the side faces of the case body, characterized in that, the positioning component includes an inclined protrusion portion that becomes thicker toward the back end face from the front end face is formed on the first side face, the terminal passes through the through hole toward the main surface side from the opening portion side, and the trunk portion of the terminal is pressed by the inclined protrusion portion in a direction of the sidewall to be sandwiched between the inclined protrusion portion and the sidewall, the trunk portion being supported by the first corner portion or the second corner portion, and the second end portion of the terminal protrudes from the main surface of the case body. a terminal including a first end portion, a trunk portion, and a second end portion in this order; a circuit substrate to which the first end portion of the terminal is secured, wherein the trunk portion is substantially upright in respect to the circuit substrate; a case body including a main surface and side faces adjacent to the main surface, an opening portion that houses the circuit substrate and is on a side opposing the main surface, and a groove hole (2, 2a) formed from the outside of the case body on the main surface and having a beam portion formed on a bottom surface side of the groove hole (2, 2a), wherein in the groove hole (2, 2a) there are formed a first corner portion, a sidewall, and a second corner portion in this order that are located toward the opening portion from the main surface and a through hole located adjacent to the second corner portion; and a positioning component that includes a first side face, a second side face opposing the first side face, a front end face positioned between the first side face and the second side face, and a back end face opposing the front end face wherein the positioning component is secured in the groove hole (2, 2a) and wherein the back end face of the positioning component is positioned at the inlet of the groove hole (2, 2a) at one of the side faces of the case body, characterized in that, the positioning component includes an inclined protrusion portion that becomes thicker toward the back end face from the front end face is formed on the first side face, the terminal passes through the through hole toward the main surface side from the opening portion side, and the trunk portion of the terminal is pressed by the inclined protrusion portion in a direction of the sidewall to be sandwiched between the inclined protrusion portion and the sidewall, the trunk portion being supported by the first corner portion or the second corner portion, and the second end portion of the terminal protrudes from the main surface of the case body.