Hey! I'm a recruiter and this is a hard question to be honest.
I always ask for an expected salary in the first interview. Why? Because I don't want to waste anybodies time. From you, doing technical assignment and more interviews, but also from my colleagues who grade the assignment and do the interviews. It doesn't make sense to do this all and at the end find out you and the company are not on the same salary level.
I do know other companies see it as a bad thing. They might see you as a moneygrabber. But as long as you be honest about it, I think it is not a problem. Talking about money is always hard, but it is necessary and normal :)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.