ah I should have said, i had a test project with an sln file and I tried the approach oiwth the main entry point but it would still complain.
On v3.49.0 btw
Ok so with the workaround, Pulumi then complains there is more than 1 project file. However, I use NDepend for static analysis, which has a NDProj file format for its project file. Pulumi seems to think this is a project file for C#, presumably due to the suffix, so this logic needs changing. I moved the file into a folder and the build works now.