-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TargetFrameworks cause compile error #2706
Comments
This is the same issue reported on #1511. But that was closed because is was missing an example repo. |
This seem similar to the old aspnetcore issue 14370. This comment says that the scenario with using Swashbuckle in a library project isn't supported: dotnet/aspnetcore#14370 (comment). |
This is definitely still and issue, and the workaround still works. Workaround: #1511 (comment) |
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
The text was updated successfully, but these errors were encountered: