Currently I have a script that modifies nuget reference paths in old style csproj files. (for anyone that is interested this is due to building using different solutions which breaks the NuGet reference paths. I have reported it to Microsoft and it is currently in triage).
The script works correctly and does what I need it to, however I thought that this would be a good candidate for a Roslyn Analyzer with a Code fix.
I have played around with analysers and have been able to write several that can modify code within a project, but I am having great difficulty writing one that can work on the csproj file itself.
I have looked at workspaces (VisualStudioWorkspace and MSBuildWorkspace) however it seems to me that these will give you access to the various projects in a solution but will not give you access to the project file itself?
If anyone can give me a pointer to where/what I should be looking for, or if it is actually possible, i'd very much appreciate it.
Thank you