question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Assets file 'E:\****\obj\project.assets.json' doesn't have a target for '.NETPortable,Version=v4.0,Profile=Profile111'. Ensure that restore has run and that you have included 'portable40-net45+win8+wpa81' in the TargetFrameworks for your project.

See original GitHub issue

Hi guys,

When I use multi target framework in my project like following:

<TargetFrameworks>netstandard1.1;net45</TargetFrameworks><TargetFrameworkProfile>Profile111</TargetFrameworkProfile>

And following is why I need TargetFrameworkProfile in my .csproj:

<Import Project="$(MSBuildExtensionsPath)\Microsoft\Portable\v4.5\Microsoft.Portable.CSharp.targets" />

I faced upper problem, I thought I was right when I see this article [https://docs.microsoft.com/en-us/nuget/schema/target-frameworks],

Profile111 | .NETFramework 4.5 | portable-net45+win8+wpa81 | netstandard1.1

I’ve being working on this a whole day, didn’t find any solution yet, does anyone know what’s the problem? Thanks a lot.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
livarcocccommented, Nov 18, 2017

PCLs are not supported in the command line and the new csproj style.

Why do you need to target it directly? I isn’t netstandard1.1 enough for you?

0reactions
Lily721commented, Nov 27, 2017

I believe netstanard1.1 already covered Profile111, and it seems like there’s no need to import Portable.CSharp.targets again in the new format of netstandard1.1 .csproj, I thought I just need import my custom target as usual, then it should work, but, actually, It doesn’t. BTW, my msbuild target is build base on FrameWork 4.5, and please check this article , When I run netstandard 1.1 project, no UsingTask was fired, I don’t know what’s going on, why my UserTask can not be started?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Assets file obj\project.assets.json doesn't have a target
NETCoreApp,Version=v2.0'. Ensure that restore has run and that you have included 'netcoreapp2.0' in the TargetFrameworks for your project.
Read more >
NuGet Restore build issues - project.assets.json doesn't ...
json ' doesn't have a target for 'net48'. Ensure that restore has run and that you have included 'net48' in the TargetFrameworks for...
Read more >
NETSDK1005 and NETSDK1047: Asset file is missing target
NET SDK issues error NETSDK1005 or NETSDK1047, the project's assets file is missing information on one of your target frameworks.
Read more >
\obj\project.assets.json' doesn't have a target for 'net6.0- ...
Ensure that restore has run and that you have included 'net6.0-windows10.0.19041.0' in the TargetFrameworks for your project. #10984.
Read more >
Q&A
Assets file 'C:\dev\mayapp\obj\project.assets.json' doesn't have a target for 'net6.0-windows10.0.19041.0/win-x64'. Ensure that restore has ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found