mercredi 27 juillet 2016

ReflectionTypeLoadException because of build increment

I'm running a post-build script on my main application which increments the build number. Now my project searches for assemblies on startup and loads via reflection an instance of the plugin assembly I created in another project.

The plugin project references the main application. The build order is correct, of course. Nonetheless I get a ReflectionTypeLoadException because the plugin assembly is looking for the application version Build - 1 for some reason.

What is happening here? Since the plugin builds after the main application I assume it is referencing the freshly built version and not some older version. The increment is, like said, happening post-build, thus shouldn't influence anything.

Is this a Visual Studio internal bug or am I doing something wrong? I can't explain myself why this isn't working.





Aucun commentaire:

Enregistrer un commentaire