0

I am able to build the application in local, but it fails in pipeline, and below error message i am getting .

C:\Program Files\dotnet\sdk\7.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5): 
C:\Agent\1\s\my-Applications\Process\Executor\obj\project.assets.json' 
 doesn't have a target for 'net6.0-windows'. Ensure that restore has run and that you have included 'net6.0-windows' 

when i am running a .net 6 console app its running perfectly.

<TargetFramework>net6.0</TargetFramework>

but windows targetframework doesn't work

<TargetFramework>net6.0-windows</TargetFramework>
  • Researched and found like similar issue of yours via this link:https://stackoverflow.com/questions/72280776/assets-file-project-assets-json-doesnt-have-a-target-for-net6-0-vs2022 you can refer to. – RoyWang-MSFT Nov 11 '22 at 09:08
  • @RoyWang-MSFT Actually i am ble to to build .net 6 console Appliation , but i got the error while using .net6_WindowsForm – Aditya Dalai Nov 11 '22 at 11:03
  • Whether you are using DotNetCoreCLI@2 task when restoring? And could you modify your ticket with sharing the YAML file and do remember to remove any private info in the file. – RoyWang-MSFT Nov 14 '22 at 10:10

0 Answers0