Can one use Shader Replacement with Deferred shading

I guess the title says it all: Can one use Shader Replacement with Deferred Shading?

In my case as soon as I enable forward shading my replacement shaders work. Switch to Deferred and it breaks.

Any ideas?

I had the same problem,But I was using a temporary camera to render with replaced shaders (Not main camera). So there is no reason for temporary camera to have deferred pipleline.

cam.CopyFrom(Camera.main);
cam.targetTexture = targetTex;
cam.renderingPath = RenderingPath.Forward;
cam.SetReplacementShader(ReplaceMentShader,null);
cam.Render();