This happens for the reasons:
- When you open project with first time and the reference to System.Speech not exist.
- When you open old project that build on older .NET version project with newer one this will happen.
Fine, it can be easily solvable:
Method 1
- Go to: Projects > Add reference > .NET Framework
- Select System.Speech
- Press OK
- Build Project once
If it doesn't solve this issue use method 2
Method 2
Add the following file to project.
Go to: Projects Menu > Add reference > Browse > C:\Program Files (x86)\Reference Assemblies\Microsoft.NETFramework\v4.6.1\System.Speech.dll
If it doesn't solve this issue use method 3
Method 3
Go to: Project Solution Explorer > Expand References > Right click on System.speech -> Select Properties -> Specific Version -> Set to "FALSE"
NOTE : make sure Embed Interop Types is set to "FALSE" (Reference Properties)