Last post Aug 22, 2016 09:51 AM by Yohann Lu
Aug 20, 2016 08:18 PM|hitinderb4u|LINK
I keep getting this error when I add a Entity Data Model to project, which basically is creating a modal for a .mdf file in App_Data folder. It's a WCF project.
I am using VS 2015 community edition and also have Xamarin installed.
I tried to change the .net framework version from 4.5.0 to 4.5.1-2 and 4.6.1, but I keep getting this error. I also installed manually Microsoft.CodeAnalysis package. Tried deleting every thing from packages folder and then restored all the nuget plugin.
But everything thing is a fail for me.
Reference to Microsoft.CodeAnalysis is added and its versions is "18.104.22.168"
What I might be doing wrong here?
Severity Code Description Project File Line Suppression State
Error An Exception was thrown while running the transformation code. The process cannot continue. The following Exception was thrown:
System.IO.FileLoadException: Could not load file or assembly 'Microsoft.CodeAnalysis, Version=22.214.171.124, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Microsoft.CodeAnalysis, Version=126.96.36.199, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at Microsoft.VisualStudio.TextTemplating.CompilerBridge..ctor(String source, Boolean debug, IEnumerable`1 references, String cmdLineArguments)
at Microsoft.VisualStudio.TextTemplating.CompilerBridge.Create(SupportedLanguage language, String source, Boolean debug, IEnumerable`1 references, String cmdLineArguments)
at Microsoft.VisualStudio.TextTemplating.TransformationRunner.Compile(String source, String inputFile, IEnumerable`1 references, Boolean debug, SupportedLanguage language, String compilerOptions)
at Microsoft.VisualStudio.TextTemplating.TransformationRunner.LocateAssembly(Boolean cacheAssemblies, String fullClassName, String source, String inputFile, Boolean debug, SupportedLanguage language, IEnumerable`1 compilerReferences, String compilerOptions)
at Microsoft.VisualStudio.TextTemplating.TransformationRunner.PrepareTransformation(TemplateProcessingSession session, String source, ITextTemplatingEngineHost host)
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.CodeAnalysis, Version=188.8.131.52, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/
LOG: Initial PrivatePath = NULL
Calling assembly : Microsoft.VisualStudio.TextTemplating.14.0, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\xxx\AppData\Local\Microsoft\VisualStudio\14.0\devenv.exe.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: The same bind was seen before, and was failed with hr = 0x80131040. 1
How can I sort this one out? Its been over a day now! :(
Aug 22, 2016 09:51 AM|Yohann Lu|LINK
According to the error message description , the error just means that application during execution can't find an application\third party dll.
You can try the following suggestions.
1: The first check would be to see if there are some problems with the packaging.
You can check the file correctly reference , retry , then rebuilding solution , if can't , check the version of the package , reinstall it or update.
2: It is possible that you reference class library file run depend on other components , you can view needs through use this software(DEPENDS.exe) .