-
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
"library.dll does not contain an entry point" error when using "TargetFrameworks" vs "TargetFramework" #1511
Comments
Hi there, I have the same issue, did you find out the root cause and ways to fix the error? Thank you! |
I have same problem when cross-target library to 3.1 and 5.0 <TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks> Adding <OpenApiGenerateDocumentsOnBuild>false</OpenApiGenerateDocumentsOnBuild> helps. |
@andrewmcclellankibo are you still experiencing this problem with the latest version of SB ( |
I have the same problem |
I faced the same problem when I was targeting net461, check this #1967 it might help. |
SB doesn't currently support apps that target |
I've got this - targeting core 3.1 and .net 5 |
Add this to your csproj
Update: Apparently it disables the swagger documentation, so it may not help. |
I came across the same issue when attempting to multi-target .NET 5.0 and 6.0 Can you re-open this issue? |
I'm also experiencing the same issue when multi-targeting .net 5 and .net 6. |
I have the same issue |
I'm also getting this error with Framework Version 4.8 |
@domaindrivendev Hi, here's an example of the problem using .NET Core 6 & 7. The build works with https://github.com/ben-page/SwashbuckleMultiTargetError |
Creating a dll using .net core 3.1
Reference: Swashbuckle.AspNetCore Version=5.0.0
Build -> compiles succesfully
Change:
<TargetFramework>netcoreapp3.1</TargetFramework>
To:
<TargetFrameworks>netcoreapp3.1;</TargetFrameworks>
Or What i'm using:
<TargetFrameworks>netcoreapp3.1;netstandard2.0;net461;</TargetFrameworks>
Compile -> failure, two errors:
"library.dll does not contain an entry point"
"The command "dotnet "blah\microsoft.extensions.apidescription.server\3.0.0\build/../tools/dotnet-getdocument.dll" --assembly "library.dll" --file-list "obj\library.OpenApiFiles.cache" --framework ".NETCoreApp,Version=v3.1" --output "obj" --project "library" --assets-file "library\obj\project.assets.json" --platform "AnyCPU" " exited with code 3."
I found that that comand does not run when using just TargetFramework.
There is a workaround: underneath add false
But this doesn't seem like the expected requirement
The text was updated successfully, but these errors were encountered: