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.

Nullref in .targets file

See original GitHub issue

Description

paket update with Suave’s faulty spec https://github.com/SuaveIO/suave/issues/638 causes paket to assume .net core, despite framework: net461 being a given constraint in paket.dependencies. This in turn causes, “Object reference not set to an instance of an object” to be thrown and the build to fail when running xbuild Project.sln.

Expected behavior

Not to throw null ref exceptions. Not to add .Net core dependencies when the framework target is constrained.

Actual behavior

Throwing null ref.

Known workarounds

Manually remove the paket.targets import that was added.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:74 (69 by maintainers)

github_iconTop GitHub Comments

1reaction
hafcommented, Aug 17, 2017

If this https://github.com/haf/expecto/pull/175 merges, I’ll be moving all my projects to FAKE.

0reactions
matthidcommented, Aug 31, 2017

That said, netstandard should be the default, pcl are deprecated.

Yes exactly

For nuget client is easier to maintain compatibility, old version doesnt auto-update, so doesnt consider the netstandard.

You can use strategy: min

The root issue is NETStandard.Library world vs old world with pcl only. Is a choice an user can do. @matthid maybe adding a strategy modifier, can help to disambiguate

I mean yes we could prefer pcl in that case (and add some option around it) but I don’t think that is a good idea going forward. I still don’t get why netstandard dlls wouldn’t work at runtime. There might be a different issue here than paket adding some hacks to prevent netstandard dlls.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Detecting what the target object is when ...
The most you can hope for is to trap the file and line number where the exception occurred. If you're having problems identifying...
Read more >
System.NullReferenceException message in creating ...
Hi everyone, I created a localdb sql server file(School.mdf) in the App_Data folder in an MVC project using .Net Framework 4.8.
Read more >
Null reference exception in build
ProductionManager.CheckProduction is throwing a NullReferenceException somewhere inside of it. It's caused by the event system calling ItemSlot.
Read more >
Null Reference Exceptions
A NullReferenceException happens when you try to access a reference variable that isn't referencing any object. If a reference variable isn't referencing an ......
Read more >
NullReferenceException in C#. What is it and how to fix it?
A NullReferenceException (NRE) is a type of .NET exception. It occurs when a developer tries to dereference a null reference.
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