Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

301
Views
No se pudo cargar el archivo o el ensamblaje del proyecto (cuando no se hace referencia a él)

Hay 3 proyectos:

  1. Server - servidor de juegos
  2. Client - cliente del juego
  3. Shared - código compartido entre el Client y el Server

El Server se comunica con Client mediante el envío de instancias de clase serializadas de MessagePack desde Shared . Al intentar deserializar una instancia de clase en el cliente

 var packet = MessagePackSerializer.Deserialize<IPacket>(packetReader.GetRemainingBytesSegment());

se lanza la siguiente excepción:

 MessagePack.MessagePackSerializationException HResult=0x80131500 Message=Failed to deserialize World2D.Shared.Networking.Packets+IPacket value. Source=MessagePack StackTrace: at MessagePack.MessagePackSerializer.Deserialize[T](MessagePackReader& reader, MessagePackSerializerOptions options) at MessagePack.MessagePackSerializer.Deserialize[T](ReadOnlyMemory`1 buffer, MessagePackSerializerOptions options, CancellationToken cancellationToken) at World2D.Client.Networking.NetworkingSystem.<>c.<.ctor>b__2_0(NetPeer peer, NetPacketReader packetReader, DeliveryMethod deliveryMethod) in C:\Users\dclip\Desktop\world2d\client\world2d\src\Networking\NetworkingSystem.cs:line 25 at LiteNetLib.NetManager.ProcessEvent(NetEvent evt) at LiteNetLib.NetManager.PollEvents() at World2D.Client.Networking.NetworkingSystem.Update(GameTime gameTime) in C:\Users\dclip\Desktop\world2d\client\world2d\src\Networking\NetworkingSystem.cs:line 51 at MonoGame.Extended.Entities.World.Update(GameTime gameTime) in C:\Users\dclip\Desktop\world2d\shared\Shared\MonoGame.Extended\MonoGame.Extended.Entities\World.cs:line 89 at World2D.Client.Game1.Update(GameTime gameTime) in C:\Users\dclip\Desktop\world2d\client\world2d\Game1.cs:line 36 at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime) at Microsoft.Xna.Framework.Game.Tick() at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop() at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior) at World2D.Client.Program.Main() in C:\Users\dclip\Desktop\world2d\client\world2d\Program.cs:line 11 Inner Exception 1: FileNotFoundException: Could not load file or assembly 'Server, Version=0.0.1.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

Aunque no estoy haciendo referencia al Server en el código de ninguna manera en el Client (ese es el propósito de Shared ), esta excepción ocurre una y otra vez. Si el servidor se agrega como una dependencia en el Administrador de referencias, todo funciona. ¿Pero por qué?

¿Cuál podría ser la razón? ¿Cuáles son las formas de depurarlo?

 namespace World2D.Shared.Networking { public class Packets { [Union(0, typeof(Entities))] [Union(1, typeof(Entity))] public interface IPacket { [MessagePackObject] public class Entities : IPacket { [Key(0)] public List<MonoGame.Extended.Entities.Entity> entities; [SerializationConstructor] public Entities(List<MonoGame.Extended.Entities.Entity> entities) { this.entities = entities; } } [MessagePackObject] public class Entity : IPacket { [Key(0)] public MonoGame.Extended.Entities.Entity Value { get; set; } [SerializationConstructor] public Entity(MonoGame.Extended.Entities.Entity entity) { Value = entity; } } } } }
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!