+2  A: 

I change the configuration manager. It was Compiling to Any Cpu... and Any Cpu was set to x64.... I changed Any Cpu to x86 and it works. So the problem is solved...

Can someone tell me why in X64 we can't edit in debug? (I will accept the answer to this sub question if someone have it).

Daok
+1  A: 

Presumably they just haven't implemented edit-and-continue yet for x64 code. I don't think there's any deeper reason to it.

+7  A: 

There is no technical reason, it is just simply not implemented. According to some sources, Microsoft wants to implement it by the next release of the CLR.

See: http://blogs.msdn.com/stevejs/archive/2005/11/15/493018.aspx#499593

DrJokepu
+3  A: 

Mike Stall says:

EnC does some very low-level things that are pretty OS-specific and so limiting to a single platform was primarily a resource-constraint. Future CLRs will no doubt expand this. Our porting effort also started from scratch in V2, and so all the rest of the debugging services had to be ported too, so we already had a very large item here. Also, we believe the biggest scenarios for EnC would revolve around pure-IL apps that allow people to at least develop in x86. There's a workaround in such cases: on a 64-bit machine, you can launch a pure-IL app as 32-bit app in the WOW, and then do EnC on it.

These are all limitations of the CLR, not Visual Studio, which means if a 3rd-party debugger adds EnC, they'll have the same restrictions. In all cases, we were felt happy that the the cost of enabling each case was better spent making the core-scenarios stronger.

Jacob