Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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 /
  • Help Room /
avatar image
0
Question by abentley · Nov 30, 2017 at 08:17 AM · networkingmultiplayerphotonserver

Photon & Unity Question

Hi guys!

I’ve been struggling with a problem with Photon for the past two weeks now and I could really use some assistance getting this figured out.

I am attempting to learn how to set up a server application using Photon’s OnPremise Server SDK But I am hitting roadblocks right at the start! I am following Photon’s “App From Scratch” tutorial here :

https://doc.photonengine.com/en-us/onpremise/current/app-framework/an-app-from-scratch

But as soon as I create a public class ChatServer that inherits from ApplicationBase (Basically the first step in the tutorial) I get this error message: “Reference to type ‘MarshalByRefObject’ claims it is defined in ‘mscorlib’, but it could not be found”

mscorlib is already referenced by my visual studio by default! I attempted to reference it manually but that failed due to the pre-existing reference. I did, however, find that referencing Visual C++ 2015 UWP Desktop Runtime for Native Apps solves this issue. But that creates a new error telling me to change the targeted CPU but my visual studio won’t let me..

If anyone could please help me and let me know what I’m doing wrong or maybe teach me how to set up a Photon application I would be very grateful!! I’ve been struggling with this for so long and it is extremely frustrating! Thank you all in advance!

Comment
Add comment · Show 5
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 abentley · Nov 30, 2017 at 08:20 AM 0
Share

Or if anyone could point me in the direction of an easier way to set up an authoritative server?

avatar image ChristianSimon abentley · Nov 30, 2017 at 09:47 AM 0
Share

Hi,

Add references to ExitGamesLibs.dll, Photon.SocketServer.dll and PhotonHostRuntimeInterfaces.dll

Did you follow this step? Can you confirm that you inherit from the correct ApplicationBase class provided in one the above mentioned libraries?

avatar image abentley · Nov 30, 2017 at 05:28 PM 0
Share

@ChristianSimon

Yes, I have referenced those dll files from the lib folder of my Photon folder. Also, I am fairly certain that my class does inherit from the correct application base as when I created the class ChatServer, I had Visual Studio implement the using statement. Also, Visual Studio implemented the abstract class almost exactly as it is depicted on the Photon tutorial, so I am fairly certain that the reference is correct.

avatar image abentley · Nov 30, 2017 at 07:50 PM 0
Share

Could the errors lie with the fact that my visual studio is targeting Universal Windows Platform? And how do I fix that?

avatar image ChristianSimon abentley · Dec 05, 2017 at 08:50 AM 0
Share

Yes, you have to create a class library. I honestly don't know if you can simply change this in your existing project but you can try this: inside VS right click on the certain project and select Properties. Inside the opened tab select Application and change the project's Output type to Class Library. Don't forget to save the changes. If it is still not working please try creating a new project / solution and select Visual C# > Class Library (.NET Framework).

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.

Follow this Question

Answers Answers and Comments

192 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 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 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 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 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 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 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 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 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 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 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 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

How to detect server host has left - Host Migration 0 Answers

Instantiate with Photon 0 Answers

Unity Photon doesn't Spawn Player 0 Answers

How do you correctly remove a player that has disconnected from a game when using "OnServerDisconnect" ? 0 Answers

Client Disconnect on Photon Server using MLAPI 0 Answers


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