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.

Improve missing targeting pack error handling

See original GitHub issue

Today, in the implementation so far, we have: GenerateErrorForMissingTargetingPacks that is set to false for all design-time builds:

https://github.com/dotnet/sdk/blob/b8c8d680ef807a8d35e3ce1dfceb3e69ca7be394/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.TargetingPackResolution.targets#L151-L155

But we want an error in design-time builds when restore has happened. Should this instead be conditioned on the presence of an assets file + !design-time like other targets?

We also discussed special handling to surface errors from packagedownload of targeting pack to project system.

cc @dsplaisted @davkean

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
nguerreracommented, Feb 11, 2019

IMHO, It’s critical that we have a high-ranked error in the error list when the targeting pack could not be found.

0reactions
nguerreracommented, Feb 11, 2019

Indeed, let’s sync up on this. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Targeting pack for .NET 4.5.2 not installed
NET 4.6.2 (VS2017) - I downloaded the Developer pack from the link provided by the error message and installed, but it didn't help....
Read more >
NETSDK1145: Targeting or apphost pack missing - .NET CLI
NET SDK issues error NETSDK1145, the targeting or apphost pack is not installed and NuGet package restore is not supported.
Read more >
Troubleshoot .NET Framework targeting errors
This article provides resolutions for MSBuild errors that might occur because of reference issues.
Read more >
Building a project that target .NET Framework 4.5 in Visual ...
So, the fix is simple: just copy the files from that package to C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4 ...
Read more >
Cannot load project with target .Net Framework 4.6.2
I am using a Windows 10 with Visual Studio 2017. I have .Net Framework 4.6.1 and 4.7.2 installed but not 4.6.2. I tried...
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