.net - Unexpected targets in project.assets.json - Stack Overflow

<PropertyGroup><TargetFrameworks>net48;net8.0-windows<TargetFrameworks><OutputTyp

<PropertyGroup>
  <TargetFrameworks>net48;net8.0-windows</TargetFrameworks>
  <OutputType>Exe</OutputType>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='net48'">
  <RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers>
</PropertyGroup>

After running dotnet restore I see win-x86 in project.assets.json while I would expect only win7-.. targets.

"targets": {
  ".NETFramework,Version=v4.8": {},
  ".NETFramework,Version=v4.8/win-x86": {},
  ".NETFramework,Version=v4.8/win7-x64": {},
  ".NETFramework,Version=v4.8/win7-x86": {},
  "net8.0-windows7.0": {},
  "net8.0-windows7.0/win-x86": {},
  "net8.0-windows7.0/win7-x64": {},
  "net8.0-windows7.0/win7-x86": {}
},

And then on build I'm getting

error NETSDK1047: Assets file '...\obj\project.assets.json' doesn't have a target for 'net48/win-x86'.

How to solve this error?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744965798a4603671.html

相关推荐

  • .net - Unexpected targets in project.assets.json - Stack Overflow

    <PropertyGroup><TargetFrameworks>net48;net8.0-windows<TargetFrameworks><OutputTyp

    1天前
    60

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信