Skip to content

Break points in source generated files don't bind. Source code is different from original version #74603

@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


[severity:It's more difficult to complete my work]
In my SG I'm producing a list of using directives. I'm sorting the string list using stringList.OrderBy(s => s). On my machine this work just fine, but some colleges reported that they couldn't put break points in the generated files with the error message that source files would differ from the original. Comparing the code shown in VS and the code from the compiled assembly reveled that in deed the order was different.

I was able to work around the problem by changing my SG to use stringList.OrderBy(s => s, StringComparer.Ordinal). However I expect the IDE to always show the code that actually gets compiled and for break points in the generated code to just work.

I'm guessing the issue comes down to the IDE using the wrong culture while generating the code, i.e. not the one that is used during compilation. Im using a custom culture on my machine while most of my colleges use the standard German culture. We're on VS 17.10.4.


Original Comments

Lisa Gao (CSI Interfusion Inc) [MSFT] on 7/21/2024, 07:10 PM:

(private comment, text removed)

Carsten Dierig on 7/22/2024, 02:50 AM:

(private comment, text removed)

Feedback Bot on 7/22/2024, 06:08 PM:

(private comment, text removed)

Feedback Bot on 7/23/2024, 07:51 AM:

(private comment, text removed)


Original Solutions

(no solutions)

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions