Subscribe Now: Feed Icon

Monday, February 14, 2011

Rebuild All failed without any errors (Silverlight)

This is actually a call for help since the only fix I found was restarting Visual Studios, and I don’t like those kind of fixes.

A picture is worth more than mere words:

VS-rebuild-failed-no-errors

As you can see Rebuild All failed but the Error List only contains 10 Warnings, going to the Output window:

========== Rebuild All: 25 succeeded, 5 failed, 0 skipped ==========

But no reference to the errors…

 

The first thing I tried was building the projects until I got to the problematic Project, it was my Silverlight Application project but the weird thing here was:

========== Build: 4 succeeded or up-to-date, 8 failed, 0 skipped ==========

Rebuilding the solution => 5 failed, building a single project inside that solution => 8 failed – WTF? building the projects referenced by that single project and they all pass…

 

The second thing I tried was changing the Build Details: Options->Projects and Solutions->Build and Run->MSBuild project build output verbosity: from Minimal to Normal (I have decided to do it gradually otherwise it’s like drowning in information). Still no errors so I moved it up to Detailed, this time I had some weird entries like this:

Dependency "PostSharp.Public, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7".
    Could not resolve this reference. Could not locate the assembly "PostSharp.Public, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

The weird thing is that non of the projects I am building use PostSharp. But a reference that I am using uses this reference on the server side (not related to the Silverlight build…).

Other references that had the same error were System, mscorlib, System.Windows and WPFToolkit. How can the build not find mscorlib? (I actually found why it didn’t find mscorlib, you can read about it here – has nothing to do with the errors).

 

Restarting Visual Studios fixes the problem the build errors but the Dependencies are still missing… The good thing is I saved the detailed build that failed and compared the files. The first difference was their size the failed was ~0.5MB less. Other differences:

Failed:

Target "GetNativeManifest" skipped. Previously built successfully.
Building with tools version "4.0".
Target "_CheckForInvalidConfigurationAndPlatform" skipped. Previously built successfully.
Target "GetNativeManifest" skipped. Previously built successfully.
Building with tools version "4.0".
Target "_CheckForInvalidConfigurationAndPlatform" skipped. Previously built successfully.
Target "GetNativeManifest" skipped. Previously built successfully.

Passed:

Target "GetNativeManifest" in file "c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets" from project "C:\Projects\MapControl.csproj" (entry point):
Done building target "GetNativeManifest" in project "MapControl.csproj".
Building with tools version "4.0".
Target "_CheckForInvalidConfigurationAndPlatform" skipped. Previously built successfully.
Target "GetNativeManifest" in file "c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets" from project "C:\Projects\PropertiesControl.csproj" (entry point):
Done building target "GetNativeManifest" in project "PropertiesControl.csproj".
Building with tools version "4.0".
Target "_CheckForInvalidConfigurationAndPlatform" skipped. Previously built successfully.
Target "GetNativeManifest" in file "c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets" from project "C:\Projects\Components.csproj" (entry point):
Done building target "GetNativeManifest" in project "Components.csproj".

Some more lines that only appear in passed:

Using "CreateMetadataAssemblyTask" task from assembly "c:\Program Files\Microsoft Visual Studio 10.0\\Common7\IDE\Extensions\Microsoft\RiaTools\Intellisense\Microsoft.VisualStudio.ServiceModel.DomainServices.Intellisense.dll".

Using "CreateRiaClientFilesTask" task from assembly "C:\Program Files\Microsoft SDKs\RIA Services\v1.0\Libraries\Server\Microsoft.ServiceModel.DomainServices.Tools.dll".

Using "UpdateRiaTempPETask" task from assembly "c:\Program Files\Microsoft Visual Studio 10.0\\Common7\IDE\Extensions\Microsoft\RiaTools\Intellisense\Microsoft.VisualStudio.ServiceModel.DomainServices.Intellisense.dll".

Another change, failed:

Task "MSBuild" skipped, due to false condition; ('@(_MSBuildProjectReferenceExistent)' != '' and '$(_GetChildProjectCopyToOutputDirectoryItems)' == 'true' and '%(_MSBuildProjectReferenceExistent.Private)' != 'false' and '$(UseCommonOutputDirectory)' != 'true') was evaluated as ('' != '' and 'true' == 'true' and '' != 'false' and 'false' != 'true').

Passed:

Task "MSBuild"
  Global Properties:
    Configuration=Debug
    Platform=AnyCPU
Building with tools version "4.0".

This change happened twice more with different projects.

 

Not sure what it means, I have my usual suspects though – ESRI and their Silverlight API since that was the last thing I changed in the Silverlight project… and there is also Resharper 6.0 EAP since it throw exceptions (1,2 and 3) every time the build failed (and now after VS restart it is calm). But for all I know it’s Visual Studio that has a lock on a file or something…

 

I just hate not knowing why things are working when I am sure they are not supposed to work.

Well it is not a one time thing, it happened again and my VS memory has reached 900MB (it didn’t even agree to copy the build output – out of memory)… And Resharper has started throwing those exceptions long before the build errors…

Does anyone else had this problem? know why? Please leave a comment…

 

Keywords: Build, Error, Silverlight

IceRocket Tags: ,,