Partial binding information was provided for mstest assembly

I am using the new SimpleMembership infrastructure in .Net.

Unit tests for creating users (using the API - see below) work fine in the Visual Studio 2012 IDE.

WebSecurity.CreateUserAndAccount(entity.UserName, entity.Password, new { });

However, when I run on the build server (using TeamCity), I get the following below.

I tried Dependency Walker with no luck. I also can not imagine how this can be run in x64 - given that VS2012 works in x86.

Any help would be appreciated.

exception thrown:

 System.IO.FileNotFoundException: Could not load file or assembly 'WebMatrix.WebData' or one of its dependencies. The system cannot find the file specified.=== Pre-bind state information === LOG: User = LOG: DisplayName = WebMatrix.WebData (Partial) WRN: Partial binding information was supplied for an assembly: WRN: Assembly Name: WebMatrix.WebData | Domain ID: 2 WRN: A partial bind occurs when only part of the assembly display name is provided. WRN: This might result in the binder loading an incorrect assembly. WRN: It is recommended to provide a fully specified textual identity for the assembly, WRN: that consists of the simple name, version, culture, and public key token. WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue. LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio LOG: Initial PrivatePath = NULL Calling assembly : (Unknown).* 
+4
source share
3 answers

I also came across this and it had nothing to do with MS Test or any structural unit of testing, I really worked in this in a web project where the code will compile fine but breaks when web.config refers to SimpleMembershipProvider. I used the updated NuGet package Microsoft.AspNet.WebPages.WebData, which put WebMatrix.WebData as a link, but could not set CopyLocal = true.

It seems like the solution is to just set CopyLocal = true in the WebMatrix.WebData (and WebMatrix.Data) properties in the project list.

I believe that CopyLocal = false should be explicitly set in the installation of the NuGet script, in which case this is, apparently, the main drawback of the stupid design, and not an error.

+15
source

This seems to be a mistake within the framework. However, the placement has been fixed

WebMatrix.WebData.dll

inside the MsTest directory (C: \ Program Files (x86) \ Microsoft Visual Studio 11.0 \ Common7 \ IDE) on the build server

+1
source

I fixed this error by changing the binding redirection configuration in my web configuration. I installed it incorrectly when updating the nuget package.

To fix, I changed it:

 <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-6.0.4.17603" newVersion="6.0.4.17603" /> </dependentAssembly> 

:

 <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> </dependentAssembly> 
0
source

Source: https://habr.com/ru/post/1444627/


All Articles