• 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
Question by eatsleepindie · Nov 26, 2013 at 04:14 PM · errorserverdllsmartfox

Unity3d + SmartFox dll + Windows 8 Store Build produces errors

I am trying to build a Unity program for Windows Store that uses SmartFox Server. I have followed all documentation, to the point that an admin at SmartFox says "I tried the same exact thing and it worked for me, no idea why it doesn't work for you"

As helpful as that was, I figured my best bet would be to turn to Unity Answers... so far I have been unable to stump the community, so here's my last ditch effort before all my plans go down the crapper.

I have a Unity3D project that connects to a local SmartFox server. Everything is setup and running perfectly.. I can build to any platform until I try a Windows Store build. SmartFox comes with two .dll's, one for the editor, and another to load when building for Windows Store. When I try a Win Store build, I get the following error, which doesn't help me diagnose much at all:

Error building Player: Exception: Could not load file or assembly 'file:///C:\\Users\\emoro_000\\Documents\\MyGame\\Temp\\StagingArea\\Data\Managed\\Plugins\\SmartFox2X.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

Here is my post from the smartfox server forum, where I got exactly ZERO help from anyone:

My latest attempt:

Downloaded latest version of the examples and the api.

Imported the "Lobby" example into a new project. Currently using the "Standalone" build settings in Unity.

Changed settings to point to my local smartfox server. Ran the Lobby example (using the API that came with the example, not the latest API) and I connected and logged in to the server (checked my zone monitor on server and it shows me logged in there as well).

Replaced the existing Lobby SmartFox2X.dll file in the lobby program with the latest API version (SmartFox2X_Unity/SmartFox2X.dll from the latest API download)... still logs in without an error.

Created the sub-folder "Metro" under the "Plugins" folder and added the SmartFox2X_Win8/SmartFox2X.dll to it. Directory structure looks like this: Code: Select all - Assets -Plugins -SmartFox2X.dll (main SFS dll file) -Metro -SmartFox2X.dll (Win8 SFS dll file)

Program still tests and logins in Unity Editor (via Standalone build settings).

Now, I swap my build settings to Windows Store. Running a test in Unity Editor, everything connects as expected.

I try to build the program for Windows Store and immediately get the following errors:

Assets\Scripts\LobbyGUI.cs(6,23): error CS0234: The type or namespace name 'Permissions' does not exist in the namespace 'System.Security' (are you missing an assembly reference?)

Assets\Scripts\LobbyGUI.cs(35,10): error CS0246: The type or namespace name 'ArrayList' could not be found (are you missing a using directive or an assembly reference?)

I realize that I cannot use ArrayList for windows store builds, so I comment out any reference to it (seems it's only used for the messages being received anyway, so login should still work). The System.Security error worries me a bit, but I comment out any references to 'System.Security".

Unity Editor shows no errors, and so I hit play again to test... no problems, client connects and lets me login (still in Windows Store Build).

Now, I build the program for Windows Store. I get the following error:

Error building Player: Exception: Could not load file or assembly 'file:///C:\\Users\\emoro_000\\Documents\\MyGame\\Temp\\StagingArea\\Data\Managed\\Plugins\\SmartFox2X.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

Going to "Player Settings" and checking the options for InternetClient, InternetClientServer and PrivateNetworkClientServer doesn't fix anything.

Up to this point I believe I've done everything as outlined in documentation. I was working on this for so long yesterday that I decided to move the Windows Store .dll from "Plugins>Metro" to "Metro>Plugins" and tried again... this allows me to build the project for Windows Store, but when debugging the program won't connect to the smartfox server at all.

Comment

People who like this

0 Show 0
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

0 Replies

· Add your reply
  • Sort: 

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

16 People are following this question.

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

Related Questions

crossdomain.xml Unity 3.0 0 Answers

Unity + SmarFox 2x via Flash export 0 Answers

Segfault in native plugin code, only with Unity 0 Answers

A node in a childnode? 1 Answer

Error launching unity player.Failed to load unity dll. 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