• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by danteswap · Jan 07, 2015 at 02:55 PM · build-error

Need help regarding : System.Runtime.Serialization.Formatters.Binary;

Hello friends my project successfully run in editor window and also successfully builded for android and pc . But when i try to build it for windows store or windows phone it gives me this error :"GameControl.cs(4,36):error CS0234:the type or namespace name'Formatters'does not exist in the namespace'System.Runtime.Serialization'(are you missing an assembly reference?)"

what to do now ????? link text

gamecontrol.txt (1.3 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Graham-Dunnett · Jan 07, 2015 at 02:59 PM

Read the documentation that Microsoft supply about what c# classes are supported on Windows Store and WP8.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image danteswap · Jan 07, 2015 at 03:14 PM 0
Share

i am reading now thanks for help . will ask if not get it done sir thanks

avatar image danteswap · Jan 07, 2015 at 03:25 PM 0
Share

means that the binary formatter that i am using cant be used in windows store and wp8 because the binary formattor is not supported in silverlight so sir what can i do now what changes should i make so that my data can be safe . is there any free asset available to accomplish that sir or do you you have some ways that i can do that

avatar image adhamBer danteswap · Jan 26, 2016 at 03:26 PM 0
Share

Hello sir!

Did you ever manage to solve this issue? for I have the same problem... my project builds for android but not widows phone and this issue is because of the library "using System.Runtime.Serialization.Formatters.Binary". If now resolved I can not save my game. so please if you found a solution let me know.

avatar image
1

Answer by JoshuaMcKenzie · Jan 26, 2016 at 06:15 PM

after a quick read through the docs its clear that there IS no support for binaryformatter. so a quick simple search lead me to StackOverflow's solution. I've never done this, but you should be able to add the SharpSerializer to the Plugin folder in your Assets and use:

 #if UNITY_WP8 || UNITY_WP8_1 || UNITY_WSA || UNITY_WSA_8_0 || UNITY_WSA_8_1 || UNITY_WSA_10_0
                         //use sharp serializer
 #else
                         //use built-in serializer
 #endif

Or just simply use the Sharp serializer unconditionally

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ben_page · Feb 20, 2016 at 11:21 PM 0
Share

I have downloaded Sharpserializer and put it into the plugin folder. Where should I place this code? In place of "using System.Runtime.Serialization.Formatters.Binary;"? Also, is "UNITY_WP8", "UNITY_WP8_1", etc. naturally identified by Unity? Or do I have to incorporate some other factor?

I know you said you haven't done this before, but I'm totally new to this serializer business and any help would be much appreciated!

Thanks

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers

How can I stop the variable values reverting to its default values after being built? 1 Answer

Windows Store Build does nothing? 0 Answers

no Audio after Build? 0 Answers

Unity iOS Build Bitcode Issue 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges