This project is read-only.

Build still failing after enabling SkipStrongNames and uninstalling MVC4

Topics: General
Mar 28, 2012 at 7:52 PM

The build is still failing to run the tests for me even after I enabled SkipStrongNames and uninstalled MVC4 through "Programs and Features".

It now shows strong naming exception and MSBuild crashes when trying to run the build.

Here is the build log

Mar 28, 2012 at 8:27 PM

What do you see when you run "sn -Vl" from a VS command line.

Mar 28, 2012 at 8:49 PM

Hi Marcin, here is the strong name log


Mar 28, 2012 at 9:03 PM

That all looks good. If you enable bind failure tracing using fuslogvw.exe can you see anything interesting?

Mar 29, 2012 at 4:37 AM

I ran the fuslogvw.exe and it was showing problems locating xunit.runner.dll.

I downloaded and installed xunit by running the xUnit.Installer.exe, still get the same build errors.

Mar 29, 2012 at 4:39 AM
TerryDenham wrote:

I ran the fuslogvw.exe and it was showing problems locating xunit.runner.dll.

xunit.runner.dll should be installed into packages\xunit.\lib by NuGet package restore. You should not have to install it manually.

Mar 29, 2012 at 5:21 AM

xunit is in packages\xunit.\lib.

Here is what fuslogvw.exe shows :

LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.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: Post-policy reference: xunit.runner.utility, Version=, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/dev/codeplex/aspnetwebstack/bin/Release/test/xunit.runner.utility.DLL.
LOG: Attempting download of new URL file:///C:/dev/codeplex/aspnetwebstack/bin/Release/test/xunit.runner.utility/xunit.runner.utility.DLL.
LOG: Attempting download of new URL file:///C:/dev/codeplex/aspnetwebstack/bin/Release/test/xunit.runner.utility.EXE.
LOG: Attempting download of new URL file:///C:/dev/codeplex/aspnetwebstack/bin/Release/test/xunit.runner.utility/xunit.runner.utility.EXE.
LOG: All probing URLs attempted and failed.
Mar 29, 2012 at 5:27 AM

Here's the first error from the build log.

C:\dev\codeplex\aspnetwebstack\tools\WebStack.xunit.targets(12,9): error : System.Net.Http.Formatting.DataContractJsonMediaTypeFormatterTests.ReadFromStreamAsync_ReadsDataButDoesNotCloseStream: System.MissingMethodException : Method not found: 'System.Threading.Tasks.Task`1<System.Object> System.Net.Http.Formatting.MediaTypeFormatter.ReadFromStreamAsync(System.Type, System.IO.Stream, System.Net.Http.Headers.HttpContentHeaders, System.Net.Http.Formatting.IFormatterLogger)'.

C:\dev\codeplex\aspnetwebstack\tools\WebStack.xunit.targets(12,9): error :    at System.Net.Http.Formatting.MediaTypeFormatterTestBase`1.ReadFromStreamAsync_ReadsDataButDoesNotCloseStream()

Mar 29, 2012 at 6:08 AM

Terry, do you have any of the previous releases of MVC 4 or WebAPI isntalled?

Mar 29, 2012 at 6:34 AM

This is happening due to the source assemblies binding to .Net 4.5/MVC 4 assemblies that are installed in the GAC (this is why you are not seeing any failures in fuslogvw). Even if you uninstalled .net 4.5/mvc4 these assemblies are still hanging around.

You will need to remove them manually from the gac. For example: gacutil /u "System.Web.Mvc, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35". 

Note: if you can't uninstall the assemblies then please read the following blog post (yes, it's almost 10 years old):