CenterEdge / Yardarm

OpenAPI 3 SDK Generator for C#
Apache License 2.0
44 stars 6 forks source link

VS2022 Intellisense does not recognise Yardarm generated code #199

Open rikrak opened 1 year ago

rikrak commented 1 year ago

Not sure if this is an environmental issue or of general concern:

I have a Yardarm SDK project that appears to correctly generate a netstandard2.0 assembly (verified with JetBrains' DotPeek). The Yardarm project is referenced by a net7.0 Blazor project. The solution builds just fine, but Visual Studio 2022 (v17.7.0) complains about the Yardarm generated code in intellisense (lots of red-squiggle underlines). Is this expected behaviour?

Replication Steps:

  1. Load the solution found here into Visual Studio 2022
  2. Build the solution i. There should be no build errors
  3. open the Class1.cs file in the SdkConsumer project
  4. Observe the red squiggles under the namespace for the generated endpoint references
  5. Other observations: i. The Visual Studio Error List window: a. Build Only filter shows no errors a. Build + Intellisense shows 3 errors

image

rikrak commented 1 year ago

Note: the referenced project is a cut-down sample for replication purposes :-)

brantburnett commented 1 year ago

Currently, yes if the SDK project is loaded in the same solution due to the very complicated VS internals. It will work correctly if the referenced Yardarm project is in a separate solution that was compiled separately (ProjectReference is still fine). But this is an area I'd like to improve.