I'm using Microsoft Fakes to shim a couple WindowsAzure components for testing. Following the advice in vs 2012: Shims compile, I updated my .fakes file to just generate the shims I actually need:
<Fakes xmlns="http://schemas.microsoft.com/fakes/2011/" Diagnostic="false">
<Assembly Name="Microsoft.WindowsAzure.Storage" Version="2.1.0.0"/>
<StubGeneration>
<Clear/>
</StubGeneration>
<ShimGeneration>
<Clear/>
<Add FullName="Microsoft.WindowsAzure.Storage.CloudStorageAccount"/>
<Add FullName="Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient"/>
<Add FullName="Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer"/>
<Add FullName="Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob"/>
<Add FullName="Microsoft.WindowsAzure.Storage.Queue.CloudQueueClient"/>
<Add FullName="Microsoft.WindowsAzure.Storage.Queue.CloudQueue"/>
</ShimGeneration>
</Fakes>
But I'm still getting the "Some fakes could not be generated..." warning. All the specified shims are being generated, and commenting any of those above lines out causes my test project to fail to build. If I turn on diagnostics, I see dozens of messages like:
Warning 2 Cannot generate shim for Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient+<>c__DisplayClass1: type is not supported because of internal limitations.
Everything works, I just want to suppress the warning so it stops confusing our CI server. Is there a warning number for the non-diagnostic message I can just stick in the test project to ignore?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…