- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.3k
Description
Libraries that reference Swashbuckle.AspNetCore and target multiple framework versions (<TargetFrameworks>net6.0;net7.0</TargetFrameworks>) fail to compile with the following error.
MSB3073
The command "dotnet "C:\Users\ben.page\.nuget\packages\microsoft.extensions.apidescription.server\6.0.5\build\../tools/dotnet-getdocument.dll" --assembly "C:\repos\SwashbuckleMultiTargetError\SwashbuckleMultiTarget\bin\Debug\net6.0\SwashbuckleMultiTarget.dll" --file-list "obj\SwashbuckleMultiTarget.OpenApiFiles.cache" --framework ".NETCoreApp,Version=v6.0" --output "obj" --project "SwashbuckleMultiTarget" --assets-file "C:\repos\SwashbuckleMultiTargetError\SwashbuckleMultiTarget\obj\project.assets.json" --platform "AnyCPU" " exited with code 3.
Replacing <TargetFrameworks>net6.0;net7.0</TargetFrameworks> with <TargetFramework>net7.0</TargetFramework> allows the code to compile.
Example Repo: https://github.com/ben-page/SwashbuckleMultiTargetError