Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom tasks from updated assemblies cannot be deserialized #34

Open
xelibrion opened this issue Dec 21, 2012 · 5 comments
Open

Custom tasks from updated assemblies cannot be deserialized #34

xelibrion opened this issue Dec 21, 2012 · 5 comments

Comments

@xelibrion
Copy link

Let's say that I have MyUpdateTask bundled within MySuperApp.exe, v.0.1.
As soon as I release new version of this assembly, updater starts failing as it loads only new version of assembly into AppDomain and not the old one.

System.Runtime.Serialization.SerializationException: Unable to find assembly 'MySuperApp, Version=0.1, Culture=neutral, PublicKeyToken=null'.
   at System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name)
   at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
   at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
   at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, IMethodCallMessage methodCallMessage)
   at NAppUpdate.Framework.Utils.NauIpc.ReadDto(String syncProcessName)
   at NAppUpdate.Updater.AppStart.Main()
@synhershko
Copy link
Owner

Sorry for not responding earlier - stupid GitHub notifications

This can probably be solved by having your custom Task in a separate DLL?

@xelibrion
Copy link
Author

@synhershko yeah, this can be done, but it is just a workaround

@synhershko
Copy link
Owner

What do you propose?

@xelibrion
Copy link
Author

Use less strict serialization format (JSON?) as this problem will appear for newer versions of NAppUpdate as well, as soon as you change assembly version

@xelibrion xelibrion reopened this Feb 7, 2013
@synhershko
Copy link
Owner

This makes sense, yes. Could you provide a Pull Request for that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants