首页 > 其他分享 >库升级 .Net 7.0 后生成提示 Assembly "xxx.dll" does not contain an entrypoint 临时解决办法

库升级 .Net 7.0 后生成提示 Assembly "xxx.dll" does not contain an entrypoint 临时解决办法

时间:2022-11-12 05:22:05浏览次数:57  
标签:obj -- Repos xxx dll 7.0 Debug Assembly

在工程项目文件.csproj 添加这行

<PropertyGroup>
  ...
  <OpenApiGenerateDocuments>false</OpenApiGenerateDocuments>
  ...
</PropertyGroup>

就可以跳过 GenerateOpenApiDocuments 继续生成了

报错内容

已启动生成...
1>------ 已启动生成: 项目: xxx, 配置: Debug Any CPU ------
1>xxx -> C:\Repos\xxx\bin\Debug\net7.0\xxx.dll
1>
1>GenerateOpenApiDocuments:
1>  dotnet "C:\Users\Alex\.nuget\packages\microsoft.extensions.apidescription.server\6.0.5\build\../tools/dotnet-getdocument.dll" --assembly "C:\Repos\xxx\bin\Debug\net7.0\xxx.dll" --file-list "obj\xxx.OpenApiFiles.cache" --framework ".NETCoreApp,Version=v7.0" --output "obj" --project "xxx" --assets-file "C:\Repos\xxx\obj\project.assets.json" --platform "AnyCPU"
1>C:\Users\Alex\.nuget\packages\microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.targets(66,5): error : Assembly 'C:\Repos\xxx\bin\Debug\net7.0\xxx.dll' does not contain an entry point.
1>C:\Users\Alex\.nuget\packages\microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.targets(66,5): error MSB3073: 命令“dotnet "C:\Users\Alex\.nuget\packages\microsoft.extensions.apidescription.server\6.0.5\build\../tools/dotnet-getdocument.dll" --assembly "C:\Repos\xxx\bin\Debug\net7.0\xxx.dll" --file-list "obj\xxx.OpenApiFiles.cache" --framework ".NETCoreApp,Version=v7.0" --output "obj" --project "xxx" --assets-file "C:\Repos\xxx\obj\project.assets.json" --platform "AnyCPU" ”已退出,代码为 3。
1>已完成生成项目“xxx.csproj”的操作 - 失败。

标签:obj,--,Repos,xxx,dll,7.0,Debug,Assembly
From: https://www.cnblogs.com/densen2014/p/16882629.html

相关文章