I'm trying to compile my application to run on Core 3.0 (NOT 3.1)
And I'm able to compile and run fine locally, but when I do a publish it gives me:
Error NETSDK1005: Assets file 'C:\dev...\project.assets.json' doesn't have a target for '.NETCoreApp,Version=v3.1'. Ensure that restore has run and that you have included 'netcoreapp3.1' in the TargetFrameworks for your project.
But I'm not trying to make it run on 3.1, I need 3.0 (To maintain compatibility with other projects)
Is it possible to find out what causes it to look for 3.1 instead of 3.0?
Update all DLLs to version 3.0
Check your build configuration
Edit FolderProfile.pubxml
and change <TargetFramework>netcoreapp3.1</TargetFramework>
to <TargetFramework>netcoreapp3.0</TargetFramework>
I had the same issue after upgrading from 3.1 to Net 6.0 where it will Build but not Publish. I then updated my existing Publish profiles to Net 6.0 as well and everything is working now.
Publish Profile Setting to change as well
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With