   how to assemble shader 4.0 with D3DXAssembleShaderFromFile
  I try to assemble shaders with D3DXAssembleShaderFromFile. It works fine with shader models 2.0 and 3.0 but returns zero with shader model 4.0. Is there way to fix it or I have to use another function?   
  Take a look at the debug output window to see if the debug runtimes are giving you any errors.  If not, then you will need to take a look at the compilation result and see why its not compiling.  The easiest way to do that is to use the fxc.exe tool that is bundled with the DXSDK.Just as a sanity check, do you have a shader model 4 compatible graphics card?  If the card is the problem, then you could try running with the reference rasterizer to see if it works and compiles your shader too.Good luck!   ;  It shouldn't be possible to assemble a shader for any target 4.0 or greater.  MS doesn't make that functionality available since we have an optimizing compiler that does a very good job and for security reasons.  If there is an issue you are trying to work around please post it so that we can take a look at it.  Otherwise, what are you interested in doing?   