Legacy Shader Error in Unity 5

Hello,
I recently updated to Unity 5, and now whenever I build my project I receive this error.

Shader error in 'Legacy Shaders/Lightmapped/Bumped Diffuse': invalid output semantic 'TEXCOORD8': Legal indices are in [0,7] invalid vs_2_0 output semantic 'TEXCOORD8' at line 51 (on d3d9)    
Compiling Vertex program with LIGHTMAP_ON DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF UNITY_HDR_ON

Can anyone tell me what I need to to do to fix this?
I appreciate any help.
Thanks

Starting from Unity 5 developers changed the nVidia Cg to HLSL model that have only 8 texcords(e.g TEXCORD0 ~ TEXCORD7) in pixel and vert shader 2.0 version by default set on d3d9. That’s why You have this erors. You need to change You render model in player settings from Direct 3D 9 to d3d11 ps and vs 3.0 that have more texcords and rebuild shader, reimport all assets as well but not necesary.

I have the same problem using Unity 5.01f1. I didn’t have it using any of the beta releases I tried. So far, I’ve found no information on the error, and this thread is the only place I’ve even seen it mentioned. It looks like one of the legacy shaders is no longer compatible, but I haven’t found out where they’re even stored at this point. Otherwise I’d just go there and delete it.

The good news is that the error only seems to be saying that a bad shader is installed, but unless you’re actually using it, there shouldn’t be a problem. I’m pretty sure I don’t use this particular shader anywhere, and my games still run after I get the error, so I guess I can wait for it to get fixed in a later build.

I would like to add more to this answer. As Atabek said Unity team have indeed changed things in unity5. My case was I was using directX 9 and standard clippable shader from a example site. When I updated to Unity2017.2 from 5.6 I started to get this error. Until 5.6 I never got error this error. As mentioned in line 'invalid output semantic ‘TEXCOORD8’: Legal indices are in [0,7] invalid vs_2_0 output semantic ‘TEXCOORD8’ '. The compiler was using SM 2.0 to compile it. Got rid of the error when I switched the code to SM3.0 and the shader compiled as I wanted the shader to specifically work on directX 9 only, though this should work for dx11 also. I used the directive ‘#pragma target 3.0’ and replaced all of ‘#pragma target 2.0’ with above. Hope this helps someone in future.