dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.99k stars 4.03k forks source link

`Microsoft.CodeAnalysis.Project.DefaultNamespace` is null for `sqlproj`. #65607

Open lsoft opened 1 year ago

lsoft commented 1 year ago

Version Used: 4.0

Steps to Reproduce:

  1. create sqlproj
  2. open project option page, choose SQLCLR tab, change default namespace to the something different
  3. check Microsoft.CodeAnalysis.Project.DefaultNamespace for this project, it will be null.

Looks like there is no way to get custom default namespace via Roslyn for sqlproj.

Expected Behavior:

Because sqlproj allowed to contains a C# code (and other functions of Roslyn works fine for sqlproj), would be ideal to provide correct default namespace via Roslyn.

Actual Behavior:

default namespace is null.

mavasani commented 12 months ago

@jasonmalinowski does this belong to us or the project-system?

jasonmalinowski commented 12 months ago

@mavasani Short of sticking a debugger on it, it's hard to say. @lsoft was this with the VisualStudioWorkspace or MSBuildWorkspace?

lsoft commented 12 months ago

@jasonmalinowski it was with the VisualStudioWorkspace inside my VSIX.