Pregunta

I am having a simple problem regarding .NET reflector. I have decompiled the assembly manually from .NET Reflector, exported its code and recompiled its code manually from Visual Studio and generated its assembly ( I want few code changes ). Now I want this assembly to be correctly referenced with another main project which have other assemblies decompiled. But problem is , It throws an exception of

"Unable to pick the assembly xxxx VERSION = 1.0.12.4"

Here is the problem. It goes and picks the older version somehow and do not picking the right version ( where I made changes, Even that project is referenced and it has the version now "0.0.0.0"). Basically before making changes in the code, it decompiles it self and generates the cache where it putting all source files. But now I want to make some code changing and seperately want to compile the whole project code and then to reference that project in the main project where other assemblies might be old.

Edit

Manually I don't see any place in Assembly.cs file where I can change the version of an assembly which is referenced inside the project. My problem is that I want to enable Visual Studio to LOAD the assembly version of which it referenced as project. Assembly compiles and drops in the same "Debug" directory. But when EXE Launches it throws exception. BECAUSE it has somewhere sees the assembly with an older version for which it was working previously.

Regards Usman

¿Fue útil?

Solución 2

I detected myself the problem.

I manually recompile that project as well which was it self referencing the old xxx assembly. As it was referencing too to that assembly which was wrongly picked in first phase.

So, in my case the solution was, in short to compile all assemblies (Code ) which are directly or indirectly referencing the assemblies of which old version is being picked up in first case.

Thanks

Otros consejos

Add AssembleVersion attribute to your decompiled assembly

[assembly: AssemblyVersion("1.0.12.4")]

Another option is changing references in other assemblies - you can do it with Reflexil Reflector add-in.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top