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
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.
Related
I have an application where I have removed my references to the Newtonsoft.Json library and used instead Swashbuckle.ASpNetCore.Newtonsoft version 6.1.4. When I run this locally everything works great. Swagger loads, I am able to query my API with no issues and the world is a nice place. I deploy this code to an Azure Server in Docker and where everything there was working great before, now I have problems. Swagger will not load and my API doesn't work at all, because the application doesn't even start. It would appear that something, somewhere is looking for Newtonsoft.Json version 12.0.0.0 because this is the error I get in the logs.
Any ideas would be greatly appreciated.
In case anyone else has this issue in the future, here is the solution in my case. The Coverlet NuGet package was causing this error. I removed the package and the problem went away.
Using EF 6.1.1
(Reinstalled VS2013 + Update) x4
Happen at each web application project
Transcript:
Error
There was an error running the selected code generator:
'Object reference not set to an instance of an object.'
Just looked up everywhere on the internet, and nothing works, like:
Restarting VS
Reinstalling VS
Executing Install-Package MvcScaffolding
Creating another project
Checking database if exists
Searching the internet
Crying
Now, posting on SO
I'm running out of idea for how to resolve that Helpless error
NB1: My database is created using an *.edmx file and SSMS
Thanks for future answers/hints
What DB do you use? I was having similar problems with MySQL, but I was using additional extensions for that DB. (Solved that by reinstalling several times the extension and saving the .edmx every time in source control while working so when it crash can revert it back :) )
Please check the answer of similar question (hope that helps): Scaffolding controller doesn't work with visual studio 2013 update 3 and 4
After having so much issues with .edmx - do not use them... I know is much more code writing but then you can more easily control and modify it when the db design has changed.
I have done lightweight versioning in my project, right now i have two versions and the current version is set to latest one(dataModel 2.xcdatamodel for example). I have followed every steps there in the apple document. But it's crashing every time because the old version is loading(found that after debugging, the new attributes are missing in the entity) after fresh installation.
If i switch back to old version and roll back to current version again then it's running fine. I have deleted the references and added it again but the result is same.
My source code is on git and its very annoying to do that extra effort every time. Please help me to solve this problem.
thanks :)
If you are 100% sure that the new version is loaded, it means that you created the new version, started the app, applied changes to the model, started the app again. To eliminate the possibility of it, just create the 3rd version based on the 2nd version and make it current active. Also make sure you have the automated lightweight migration implemented as per apple manual here
https://developer.apple.com/Library/ios/documentation/Cocoa/Conceptual/CoreDataVersioning/Articles/vmLightweightMigration.html
I am not sure, i guess it is a git/svn problem. We had to work with different versions of Xcode from the very beginning of the project. Whenever we committed to the git, the git found a miss match of Xcode versions(for say i am working with Xcode 5.1 and my team mate working with Xcode 5.0.1, the project was initialised with Xcode 4.1) and set the current core data version to the very older one that is dataModel 1.xcdatamodel in my case. That's why the project was running fine in my side but when my team mate pulled my code from the git and tried to run in his side it crashed everytime because the version was set to older one by the git.
I got this from here. After following the instructions the problem is solved for now.
Thank you all. If you have any better solution please share.
It just baffles me that even though upddates show up in the Manage NuGet Packages UI for a solution, clicking the update button results in a process that looks like it should work and then fails at the end for no apparent reason. I always have to fall back to uninstalling by hand, removing the project references for the library, and manually deleting the reference from the project file. (Why remove does not do this I have no idea.)
My Setup:
VS2012RC - maybe this works in VS2012RTM?
NuGet v2.1 - the latest as far as I know
F# - I've only been working in F# lately, maybe the problem is specific to F#?
FSharpx.Core - this is the library I update all the time, but I have experienced it with others
At first the messages look like it is working (upgrading from 1.6.78 to 1.6.83)
Added file 'FSharpx.Core.1.6.83.nupkg' to folder 'FSharpx.Core.1.6.83'.
etc.
Successfully installed 'FSharpx.Core 1.6.83'.
'FSharpx.Core 1.6.83' already installed.
Looking for updates for 'FSharpx.Core'...
Updating 'FSharpx.Core' from version '1.6.78' to '1.6.83' in project 'DS_Benchmark'.
'packages.config' already exists. Skipping...
Successfully removed 'FSharpx.Core 1.6.78' from DS_Benchmark.
'packages.config' already exists. Skipping...
Maybe skipping 'packages.config' is the problem, since the version should be updated in that file.
Then the messages start looking bad. Just installed files start getting removed.
Removed file 'FreebaseTypeProvider.htm' to folder 'C:\Users\Jack\Documents\GitHub\DS_Benchmark\packages\FSharpx.Core.1.6.83\...
etc.
Successfully uninstalled 'FSharpx.Core 1.6.83'.
(As an aside, could NuGet please use the correct preposition for "remove" in their message?)
It's a bug in NuGet 2.1, or else a change to the F# project system in VS 2012 that breaks NuGet.
http://nuget.codeplex.com/discussions/395351
They've acknowledged the problem, and pledge to have it fixed in NuGet 2.2. In the meantime, you can help by voting for the bug, and also this other NuGet/F#/VS2012 bug.
This bug or my lack-of-knowledge or smth else is really starting to bother me. I am working on a Grails app and randomly in the middle of my work, grails with complain about some import, saying that cannot resolve the class name. It was working one save ago! I havent changed anything to the infrastructure of the project. I've just written more code. the bothering part is that the app still runs fine, it's just that it has two tagging Xses and every time I start it, I need to press "proceed with errors". I have to refactor the class names to smth else and then back again to the original name. that fixes it and takes a lot of time. Am I missing smth here?
From your comments under the question seems like you are using Eclipse or STS. If that is the case then I was experiencing the same problem with older versions of STS or to be more precise with older versions of Groovy-Eclipse plugin.
I think I haven't seen that happening since STS 2.7 (I'm now using STS 2.8 with Groovy-Eclipse 2.6), so try upgrading. It's IDE bug not the Grails problem itself (at least it was in my case).