Roslyn problems with two editors with separate solutions/scripts at the same time

Hello,

I am struggling with editing two separate C# scripts in one application at the same time. Both scripts are separate console applications and some of the code is the same in both scripts. My problem is that the code is marked as an error in the second editor because, for example, ‘class and/or method’ are always present. This means that the editors treat each code as a single solution. How can I separate these ‘solutions’ so that one is not affected by the other?

I’ve tried using a separate CsParser for each editor, but that doesn’t help.

Many thanks in advance…

Hi,

how do you initialize the CsParser? I think you should use this constructor:

CsParser parser = new CsParser (new CsSolution())

This creates a new solution for each parser.

Hope this helps

Wolfgang

2 Likes

Hi Wolfgang,

thank you very much - your solution works absolut perfect…

Heiko