Have you ever seen MSB3113 and MSB3114 errors?

Have you ever seen MSB3113 and MSB3114 errors? No? Me neither until I started using VSTS Tests capability. I created a simple test that targeted an exe assembly and when I was building this test project I started getting plenty of errors like this:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1202,9): error MSB3114: Could not find file ‘DevExpress.BonusSkins.v6.2.dll’ referenced by assembly ‘E:\Visual Studio 2005\Projects\RightHand\TestPath\bin\UITests\AssemblyBeingTested.exe.manifest’.

There was an error line per referenced 3rd party assembly in test project. The weird fact was the all of references were correct.
It must had something to do with ClickOnce deployment since it was mentioning .manifest file but it was unclear what went wrong.
So I started scratching my head and my keyboard: Google yielded nothing on this error, Microsoft Forums also nothing and even Microsoft Feedback Center didn’t know anything about it. All I found was an useless reference to the error in MSDN2 online help. Nothing really helped me.

So I went the usual error troubleshooting way: try to pinpoint the error source. I created a new blank Window Forms project. Then I created a test (by right clicking on Form’s constructor) for Form1’s constructor. VSTS created a test project for me as it usually does. I compiled WinForms project and it was a success. Then I tried compiling test project. It was a success.

Then I created a published ClickOnce deployment for first project. Success. Recompiled test project: this time it was a failure. But instead of MSB3114 error I got a slightly different error:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(2071,9): error MSB3113: Could not find file ‘Microsoft.Windows.CommonLanguageRuntime, Version=2.0.50727.0’.

Hua, it couldn’t find CLR assembly? Weird. Since the error had different signature I retried searching the web and this time I was lucky. I found this description and a workaround in MS’ knowledge base. To make it short: the problem occurs when test project references exe assembly through project file. And the workaround is to reference binary file instead. While not a perfect solution it cures both MSB311x errors. I hope the real fix makes it to VS2005 SP1 though.

Leave a Reply