Solution
You probably don't set the correct .NET Framework version which the project needs to have for successful execution or the .NET Framework version required for the project is not installed on your machine.
You need to follow the following steps to fix the issue.
- Open the project and navigate to Project >> Properties >> Application >> Target framework.
- Select Install other frameworks.
- You can also download the Developer Pack of .NET Framework 4.6.2 from here.
- Complete the installation and restart Visual Studio.
- Open the project again.
- Change the Target framework to .NET Framework 4.6.2 and click Yes when prompted for the change.
- Navigate to Project and expand References, if you see a yellow exclamation mark show on NationalInstruments.TestStand.SemiconductorModule.ApplicationAPI, remove this reference.
- Right click References and select Add Reference.
- Add NationalInstruments.TestStand.SemiconductorModule.ApplicationAPI assembly back to the project.
Now you should be able to build or rebuild the project to generate a DLL.