CMertens / protobuf-net

Automatically exported from code.google.com/p/protobuf-net
Other
0 stars 0 forks source link

precompile.exe can not work. #390

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Please include an chenbin@cyou-inc.com if this might need a dialogue!
==============

What steps will reproduce the problem?
1. precompile.exe -f:AnyMsg.dll -o:Serializer.dll -t:MySerializer
2. after "Adding xxx.xxx..."
 "Compiling MySerializer to Serializer.dll..."
This operation needs access to the protobuf-net.dll used by your library, ....
at 
ProtoBuf.Precompile.PreCompileContext.<>c__DisplayClassf.<Execute>b__a(Object 
sender,ResolveEventArgs args) in c:\Dev\protobuf-net\precompile\Program.cs:line 
301
at IVKM.Reflection.Universe.Load(String refname, Assembly requestingAssembly, 
Boolean thtowOnError)
...
3. I am sure precompile.exe and protobuf-net.dll in same library.

What is the expected output? What do you see instead?
Generate Serializer.dll

What version of the product are you using? On what operating system?
r640 and winxp.

Please provide any additional information below.
I am sorry i can put all error message here, because the company's pc do not 
have internet.

Original issue reported on code.google.com by chenbin0...@gmail.com on 22 Jun 2013 at 11:45

GoogleCodeExporter commented 9 years ago
I am sorry i can not put...

Original comment by chenbin0...@gmail.com on 22 Jun 2013 at 11:47

GoogleCodeExporter commented 9 years ago
K; the way to do this goes as follows:

- precompile.exe uses a special version of protobuf-net.DLL
- your project references different, platform targeted version of 
protobuf-net.DLL

The trick is to keep then separate. For example, put AnyMsg.dll **and** the 
version of protobuf-net.DLL you referenced in one folder, and use something 
like:

Precompile -o:MyAssembly.DLL -t:MySerializer Foo\AnyMsg.DLL

Do **not** copy the version of protobuf-net.DLL from the precompile tool; that 
is *not the same* and will not work

This should fix it.

Original comment by marc.gravell on 22 Jun 2013 at 1:04