LottieSharp
LottieSharp copied to clipboard
Object reference not set to an instance of an object
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here. I need to use a json to make a gif , and when i put the control in my page the error " Object reference not set to an instance of an object" appears , my json is ok i have tried it like embedded resources and also content and it's not working, I don't know how to solve this please
You need to set the build action to none, and select "copy to output directory"
I think that if you look closely to the errors, you will see the same error:
The null reference exception comes after the first one so the real error is that the lottie viewer cannot find your .JSON file :
Try to remove the first slash from path:
So it's like this:
And set the properties of the .json file to this: