cjyyyza / protobuf-net

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

Adding protobuf-enyim to a new VS2012 project results in 'Could not load file or assembly'. #378

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Steps to reproduce:

 - using VS2012 Pro Update 2
 - create a new 4.5 library project
 - add the following NuGet libraries: NUnit 2.6.2, protobuf-net.Enyim 1.0
 - create the following test:

using Enyim.Caching.Memcached;
using NUnit.Framework;
using ProtoBuf.Caching.Enyim;

namespace ClassLibrary1
{
    [TestFixture]
    public class Class1
    {
        [Test]
        public void Test()
        {
            ITranscoder transcoder = new NetTranscoder();
            transcoder.Serialize(new object());
        }
    }
}

Execute the test (Resharper/NUnit GUI/NUnit console - all give the same 
result), which fails with:

System.IO.FileLoadException : Could not load file or assembly 'protobuf-net, 
Version=2.0.0.602, Culture=neutral, PublicKeyToken=257b51d87d2e4d67' or one of 
its dependencies. The located assembly's manifest definition does not match the 
assembly reference. (Exception from HRESULT: 0x80131040)

Expected result: test completes successfully.

Original issue reported on code.google.com by skolima on 17 May 2013 at 5:03

GoogleCodeExporter commented 9 years ago
To add to the issue - by installing the nuget package protobuf-net.Enyim 1.0, 
you automatically install protobuf-net 2.0.0.621 because that's the latest 
nuget package in the repository. Somehow protobuf-net.Enyim explicitly depends 
on protobuf-net 2.0.0.602?

Original comment by sh...@debnath.net on 18 May 2013 at 5:10