Vasanth
Vasanth

Reputation: 13

Breezejs update - Latest version of Breeze.WebApi fails on Metadata

I am building on Hottowel spa template and my solution was working fine for Read, Save and Update. Delete was failing though with "Object reference not set to instance of object". At this point the Breeze.webapi verison was 1.2.0.0. After reading some articles, it was suggested to update the breeze to latest version.

I updated the breeze framework using nuget package manager and now, it fails while parsing the metadata - It says JSON string returned from the server have parsing errors. But when I look at the JSON using JSON formatters in chrome. It looks just fine. This is happening with Breeze.webapi version 1.2.8.0.

Now, if I switch just the breeze.webapi dll back to ver. 1.2.0.0. Metadata part works just fine again, however delete doesn’t.

Any help is appreciated

Upvotes: 1

Views: 294

Answers (1)

Ward
Ward

Reputation: 17863

The likely cause is that the NuGet update did only part of the job and left your application with a mix of new and old Breeze parts. You could see that this happened by looking in the Package Console window but most folks don't look. Having been burned with every NuGet package upgrade I can think of, I now watch that console like a hawk.

I think you'll get out of trouble if you completely uninstall Breeze and re-install the latest. Look at that output window carefully. If it fails to remove something (as it might), there will be a warning to that effect. Please delete that lingering item manually before re-installing.

I'm talking to John about updating the HotTowel template so that upgrading the Breeze package feels less urgent.

Sorry for your pain.

Upvotes: 1

Related Questions