Skip to content

Instantly share code, notes, and snippets.

@Vaccano
Vaccano / EnumerableRewriter.ArgsMatch
Created March 24, 2010 16:20
Observed Call Mismatches
EnumerableRewriter.ArgsMatch(MethodInfo, ReadOnlyCollection`1<Expression>, Type[]) initiated call,
intended callee was RuntimeMethodInfo.GetParameters(),
actually observed callee was Array.Copy(Array, Array, Int32),
and arguments of intended callee don't match actual callee;
did some intermediate methods not get instrumented?
See the help for further information.
--- Stack Trace
at System.Void Microsoft.ExtendedReflection.Interpretation.States.Impl.Frame..ctor(Microsoft.ExtendedReflection.Interpretation.States.IThread thread, Microsoft.ExtendedReflection.Interpretation.States.IFrame prev, System.Int32 frameIndex, Microsoft.ExtendedReflection.Metadata.Method method, System.Boolean& needArguments)
at Microsoft.ExtendedReflection.Interpretation.States.IFrame Microsoft.Pex.Engine.States.EvolvingThread.CreateFrame(Microsoft.ExtendedReflection.Metadata.Method method, Microsoft.ExtendedReflection.Interpretation.States.IFrame previousFrame, System.Int32 frameIndex, System.Boolean& needArguments)
A call to an uninstrumented method was detected:
System.Void System.Object..ctor()
Pex may not be able to generate inputs that cover the called method, and the code following the call.
See the help for further information.
--- Stack Trace
at System.Void Microsoft.Pex.Engine.Coverage.PathCoverageAndConditionBuilder.UninstrumentedCall(System.Int32 codeLabel, Microsoft.ExtendedReflection.Metadata.IMethodSignature signature, Microsoft.ExtendedReflection.Interpretation.Term[] arguments)
at System.Void Microsoft.Pex.Engine.States.EvolvingFrame.EndCall(System.Int32 codeLabel, Microsoft.ExtendedReflection.Interpretation.States.EndCallKind kind)
using System;
namespace TestApp
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Begin");
/*************************************************************************************
* Sample application demonstrating how to register in order to receive power state
* notifications. This particular application wants to display login box upon resume
*
* Author: Alex Feinman (C) 2003
* Contact at: sample_code@alexfeinman.com
*
*************************************************************************************/
using System;
<UserControl x:Class="IsAProgrammer.QuestionAsker"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignHeight="364" d:DesignWidth="470"
DataContext="{Binding QuestionAskerViewModel}">
<Grid x:Name="LayoutRoot" Background="White">
<Grid.ColumnDefinitions>
Moles: processing Mobile.moles - parsing moles file
Moles: processing Mobile.moles - resolving assembly locations
output path: C:\src\ESP-ScanTrack\Mobile\TestUnits
intermediate path: C:\src\ESP-ScanTrack\Mobile\TestUnits\obj\Debug\Moles
moles assembly Mobile.Moles.dll not found
compilation hash file or generated assemblies not found
Moles: processing Mobile.moles - generating mole types and stub types
moles target .net runtime: v2.0.50727
moles target framework version: v3.5
>C:\Program Files\Microsoft Moles\bin\moles.exe C:\src\ESP-ScanTrack\Mobile\TestUnits\obj\Debug\Moles\Mobile.g.vs.moles /disabledeploy /targetframeworkversion:v3.5 /toolsversion:3.5 /diagnostic /verbosity:Noisy /intermediatepath:C:\src\ESP-ScanTrack\Mobile\TestUnits\obj\Debug\Moles /msbuildpath:C:\WINDOWS\Microsoft.NET\Framework\v3.5\msbuild.exe /outputpath:C:\src\ESP-ScanTrack\Mobile\TestUnits
<SettingXml>
<WITSessionCustomSetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Settings />
<WorkItemTypes>
<WorkItemType LeftWorkItemTypeName="Bug" RightWorkItemTypeName="Bug" fieldMap="BugToBug" />
<WorkItemType LeftWorkItemTypeName="Sprint Backlog Item" RightWorkItemTypeName="Task" fieldMap="SBIToTask" />
<WorkItemType LeftWorkItemTypeName="Product Backlog Item" RightWorkItemTypeName="Product Backlog Item" fieldMap="PBIToPBI" />
<WorkItemType LeftWorkItemTypeName="Impediment" RightWorkItemTypeName="Impediment" fieldMap="ImpedimentToImpediment" />
<WorkItemType LeftWorkItemTypeName="Sprint" RightWorkItemTypeName="Sprint" fieldMap="SprintToSprint" />
@Vaccano
Vaccano / Update Property on an Identity Column
Created September 9, 2015 18:29
Update Property on an Identity Column
USE pubs
GO
EXEC sp_configure 'allow update', '1'
RECONFIGURE WITH OVERRIDE
GO
DECLARE @col varchar(128), @table varchar(128)
-- for find identity column (if colstat =1 then identity is on)
<SettingXml>
<WITSessionCustomSetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Settings />
<WorkItemTypes>
<WorkItemType LeftWorkItemTypeName="Bug" RightWorkItemTypeName="Bug" fieldMap="BugToBug" />
<WorkItemType LeftWorkItemTypeName="Sprint Backlog Item" RightWorkItemTypeName="Task" fieldMap="SBIToTask" />
<WorkItemType LeftWorkItemTypeName="Product Backlog Item" RightWorkItemTypeName="Product Backlog Item" fieldMap="PBIToPBI" />
<WorkItemType LeftWorkItemTypeName="Impediment" RightWorkItemTypeName="Impediment" fieldMap="ImpedimentToImpediment" />
<WorkItemType LeftWorkItemTypeName="Sprint" RightWorkItemTypeName="Sprint" fieldMap="SprintToSprint" />
<WorkItemType LeftWorkItemTypeName="Sprint Retrospective" RightWorkItemTypeName="Sprint" fieldMap="RetrospectiveToSprint" />
<?xml version="1.0"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" UniqueId="b1a92dca-0c91-485d-bbb1-461735c7f146" FriendlyName="Framework Prod 4">
<Providers>
<Provider ReferenceName="2f82c6c4-bbee-42fb-b3d0-4799cabcf00e" FriendlyName="TFS 2008 Migration VC Provider" />
<Provider ReferenceName="febc091f-82a2-449e-aed8-133e5896c47a" FriendlyName="TFS 2010 Migration VC Provider" />
<Provider ReferenceName="663a8b36-7852-4750-87fc-d189b0640fc1" FriendlyName="TFS 2008 Migration WIT Provider" />
<Provider ReferenceName="04201d39-6e47-416f-98b2-07f0013f8455" FriendlyName="TFS 2010 Migration WIT Provider" />
</Providers>
<Addins />
<SessionGroup CreationTime="2010-12-21T10:33:19.1-07:00" FriendlyName="Framework Prod 4" SessionGroupGUID="370dc758-a4b7-4c54-80f9-df38933c9c30" Creator="EUR-DOMAIN1\18773" SyncIntervalInSeconds="0" SyncDurationInMinutes="0">