urasandesu / prig Goto Github PK
View Code? Open in Web Editor NEWPrig is a lightweight framework for test indirections in .NET Framework.
License: Other
Prig is a lightweight framework for test indirections in .NET Framework.
License: Other
In the Stub Setting, the name attribute is explained as the follows:
This attribute is identifier. It's preferable that method's overloads can be recognized. If the method has just one signature, this can make be same as 'alias'.
So, it shall be unique in the method's overloads, but it doesn't have to be unique in the Stub Setting.
Now, I modified the Stub Setting as the follows, and I got unintended results:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
...(snip)...
<prig>
<stubs>
<add name="Constructor" alias="Constructor">
<RuntimeConstructorInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema" z:Id="1" z:FactoryType="MemberInfoSerializationHolder" z:Type="System.Reflection.MemberInfoSerializationHolder" z:Assembly="0" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns="http://schemas.datacontract.org/2004/07/System.Reflection">
<Name z:Id="2" z:Type="System.String" z:Assembly="0" xmlns="">.ctor</Name>
<AssemblyName z:Id="3" z:Type="System.String" z:Assembly="0" xmlns="">ClassLibrary1</AssemblyName>
<ClassName z:Id="4" z:Type="System.String" z:Assembly="0" xmlns="">A`1</ClassName>
<Signature z:Id="5" z:Type="System.String" z:Assembly="0" xmlns="">Void .ctor()</Signature>
<Signature2 z:Id="6" z:Type="System.String" z:Assembly="0" xmlns="">.ctor()</Signature2>
<MemberType z:Id="7" z:Type="System.Int32" z:Assembly="0" xmlns="">1</MemberType>
<GenericArguments i:nil="true" xmlns="" />
</RuntimeConstructorInfo>
</add>
<add name="Constructor" alias="Constructor">
<RuntimeConstructorInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema" z:Id="1" z:FactoryType="MemberInfoSerializationHolder" z:Type="System.Reflection.MemberInfoSerializationHolder" z:Assembly="0" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns="http://schemas.datacontract.org/2004/07/System.Reflection">
<Name z:Id="2" z:Type="System.String" z:Assembly="0" xmlns="">.ctor</Name>
<AssemblyName z:Id="3" z:Type="System.String" z:Assembly="0" xmlns="">ClassLibrary1</AssemblyName>
<ClassName z:Id="4" z:Type="System.String" z:Assembly="0" xmlns="">B`1</ClassName>
<Signature z:Id="5" z:Type="System.String" z:Assembly="0" xmlns="">Void .ctor()</Signature>
<Signature2 z:Id="6" z:Type="System.String" z:Assembly="0" xmlns="">.ctor()</Signature2>
<MemberType z:Id="7" z:Type="System.Int32" z:Assembly="0" xmlns="">1</MemberType>
<GenericArguments i:nil="true" xmlns="" />
</RuntimeConstructorInfo>
</add>
</stubs>
</prig>
</configuration>
This Stub Setting can only generate one stub. The expected is that two stubs are generated, because each method has just one overload.
In .NET 3.5, the test that contains dynamic methods was freezed, because the assembly Anonymously Hosted DynamicMethods Assembly
can't be resolved.
As Profiling Overview, dynamically generated code is "Unsupported Functionality", so the assembly should be ignored.
In README, there is the description that Prig supports Visual Studio 2013 Express for Windows Desktop or more, but we no longer get it. So, Prig should support Visual Studio 2015.
We no longer need install.ps1 for NuGet by the following reason:
Currently, this script isn't harmful, but it is unnecessary process.
Get-IndirectionStubSetting
generates invalid alias for indirection stub settings against the member that implements an interface explicitly.
When it is executed against the following class, :
public interface IFoo
{
void Execute(int arg1);
}
public sealed class Foo : IFoo
{
void IFoo.Execute(int arg1)
{
throw new NotImplementedException();
}
}
the following indirection stub setting is generated:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="prig" type="Urasandesu.Prig.Framework.PilotStubberConfiguration.PrigSection, Urasandesu.Prig.Framework" />
</configSections>
<prig>
<stubs>
<add name="SealedMockingMigration.IFoo.ExecuteInt32" alias="SealedMockingMigration.IFoo.ExecuteInt32">
<RuntimeMethodInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema" z:Id="1" z:FactoryType="MemberInfoSerializationHolder" z:Type="System.Reflection.MemberInfoSerializationHolder" z:Assembly="0" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns="http://schemas.datacontract.org/2004/07/System.Reflection">
<Name z:Id="2" z:Type="System.String" z:Assembly="0" xmlns="">SealedMockingMigration.IFoo.Execute</Name>
<AssemblyName z:Id="3" z:Type="System.String" z:Assembly="0" xmlns="">SealedMockingMigration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</AssemblyName>
<ClassName z:Id="4" z:Type="System.String" z:Assembly="0" xmlns="">SealedMockingMigration.Foo</ClassName>
<Signature z:Id="5" z:Type="System.String" z:Assembly="0" xmlns="">Void SealedMockingMigration.IFoo.Execute(Int32)</Signature>
<Signature2 z:Id="6" z:Type="System.String" z:Assembly="0" xmlns="">System.Void SealedMockingMigration.IFoo.Execute(System.Int32)</Signature2>
<MemberType z:Id="7" z:Type="System.Int32" z:Assembly="0" xmlns="">8</MemberType>
<GenericArguments i:nil="true" xmlns="" />
</RuntimeMethodInfo>
</add>
</stubs>
</prig>
</configuration>
This can't build successfully, because it has invalid alias name SealedMockingMigration.IFoo.ExecuteInt32
.
I have a method with this signature:
protected int ExecuteNonQuery(String commandText, CommandType commandType, DbParameter[] parameters)
CommandType
is in the System.Data namespace, and DbParameter
is in the System.Data.Common namespace.
When I attempt to generate a stub, I get this stub:
<add name="ExecuteNonQueryStringCommandTypeDbParameterArray" alias="ExecuteNonQueryStringCommandTypeDbParameterArray"> <RuntimeMethodInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema" z:Id="1" z:FactoryType="MemberInfoSerializationHolder" z:Type="System.Reflection.MemberInfoSerializationHolder" z:Assembly="0" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns="http://schemas.datacontract.org/2004/07/System.Reflection"> <Name z:Id="2" z:Type="System.String" z:Assembly="0" xmlns="">ExecuteNonQuery</Name> <AssemblyName z:Id="3" z:Type="System.String" z:Assembly="0" xmlns="">Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</AssemblyName> <ClassName z:Id="4" z:Type="System.String" z:Assembly="0" xmlns="">Common.Repository.AbstractSqlRepository</ClassName> <Signature z:Id="5" z:Type="System.String" z:Assembly="0" xmlns="">Int32 ExecuteNonQuery(System.String, System.Data.CommandType, System.Data.Common.DbParameter[])</Signature> <Signature2 z:Id="6" z:Type="System.String" z:Assembly="0" xmlns="">System.Int32 ExecuteNonQuery(System.String, System.Data.CommandType, System.Data.Common.DbParameter[])</Signature2> <MemberType z:Id="7" z:Type="System.Int32" z:Assembly="0" xmlns="">8</MemberType> <GenericArguments i:nil="true" xmlns="" /> </RuntimeMethodInfo> </add>
The code file is generated for the stub, but I get this Type for the IndirectionFunc:
public IndirectionFunc<Common.Repository.AbstractSqlRepository, System.String, System.Data.CommandType, DbParameter[], System.Int32> Body
(Common.Repository.AbstractSqlRepository
is my class.)
If you notice, all of the parameters have the full namespace listed, with the exception of the DbParameter[]
type. I'm wondering if it has something to do with the fact that the command type is an array? The System.Data.Common using
statement isn't there in the file, either.
Prig v2.0.0-alpha01 can no longer install from Chocolatey because NuGet.exe isn't contained from the version v0.9.9. To install Prig, we have to add NuGet source for the NuGet package to use Prig management commands in the Package Manager Console.
Against the method that has signature of the appearance of some nested types, Prig can't create the indirection stub. For example, the following setting could not work well:
public class Foo
{
public int Echo(int arg1)
{
return arg1;
}
public delegate void EchoEventHandler(bool echoed);
public event EchoEventHandler OnEchoCallback;
}
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="prig" type="Urasandesu.Prig.Framework.PilotStubberConfiguration.PrigSection, Urasandesu.Prig.Framework" />
</configSections>
<prig>
<stubs>
<add name="Echo" alias="Echo">
<RuntimeMethodInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema" z:Id="1" z:FactoryType="MemberInfoSerializationHolder" z:Type="System.Reflection.MemberInfoSerializationHolder" z:Assembly="0" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns="http://schemas.datacontract.org/2004/07/System.Reflection">
<Name z:Id="2" z:Type="System.String" z:Assembly="0" xmlns="">Echo</Name>
<AssemblyName z:Id="3" z:Type="System.String" z:Assembly="0" xmlns="">ConsoleApplication1</AssemblyName>
<ClassName z:Id="4" z:Type="System.String" z:Assembly="0" xmlns="">Foo</ClassName>
<Signature z:Id="5" z:Type="System.String" z:Assembly="0" xmlns="">Int32 Echo(Int32)</Signature>
<Signature2 z:Id="6" z:Type="System.String" z:Assembly="0" xmlns="">System.Int32 Echo(System.Int32)</Signature2>
<MemberType z:Id="7" z:Type="System.Int32" z:Assembly="0" xmlns="">8</MemberType>
<GenericArguments i:nil="true" xmlns="" />
</RuntimeMethodInfo>
</add>
<add name="AddOnEchoCallback" alias="AddOnEchoCallback">
<RuntimeMethodInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema" z:Id="1" z:FactoryType="MemberInfoSerializationHolder" z:Type="System.Reflection.MemberInfoSerializationHolder" z:Assembly="0" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns="http://schemas.datacontract.org/2004/07/System.Reflection">
<Name z:Id="2" z:Type="System.String" z:Assembly="0" xmlns="">add_OnEchoCallback</Name>
<AssemblyName z:Id="3" z:Type="System.String" z:Assembly="0" xmlns="">ConsoleApplication1</AssemblyName>
<ClassName z:Id="4" z:Type="System.String" z:Assembly="0" xmlns="">Foo</ClassName>
<Signature z:Id="5" z:Type="System.String" z:Assembly="0" xmlns="">Void add_OnEchoCallback(EchoEventHandler)</Signature>
<Signature2 z:Id="6" z:Type="System.String" z:Assembly="0" xmlns="">System.Void add_OnEchoCallback(Foo+EchoEventHandler)</Signature2>
<MemberType z:Id="7" z:Type="System.Int32" z:Assembly="0" xmlns="">8</MemberType>
<GenericArguments i:nil="true" xmlns="" />
</RuntimeMethodInfo>
</add>
</stubs>
</prig>
</configuration>
It should be able to call indirectly the same as another method.
In Prig v0.0.0-alpha8, when making the indirection stub settings like the following class, build errors occurred:
internal class FooInternal
{
public void DoIt()
{
throw new NotImplementedException();
}
}
It seems that the signature of the method DoIt
is public seemingly. However, it requires implicit this
parameter. The type of this
is FooInternal
, so the member's signature is non-public in fact.
Prig should avoid to make the indirection stub of such member automatically.
At Prig v0.0.0-alpha8, Find-IndirectionTarget
returns the members that can't call indirectly. For example, abstract members, members of the base type and so on.
I suggest that the command should filter them by default if it has already known that.
In 0.0.0-alpha10, the following method that has a default parameter and the stub setting can't be built:
namespace ConsoleApplication55
{
public class Foo
{
public int Echo(int arg0 = 42)
{
return arg0;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="prig" type="Urasandesu.Prig.Framework.PilotStubberConfiguration.PrigSection, Urasandesu.Prig.Framework" />
</configSections>
<prig>
<stubs>
<add name="EchoInt32" alias="EchoInt32">
<RuntimeMethodInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema" z:Id="1" z:FactoryType="MemberInfoSerializationHolder" z:Type="System.Reflection.MemberInfoSerializationHolder" z:Assembly="0" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns="http://schemas.datacontract.org/2004/07/System.Reflection">
<Name z:Id="2" z:Type="System.String" z:Assembly="0" xmlns="">Echo</Name>
<AssemblyName z:Id="3" z:Type="System.String" z:Assembly="0" xmlns="">ConsoleApplication55, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</AssemblyName>
<ClassName z:Id="4" z:Type="System.String" z:Assembly="0" xmlns="">ConsoleApplication55.Foo</ClassName>
<Signature z:Id="5" z:Type="System.String" z:Assembly="0" xmlns="">Int32 Echo(Int32)</Signature>
<Signature2 z:Id="6" z:Type="System.String" z:Assembly="0" xmlns="">System.Int32 Echo(System.Int32)</Signature2>
<MemberType z:Id="7" z:Type="System.Int32" z:Assembly="0" xmlns="">8</MemberType>
<GenericArguments i:nil="true" xmlns="" />
</RuntimeMethodInfo>
</add>
</stubs>
</prig>
</configuration>
The generated stub is as follows(It seems that Urasandesu.Prig.Framework.PilotStubberConfiguration.IndirectionStub.IndirectionDelegate
is always null):
...(snip)...
public class PFoo : PFooBase
{
...(snip)...
[EditorBrowsable(EditorBrowsableState.Never)]
public class zzEchoInt32 : IBehaviorPreparable
{
public Body // This is invalid!!
{
get
{
var holder = LooseCrossDomainAccessor.GetOrRegister<IndirectionHolder<>>(); // This is invalid!!
return holder.GetOrDefault(Info);
}
set
{
var holder = LooseCrossDomainAccessor.GetOrRegister<IndirectionHolder<>>(); // This is invalid!!
if (value == null)
{
holder.Remove(Info);
}
else
{
holder.AddOrUpdate(Info, value);
RuntimeHelpers.PrepareDelegate(Body);
}
}
}
...(snip)...
In the Prig v0.0.0-alpha4, the command prig -p ConsoleApplication1.exe
went dead.
When running the command, I got the following error message:
PM > prig -p ConsoleApplication1.exe
prig.exe : Throw location unknown (consider using BOOST_THROW_EXCEPTION)
発生場所 C:\Users\User\Documents\Visual Studio 2013\Projects\ConsoleApplication1\packages\Prig.0.0.0-alpha4\tools\Urasandesu.Prig\Urasandesu\Prig\NuGet.Invoke-Prig.ps1:85 文字:17
+ & $prig run -process $Process -arguments $Arguments
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Throw location ...HROW_EXCEPTION):String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Dynamic exception type: class boost::exception_detail::clone_impl<struct boost::exception_detail::error_info_injector<class boost::program_options::invalid_command_line_syntax> >
std::exception::what: the required argument for option '--arguments' is missing
PM >
I seem that its cause is the side-effect by Issue #7.
This is because the csproj file does an include *.cs. I think the solution should be to delete old files before regenerating files.
Good project. Please add donate button somewhere.
In v0.0.0-alpha10, Prig became always generating the indirection stubs. Because Prig had become available to generate the indirection setting against an internal type without limitation. But now, if I create the stub setting for an internal type, the stub exposes the internal type in the method SetTargetInstanceBody
/RemoveTargetInstanceBody
.
This makes cause occurring build errors if I don't apply InternalsVisibleToAttribute
.
I tried to create the indirection stub of System.Net.WebClient.DownloadStringTaskAsync(System.String)
, but it wasn't created.
In the build log, there was an error as below:
1>------ ビルド開始: プロジェクト:ConsoleApplication23, 構成:Debug Any CPU ------
1>2014/09/13 19:32:43 にビルドを開始しました。
1>PreBuildEvent:
1> cmd /c " "%VS120COMNTOOLS%VsDevCmd.bat" & %windir%\system32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -NoProfile -File "c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication23\packages\Prig.0.0.0-alpha7\tools\Invoke-PilotStubber.ps1" -ReferenceFrom "@('c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication23\packages\Prig.0.0.0-alpha7\lib\net40\Urasandesu.NAnonym.dll','c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication23\packages\Prig.0.0.0-alpha7\lib\net40\Urasandesu.Prig.Framework.dll')" -AssemblyFrom "C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll" -TargetFrameworkVersion v4.5.1 -KeyFile "c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication23\packages\Prig.0.0.0-alpha7\tools\Urasandesu.Prig.snk" -OutputPath "c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication23\ConsoleApplication23\bin\Debug\." -Settings "c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication23\ConsoleApplication23\System.prig" "
1> "1" 個の引数を指定して "GetSection" を呼び出し中に例外が発生しました: "prig のための構成セクション ハンドラーを作成中にエラーが発生しました。: メンバー 'DownloadStringTaskAsync' を取得できません。 (c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication23\ConsoleApplication23\System.prig line 39)"
1> 発生場所 C:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication23\packages\Prig.0.0.0-alpha7\tools\Invoke-PilotStubber.ps1:120 文字: 1
1> + $section = $config.GetSection("prig")
1> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1> + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
1> + FullyQualifiedErrorId : ConfigurationErrorsException
1>
At the time, the indirection setting is as below:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="prig" type="Urasandesu.Prig.Framework.PilotStubberConfiguration.PrigSection, Urasandesu.Prig.Framework" />
</configSections>
<prig>
<stubs>
<add name="DownloadStringTaskAsyncString" alias="DownloadStringTaskAsyncString">
<RuntimeMethodInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema" z:Id="1" z:FactoryType="MemberInfoSerializationHolder" z:Type="System.Reflection.MemberInfoSerializationHolder" z:Assembly="0" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns="http://schemas.datacontract.org/2004/07/System.Reflection">
<Name z:Id="2" z:Type="System.String" z:Assembly="0" xmlns="">DownloadStringTaskAsync</Name>
<AssemblyName z:Id="3" z:Type="System.String" z:Assembly="0" xmlns="">System</AssemblyName>
<ClassName z:Id="4" z:Type="System.String" z:Assembly="0" xmlns="">System.Net.WebClient</ClassName>
<Signature z:Id="5" z:Type="System.String" z:Assembly="0" xmlns="">System.Threading.Tasks.Task`1[System.String] DownloadStringTaskAsync(System.String)</Signature>
<Signature2 z:Id="6" z:Type="System.String" z:Assembly="0" xmlns="">System.Threading.Tasks.Task`1[[System.String, mscorlib</Signature2>
<MemberType z:Id="7" z:Type="System.Int32" z:Assembly="0" xmlns="">8</MemberType>
<GenericArguments i:nil="true" xmlns="" />
</RuntimeMethodInfo>
</add>
</stubs>
</prig>
</configuration>
It seems that the content of the tag Signature2
is broken.
Add-PrigAssembly command doesn't work against multiple assemblies. For example, I ran the following commands:
PM> Add-PrigAssembly -Assembly "mscorlib, Version=4.0.0.0"
PM> Add-PrigAssembly -Assembly "System, Version=4.0.0.0"
In this case, the 2nd command didn't work.
your readme https://github.com/urasandesu/Prig/blob/master/README.md uses PDateTime which is not anywhere in the scope - this is your custom class i believe... - https://gist.github.com/urasandesu/8751367
having that, what is the meaning of example???:
[Test]
public void IsNowLunchBreak_should_return_false_when_11_oclock() {
// IndirectionsContext
can minimize the influence of the API replacement.
using (new IndirectionsContext())
{
// Arrange
// Replace DateTime.Now
body. Hereafter, DateTime.Now
will return only 2013/12/13 11:00:00
.
PDateTime.NowGet().Body = () => new DateTime(2013, 12, 13, 11, 00, 00);
// Act
var result = LifeInfo.IsNowLunchBreak();
// Assert
Assert.IsFalse(result);
}
}
In Prig 0.0.0-alpha8, when I used Nested Type in indirection stub, I got some build errors. The trial code is the followings:
using System;
namespace ConsoleApplication38
{
public class Foo
{
public class Bar
{
public int Echo(int arg0)
{
return arg0;
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="prig" type="Urasandesu.Prig.Framework.PilotStubberConfiguration.PrigSection, Urasandesu.Prig.Framework" />
</configSections>
<prig>
<stubs>
<add name="EchoInt32" alias="EchoInt32">
<RuntimeMethodInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema" z:Id="1" z:FactoryType="MemberInfoSerializationHolder" z:Type="System.Reflection.MemberInfoSerializationHolder" z:Assembly="0" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns="http://schemas.datacontract.org/2004/07/System.Reflection">
<Name z:Id="2" z:Type="System.String" z:Assembly="0" xmlns="">Echo</Name>
<AssemblyName z:Id="3" z:Type="System.String" z:Assembly="0" xmlns="">ConsoleApplication38, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</AssemblyName>
<ClassName z:Id="4" z:Type="System.String" z:Assembly="0" xmlns="">ConsoleApplication38.Foo+Bar</ClassName>
<Signature z:Id="5" z:Type="System.String" z:Assembly="0" xmlns="">Int32 Echo(Int32)</Signature>
<Signature2 z:Id="6" z:Type="System.String" z:Assembly="0" xmlns="">System.Int32 Echo(System.Int32)</Signature2>
<MemberType z:Id="7" z:Type="System.Int32" z:Assembly="0" xmlns="">8</MemberType>
<GenericArguments i:nil="true" xmlns="" />
</RuntimeMethodInfo>
</add>
</stubs>
</prig>
</configuration>
The build errors are followings:
1>------ ビルド開始: プロジェクト:ConsoleApplication38, 構成:Debug Any CPU ------
1>2014/09/19 19:39:22 にビルドを開始しました。
1>PreBuildEvent:
1> cmd /c " "%VS120COMNTOOLS%VsDevCmd.bat" & %windir%\system32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -NoProfile -File "C:\Users\Akira\Documents\Visual Studio 2013\Projects\ConsoleApplication38\packages\Prig.0.0.0-alpha8\tools\Invoke-PilotStubber.ps1" -ReferenceFrom "@('C:\Users\Akira\Documents\Visual Studio 2013\Projects\ConsoleApplication38\packages\Prig.0.0.0-alpha8\lib\net40\Urasandesu.NAnonym.dll','C:\Users\Akira\Documents\Visual Studio 2013\Projects\ConsoleApplication38\packages\Prig.0.0.0-alpha8\lib\net40\Urasandesu.Prig.Framework.dll')" -AssemblyFrom "C:\Users\Akira\Documents\visual studio 2013\Projects\ConsoleApplication38\ConsoleApplication38\bin\Debug\ConsoleApplication38.exe" -TargetFrameworkVersion v4.5.1 -KeyFile "C:\Users\Akira\Documents\Visual Studio 2013\Projects\ConsoleApplication38\packages\Prig.0.0.0-alpha8\tools\Urasandesu.Prig.snk" -OutputPath "C:\Users\Akira\Documents\Visual Studio 2013\Projects\ConsoleApplication38\ConsoleApplication38\bin\Debug\." -Settings "C:\Users\Akira\Documents\Visual Studio 2013\Projects\ConsoleApplication38\ConsoleApplication38\ConsoleApplication38.v4.0.30319.v1.0.0.0.prig" "
1> Microsoft (R) Build Engine バージョン 12.0.30723.0
1> [Microsoft .NET Framework、バージョン 4.0.30319.34014]
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> 2014/09/19 19:39:25 にビルドを開始しました。
1> ノード 1 上のプロジェクト "C:\Users\Akira\Documents\Visual Studio 2013\Projects\ConsoleApplication38\ConsoleApplication38\ConsoleApplication38.v4.0.30319.v1.0.0.0.MSIL.Prig\ConsoleApplication38.Prig.g.csproj" (rebuild ターゲット)。
1> CoreClean:
1> ディレクトリ "obj\Debug\" を作成しています。
1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3270: 構築されているプロジェクトのプロセッサ アーキテクチャ "MSIL" と、参照 "mscorlib" のプロセッサ アーキテクチャ "x86" の間には不一致がありました。この不一致は、ランタイム エラーを発生させる可能性があります。プロジェクトと参照の間でプロセッサ アーキテクチャが一致するように、構成マネージャーを使用してターゲットとするプロジェクトのプロセッサ アーキテクチャを変更するか、ターゲットとするプロジェクトのプロセッサ アーキテクチャに一致するプロジェクト アーキテクチャとの依存関係を参照で設定することを検討してください。 [C:\Users\Akira\Documents\Visual Studio 2013\Projects\ConsoleApplication38\ConsoleApplication38\ConsoleApplication38.v4.0.30319.v1.0.0.0.MSIL.Prig\ConsoleApplication38.Prig.g.csproj]
1> GenerateTargetFrameworkMonikerAttribute:
1> すべての出力ファイルが入力ファイルに対して最新なので、ターゲット "GenerateTargetFrameworkMonikerAttribute" を省略します。
1> CoreCompile:
1> C:\Program Files (x86)\MSBuild\12.0\bin\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /platform:AnyCPU /define:_M_MSIL;_NET_4_5_1 /highentropyva+ /reference:"C:\Users\Akira\Documents\visual studio 2013\Projects\ConsoleApplication38\ConsoleApplication38\bin\Debug\ConsoleApplication38.exe" /reference:C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Core.dll" /reference:C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll /reference:C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Urasandesu.NAnonym\v4.0_0.2.0.0__ce9e95b04334d5fb\Urasandesu.NAnonym.dll /reference:C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Urasandesu.Prig.Framework\v4.0_0.1.0.0__acabb3ef0ebf69ce\Urasandesu.Prig.Framework.dll /debug:pdbonly /filealign:512 /optimize+ /out:obj\Debug\ConsoleApplication38.v4.0.30319.v1.0.0.0.MSIL.Prig.dll /subsystemversion:6.00 /target:library /utf8output AutoGen\Tokens.g.cs ConsoleApplication38\PBar.cs ConsoleApplication38\PProxyBar.cs "C:\Users\Akira\AppData\Local\Temp\.NETFramework,Version=v4.5.1.AssemblyAttributes.cs"
1>C:\Users\Akira\Documents\Visual Studio 2013\Projects\ConsoleApplication38\ConsoleApplication38\ConsoleApplication38\PBar.cs(62,49): error CS0246: 型または名前空間名 'Bar' が見つかりませんでした。using ディレクティブまたはアセンブリ参照が不足しています。 [C:\Users\Akira\Documents\Visual Studio 2013\Projects\ConsoleApplication38\ConsoleApplication38\ConsoleApplication38.v4.0.30319.v1.0.0.0.MSIL.Prig\ConsoleApplication38.Prig.g.csproj]
1>C:\Users\Akira\Documents\Visual Studio 2013\Projects\ConsoleApplication38\ConsoleApplication38\ConsoleApplication38\PBar.cs(90,52): error CS0246: 型または名前空間名 'Bar' が見つかりませんでした。using ディレクティブまたはアセンブリ参照が不足しています。 [C:\Users\Akira\Documents\Visual Studio 2013\Projects\ConsoleApplication38\ConsoleApplication38\ConsoleApplication38.v4.0.30319.v1.0.0.0.MSIL.Prig\ConsoleApplication38.Prig.g.csproj]
1> プロジェクト "C:\Users\Akira\Documents\Visual Studio 2013\Projects\ConsoleApplication38\ConsoleApplication38\ConsoleApplication38.v4.0.30319.v1.0.0.0.MSIL.Prig\ConsoleApplication38.Prig.g.csproj" (rebuild ターゲット) のビルドが終了しました -- 失敗。
1>
1> ビルドに失敗しました。
1>
...(snip)...
I checked PBar.cs(62,49) to see what is cause for the errors:
...(snip)...
public IndirectionInfo Info
{
get
{
var info = new IndirectionInfo();
info.AssemblyName = "ConsoleApplication38, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null";
info.Token = TokenOfEchoInt32;
return info;
}
}
internal void SetTargetInstanceBody(Bar /* !?!?!? */ target, IndirectionFunc<ConsoleApplication38.Foo.Bar, System.Int32, System.Int32> value)
{
RuntimeHelpers.PrepareDelegate(value);
...(snip)...
It seems that Bar
should be specified its full name.
In v1.0.0, I got the following error when I added the indirection settings for all members of System.DateTime
:
2014/12/29 11:20:29.273988,ERROR,00000x21a0,1683,0x00001e0c," C:\Users\Akira\Prig\Swathe\Urasandesu.Swathe\Urasandesu/Swathe/Metadata/BaseClassPimpl/BaseInstructionMetadataPimpl.hpp(427): Throw in function unsigned long __cdecl Urasandesu::Swathe::Metadata::BaseClassPimpl::BaseInstructionMetadataPimpl<struct Urasandesu::Swathe::AutoGen::Metadata::DefaultClassPimplApiHolder::DefaultInstructionMetadataPimplApiHolder>::TakeInlineToken(const class Urasandesu::Swathe::Metadata::BaseClassPimpl::BaseInstructionMetadataPimpl<struct Urasandesu::Swathe::AutoGen::Metadata::DefaultClassPimplApiHolder::DefaultInstructionMetadataPimplApiHolder> *,const unsigned char *,const unsigned char *,class boost::variant<struct boost::blank,bool,unsigned char,double,short,int,__int64,struct Urasandesu::Swathe::Metadata::ILocal const *,struct Urasandesu::Swathe::Metadata::Signature const *,struct Urasandesu::Swathe::Metadata::IField const *,struct Urasandesu::Swathe::Metadata::IMethod const *,char,float,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >,struct Urasandesu::Swathe::Metadata::IType const *,class Urasandesu::Swathe::Metadata::Label,class std::vector<int,class std::allocator<int> >,class std::vector<class Urasandesu::Swathe::Metadata::Label,class std::allocator<class Urasandesu::Swathe::Metadata::Label> >,struct boost::detail::variant::void_,struct boost::detail::variant::void_> &)
Dynamic exception type: class boost::exception_detail::clone_impl<struct Urasandesu::CppAnonym::CppAnonymNotImplementedException>
std::exception::what: mdtTarget: 0x04002BF9
[struct Urasandesu::CppAnonym::tag_stack_trace * __ptr64] = at Urasandesu::CppAnonym::CppAnonymNotImplementedException::CppAnonymNotImplementedException in C:\Users\Akira\Documents\Visual Studio 2013\Projects\VariationTest\Test03\packages\Prig.1.1.0\tools\x64\Urasandesu.Prig.dll(c:\users\akira\prig\cppanonym\urasandesu.cppanonym\urasandesu\cppanonym\cppanonymnotimplementedexception.cpp:54)
at Urasandesu::Swathe::Metadata::BaseClassPimpl::BaseInstructionMetadataPimpl<Urasandesu::Swathe::AutoGen::Metadata::DefaultClassPimplApiHolder::DefaultInstructionMetadataPimplApiHolder>::TakeInlineToken in C:\Users\Akira\Documents\Visual Studio 2013\Projects\VariationTest\Test03\packages\Prig.1.1.0\tools\x64\Urasandesu.Prig.dll(c:\users\akira\prig\swathe\urasandesu.swathe\urasandesu\swathe\metadata\baseclasspimpl\baseinstructionmetadatapimpl.hpp:427)
at Urasandesu::Swathe::Metadata::BaseClassPimpl::BaseInstructionMetadataPimpl<Urasandesu::Swathe::AutoGen::Metadata::DefaultClassPimplApiHolder::DefaultInstructionMetadataPimplApiHolder>::TakeRawData in C:\Users\Akira\Documents\Visual Studio 2013\Projects\VariationTest\Test03\packages\Prig.1.1.0\tools\x64\Urasandesu.Prig.dll(c:\users\akira\prig\swathe\urasandesu.swathe\urasandesu\swathe\metadata\baseclasspimpl\baseinstructionmetadatapimpl.hpp:242)
at Urasandesu::Swathe::Metadata::BaseClassPimpl::BaseMethodBodyMetadataPimpl<Urasandesu::Swathe::AutoGen::Metadata::DefaultClassPimplApiHolder::DefaultMethodBodyMetadataPimplApiHolder>::GetInstructions in C:\Users\Akira\Documents\Visual Studio 2013\Projects\VariationTest\Test03\packages\Prig.1.1.0\tools\x64\Urasandesu.Prig.dll(c:\users\akira\prig\swathe\urasandesu.swathe\urasandesu\swathe\metadata\baseclasspimpl\basemethodbodymetadatapimpl.hpp:153)
at Urasandesu::Swathe::Metadata::BaseClass::BaseMethodBodyMetadata<Urasandesu::Swathe::AutoGen::Metadata::DefaultClassApiHolder::DefaultMethodBodyMetadataApiHolder>::GetInstructions in C:\Users\Akira\Documents\Visual Studio 2013\Projects\VariationTest\Test03\packages\Prig.1.1.0\tools\x64\Urasandesu.Prig.dll(c:\users\akira\prig\swathe\urasandesu.swathe\urasandesu\swathe\metadata\baseclass\basemethodbodymetadata.hpp:101)
at Urasandesu::Swathe::Metadata::BaseClassPimpl::BaseMethodBodyGeneratorPimpl<Urasandesu::Swathe::AutoGen::Metadata::DefaultClassPimplApiHolder::DefaultMethodBodyGeneratorPimplApiHolder>::GetInstructions in C:\Users\Akira\Documents\Visual Studio 2013\Projects\VariationTest\Test03\packages\Prig.1.1.0\tools\x64\Urasandesu.Prig.dll(c:\users\akira\prig\swathe\urasandesu.swathe\urasandesu\swathe\metadata\baseclasspimpl\basemethodbodygeneratorpimpl.hpp:192)
at Urasandesu::Swathe::Metadata::BaseClass::BaseMethodBodyGenerator<Urasandesu::Swathe::AutoGen::Metadata::DefaultClassApiHolder::DefaultMethodBodyGeneratorApiHolder>::GetInstructions in C:\Users\Akira\Documents\Visual Studio 2013\Projects\VariationTest\Test03\packages\Prig.1.1.0\tools\x64\Urasandesu.Prig.dll(c:\users\akira\prig\swathe\urasandesu.swathe\urasandesu\swathe\metadata\baseclass\basemethodbodygenerator.hpp:102)
at CWeaverDetail::CWeaverImpl::JITCompilationStartedCore in C:\Users\Akira\Documents\Visual Studio 2013\Projects\VariationTest\Test03\packages\Prig.1.1.0\tools\x64\Urasandesu.Prig.dll(c:\users\akira\prig\urasandesu.prig\weaver.cpp:444)
at Urasandesu::Swathe::Profiling::ICorProfilerCallbackImpl<ICorProfilerCallback5>::JITCompilationStarted in C:\Users\Akira\Documents\Visual Studio 2013\Projects\VariationTest\Test03\packages\Prig.1.1.0\tools\x64\Urasandesu.Prig.dll(c:\users\akira\prig\swathe\urasandesu.swathe\urasandesu\swathe\profiling\icorprofilercallbackimpl.h:274)
at SetProfToEEInterface in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscordbc.dll
at CertCreateAuthenticodeLicense in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at PreBindAssembly in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at IEE in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at IEE in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at PreBindAssembly in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CertCreateAuthenticodeLicense in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at NGenCreateNGenWorker in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at GetMetaDataInternalInterface in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at InitializeFusion in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at PreBindAssembly in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CreateAssemblyNameObject in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at PreBindAssembly in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at PreBindAssembly in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at PreBindAssembly in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CreateAssemblyNameObject in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at <Unknown Symbol> in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorjit.dll
at <Unknown Symbol> in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorjit.dll
at <Unknown Symbol> in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorjit.dll
at <Unknown Symbol> in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorjit.dll
at <Unknown Symbol> in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorjit.dll
at <Unknown Symbol> in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorjit.dll
at CreateAssemblyNameObject in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CreateAssemblyNameObject in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CreateAssemblyNameObject in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at PreBindAssembly in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at CompareAssemblyIdentity in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at IEE in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
at <Unknown Symbol> in <Unknown Module>
at <Unknown Symbol> in <Unknown Module>
","C:\Users\Akira\Prig\Swathe\Urasandesu.Swathe\Urasandesu/Swathe/Profiling/ICorProfilerCallbackImpl.h",274,"long __cdecl CWeaverDetail::CWeaverImpl::JITCompilationStartedCore(unsigned __int64,int)=>Weaver.cpp,360","pModProf.IsPersisted()=>Weaver.cpp,377","(result = prigData.m_indirectables.find(mdt)) != prigData.m_indirectables.end()=>Weaver.cpp,419","Modifying method=>Weaver.cpp,425"
It seems that the case that the metadata token fielddef
comes in as an operand of the opcode ldtoken
is not implemented.
Currently, Add-PrigAssembly
make the absolute path of the replacement target assembly. However, this behavior will break the build if the committed *.csproj
is carried another environment.
It should reduce such environmental-dependence by using a reference path for example.
I'm running Windows 7 64 bit, as local admin.
I attempted the Quick Tour in both Visual Studio Professional 2012 and Visual Studio Express 2013 for Desktop, and got the same error in the PM console when attempting to add the stub settings (after first installing prig via the PM console) via Add-PrigAssembly -Assembly "mscorlib, Version=4.0.0.0"
[full dump below],
(my actual username has been replaced with {username}
)
I find the error C:\Users\{username}\documents\visual studio 2013\Projects\PrigTest1\packages\Prig.0.0.0-alpha9\tools\prig.exe
to be interesting, since the .exe
does exist, but is located at either
C:\Users\{username}\documents\visual studio 2013\Projects\PrigTest1\packages\Prig.0.0.0-alpha9\tools\x64\prig.exe
(x64 sub-dir)
or
C:\Users\{username}\documents\visual studio 2013\Projects\PrigTest1\packages\Prig.0.0.0-alpha9\tools\x86\prig.exe
(x86 sub-dir)
Array assignment to [AnyCPU|true] failed: The value "" is not of type "System.Collections.Generic.List`1[System.Reflection.ProcessorArchitecture]" and cannot be used in this generic collection.
Parameter name: value.
At C:\Users\{username}\documents\visual studio 2013\Projects\PrigTest1\packages\Prig.0.0.0-alpha9\tools\Urasandesu.Prig\Urasandesu\Prig\NuGet.Add-PrigAssembly.ps1:74 char:30
+ $platformTargets[ <<<< $conditionedProperty] = New-Object 'System.Collections.Generic.List[System.Reflection.ProcessorArchitecture]'
+ CategoryInfo : InvalidOperation: (AnyCPU|true:String) [], RuntimeException
+ FullyQualifiedErrorId : ArrayAssignmentFailed
You cannot call a method on a null-valued expression.
At C:\Users\{username}\documents\visual studio 2013\Projects\PrigTest1\packages\Prig.0.0.0-alpha9\tools\Urasandesu.Prig\Urasandesu\Prig\NuGet.Add-PrigAssembly.ps1:78 char:55
+ $platformTargets[$conditionedProperty].Add <<<< ($1stCandidateArch)
+ CategoryInfo : InvalidOperation: (Add:String) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At C:\Users\{username}\documents\visual studio 2013\Projects\PrigTest1\packages\Prig.0.0.0-alpha9\tools\Urasandesu.Prig\Urasandesu\Prig\NuGet.Add-PrigAssembly.ps1:79 char:55
+ $platformTargets[$conditionedProperty].Add <<<< ('MSIL')
+ CategoryInfo : InvalidOperation: (Add:String) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Array assignment to [AnyCPU|false] failed: The value "" is not of type "System.Collections.Generic.List`1[System.Reflection.ProcessorArchitecture]" and cannot be used in this generic collection.
Parameter name: value.
At C:\Users\{username}\documents\visual studio 2013\Projects\PrigTest1\packages\Prig.0.0.0-alpha9\tools\Urasandesu.Prig\Urasandesu\Prig\NuGet.Add-PrigAssembly.ps1:74 char:30
+ $platformTargets[ <<<< $conditionedProperty] = New-Object 'System.Collections.Generic.List[System.Reflection.ProcessorArchitecture]'
+ CategoryInfo : InvalidOperation: (AnyCPU|false:String) [], RuntimeException
+ FullyQualifiedErrorId : ArrayAssignmentFailed
You cannot call a method on a null-valued expression.
At C:\Users\{username}\documents\visual studio 2013\Projects\PrigTest1\packages\Prig.0.0.0-alpha9\tools\Urasandesu.Prig\Urasandesu\Prig\NuGet.Add-PrigAssembly.ps1:78 char:55
+ $platformTargets[$conditionedProperty].Add <<<< ($1stCandidateArch)
+ CategoryInfo : InvalidOperation: (Add:String) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At C:\Users\{username}\documents\visual studio 2013\Projects\PrigTest1\packages\Prig.0.0.0-alpha9\tools\Urasandesu.Prig\Urasandesu\Prig\NuGet.Add-PrigAssembly.ps1:79 char:55
+ $platformTargets[$conditionedProperty].Add <<<< ('MSIL')
+ CategoryInfo : InvalidOperation: (Add:String) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Array assignment to [x64] failed: The value "" is not of type "System.Collections.Generic.List`1[System.Reflection.ProcessorArchitecture]" and cannot be used in this generic collection.
Parameter name: value.
At C:\Users\{username}\documents\visual studio 2013\Projects\PrigTest1\packages\Prig.0.0.0-alpha9\tools\Urasandesu.Prig\Urasandesu\Prig\NuGet.Add-PrigAssembly.ps1:74 char:30
+ $platformTargets[ <<<< $conditionedProperty] = New-Object 'System.Collections.Generic.List[System.Reflection.ProcessorArchitecture]'
+ CategoryInfo : InvalidOperation: (x64:String) [], RuntimeException
+ FullyQualifiedErrorId : ArrayAssignmentFailed
You cannot call a method on a null-valued expression.
At C:\Users\{username}\documents\visual studio 2013\Projects\PrigTest1\packages\Prig.0.0.0-alpha9\tools\Urasandesu.Prig\Urasandesu\Prig\NuGet.Add-PrigAssembly.ps1:78 char:55
+ $platformTargets[$conditionedProperty].Add <<<< ($1stCandidateArch)
+ CategoryInfo : InvalidOperation: (Add:String) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At C:\Users\{username}\documents\visual studio 2013\Projects\PrigTest1\packages\Prig.0.0.0-alpha9\tools\Urasandesu.Prig\Urasandesu\Prig\NuGet.Add-PrigAssembly.ps1:79 char:55
+ $platformTargets[$conditionedProperty].Add <<<< ('MSIL')
+ CategoryInfo : InvalidOperation: (Add:String) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
The term 'C:\Users\{username}\documents\visual studio 2013\Projects\PrigTest1\packages\Prig.0.0.0-alpha9\tools\prig.exe' is not recognized as the name of a cmdlet, function, script file, or operable progra
m. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\{username}\documents\visual studio 2013\Projects\PrigTest1\packages\Prig.0.0.0-alpha9\tools\Urasandesu.Prig\Urasandesu\Prig\NuGet.Invoke-Prig.ps1:92 char:18
+ & <<<< $prig dasm -assembly $Assembly
+ CategoryInfo : ObjectNotFound: (C:\Users\pauluk...\tools\prig.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
You cannot call a method on a null-valued expression.
At C:\Users\{username}\documents\visual studio 2013\Projects\PrigTest1\packages\Prig.0.0.0-alpha9\tools\Urasandesu.Prig\Urasandesu\Prig\NuGet.Add-PrigAssembly.ps1:121 char:42
+ $result.psobject.TypeNames.Insert <<<< (0, $AssemblyNameExTypeName)
+ CategoryInfo : InvalidOperation: (Insert:String) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Cannot index into a null array.
At C:\Users\{username}\documents\visual studio 2013\Projects\PrigTest1\packages\Prig.0.0.0-alpha9\tools\Urasandesu.Prig\Urasandesu\Prig\NuGet.Add-PrigAssembly.ps1:108 char:53
+ SetStubSettingNoneItem $curMsbProj $actualNames[ <<<< 0] $envProj.FullName
+ CategoryInfo : InvalidOperation: (0:Int32) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
This issue is a cause of the combination of issues. The original issue is reported at Issues 22 comment-58711535.
Comment-Based Help should be added to the following commands at least, because they are directly used by developer:
Add-PrigAssembly
(alias: PAdd
)Find-IndirectionTarget
(alias: PFind
)Get-IndirectionStubSetting
(alias: PGet
)Invoke-Prig
(alias: prig
)As this notice indicates, Chocolatey has a very large backlog of packages in moderation queue. So, probably we can't release like how we think it will --- Also, currently I have not heard anything the moderation status of the package that I submitted 12 days ago... 😧
Therefore, we should minimize the dependency to Chocolatey and take back the control for our releases. We are planning the following enhancements to achieve that:
NuGet.CommandLine
NuGet.exe
up.prig install TestWindow ...
By implementing the above, VSIX will be available as an independent installer(This means we can publish it in Visual Studio Gallery). Almost operations that Chocolatey did to install will be unnecessary.
We have an older service we had some unit tests with ms fake that worked that we are trying to convert the test to prig but it crashes vstest.executionengine. what is the best way to debug the issue?
The issue is reproducible every time with this class (it has some static properties/fields that we are trying to mock out but for the sake of argument I set these all to null in the System Under Test and did not stub any methods but it still crashes when running any test (even just new Service()) with the prig test adapter is enabled.
Here is information from the dump.
Dump File: vstest.executionengine.exe.26884.dmp : C:\Users\wege\AppData\Local\CrashDumps\vstest.executionengine.exe.26884.dmp
Last Write Time: 4/3/2015 12:26:03 AM
Process Name: vstest.executionengine.exe : C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\Common7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\vstest.executionengine.exe
Process Architecture: x64
Exception Code: 0xC0000005
Exception Information: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
Heap Information: Present
OS Version: 6.1.7601
CLR Version(s): 4.5.27.0
Module Name Module Path Module Version
vstest.executionengine.exe C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\Common7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\vstest.executionengine.exe 12.0.30501.0
ntdll.dll C:\Windows\System32\ntdll.dll 6.1.7601.18247
mscoree.dll C:\Windows\System32\mscoree.dll 4.0.40305.0
kernel32.dll C:\Windows\System32\kernel32.dll 6.1.7601.18409
KERNELBASE.dll C:\Windows\System32\KERNELBASE.dll 6.1.7601.18409
sxwmon64.dll C:\Windows\System32\sxwmon64.dll 4.5.2710.0
user32.dll C:\Windows\System32\user32.dll 6.1.7601.17514
gdi32.dll C:\Windows\System32\gdi32.dll 6.1.7601.18577
lpk.dll C:\Windows\System32\lpk.dll 6.1.7601.18177
usp10.dll C:\Windows\System32\usp10.dll 1.626.7601.18454
msvcrt.dll C:\Windows\System32\msvcrt.dll 7.0.7601.17744
advapi32.dll C:\Windows\System32\advapi32.dll 6.1.7601.18247
sechost.dll C:\Windows\System32\sechost.dll 6.1.7600.16385
rpcrt4.dll C:\Windows\System32\rpcrt4.dll 6.1.7601.18532
shell32.dll C:\Windows\System32\shell32.dll 6.1.7601.18429
shlwapi.dll C:\Windows\System32\shlwapi.dll 6.1.7601.17514
ole32.dll C:\Windows\System32\ole32.dll 6.1.7601.17514
oleaut32.dll C:\Windows\System32\oleaut32.dll 6.1.7601.18640
imm32.dll C:\Windows\System32\imm32.dll 6.1.7600.16385
msctf.dll C:\Windows\System32\msctf.dll 6.1.7600.16385
DAinit.dll C:\Windows\System32\DAinit.dll 7.0.0.36
vmwsci.dll C:\Windows\System32\vmwsci.dll 5.3.2.24325
psapi.dll C:\Windows\System32\psapi.dll 6.1.7600.16385
mscoreei.dll C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll 4.5.27.0
clr.dll C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll 4.5.27.0
MSVCR120_CLR0400.dll C:\Windows\System32\MSVCR120_CLR0400.dll 12.0.52242.36242
Urasandesu.Prig.dll C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha03\tools\x64\Urasandesu.Prig.dll 0.1.0.0
dbghelp.dll C:\Windows\System32\dbghelp.dll 6.1.7601.17514
msvcp120.dll C:\Windows\System32\msvcp120.dll 12.0.21005.1
msvcr120.dll C:\Windows\System32\msvcr120.dll 12.0.21005.1
version.dll C:\Windows\System32\version.dll 6.1.7600.16385
fusion.dll C:\Windows\Microsoft.NET\Framework64\v4.0.30319\fusion.dll 4.5.27.0
cryptsp.dll C:\Windows\System32\cryptsp.dll 6.1.7600.16385
rsaenh.dll C:\Windows\System32\rsaenh.dll 6.1.7600.16385
CRYPTBASE.dll C:\Windows\System32\CRYPTBASE.dll 6.1.7600.16385
clrjit.dll C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrjit.dll 4.5.27.0
nlssorting.dll C:\Windows\Microsoft.NET\Framework64\v4.0.30319\nlssorting.dll 4.5.27.0
System.Transactions.dll C:\Windows\Microsoft.Net\assembly\GAC_64\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll 4.5.27.0
pcwum.dll C:\Windows\System32\pcwum.dll 6.1.7600.16385
bcrypt.dll C:\Windows\System32\bcrypt.dll 6.1.7600.16385
secur32.dll C:\Windows\System32\secur32.dll 6.1.7601.18779
sspicli.dll C:\Windows\System32\sspicli.dll 6.1.7601.18779
credssp.dll C:\Windows\System32\credssp.dll 6.1.7601.18779
msv1_0.dll C:\Windows\System32\msv1_0.dll 6.1.7601.18779
cryptdll.dll C:\Windows\System32\cryptdll.dll 6.1.7600.16385
System.Data.dll C:\Windows\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll 4.5.27.0
ws2_32.dll C:\Windows\System32\ws2_32.dll 6.1.7601.17514
nsi.dll C:\Windows\System32\nsi.dll 6.1.7600.16385
crypt32.dll C:\Windows\System32\crypt32.dll 6.1.7601.18277
msasn1.dll C:\Windows\System32\msasn1.dll 6.1.7601.17514
diasymreader.dll C:\Windows\Microsoft.NET\Framework64\v4.0.30319\diasymreader.dll 12.0.52242.36242
RpcRtRemote.dll C:\Windows\System32\RpcRtRemote.dll 6.1.7601.17514
clbcatq.dll C:\Windows\System32\clbcatq.dll 2001.12.8530.16385
uxtheme.dll C:\Windows\System32\uxtheme.dll 6.1.7600.16385
urlmon.dll C:\Windows\System32\urlmon.dll 11.0.9600.17496
api-ms-win-downlevel-ole32-l1-1-0.dll C:\Windows\System32\api-ms-win-downlevel-ole32-l1-1-0.dll 6.2.9200.16492
api-ms-win-downlevel-shlwapi-l1-1-0.dll C:\Windows\System32\api-ms-win-downlevel-shlwapi-l1-1-0.dll 6.2.9200.16492
api-ms-win-downlevel-advapi32-l1-1-0.dll C:\Windows\System32\api-ms-win-downlevel-advapi32-l1-1-0.dll 6.2.9200.16492
api-ms-win-downlevel-user32-l1-1-0.dll C:\Windows\System32\api-ms-win-downlevel-user32-l1-1-0.dll 6.2.9200.16492
api-ms-win-downlevel-version-l1-1-0.dll C:\Windows\System32\api-ms-win-downlevel-version-l1-1-0.dll 6.2.9200.16492
api-ms-win-downlevel-normaliz-l1-1-0.dll C:\Windows\System32\api-ms-win-downlevel-normaliz-l1-1-0.dll 6.2.9200.16492
normaliz.dll C:\Windows\System32\normaliz.dll 6.1.7600.16385
iertutil.dll C:\Windows\System32\iertutil.dll 11.0.9600.17496
wininet.dll C:\Windows\System32\wininet.dll 11.0.9600.17496
userenv.dll C:\Windows\System32\userenv.dll 6.1.7601.17514
profapi.dll C:\Windows\System32\profapi.dll 6.1.7600.16385
api-ms-win-downlevel-advapi32-l2-1-0.dll C:\Windows\System32\api-ms-win-downlevel-advapi32-l2-1-0.dll 6.2.9200.16492
v1.1.1 is showing as the latest. When will 2.0.0 be added?
I am having an issue debugging unit tests that are using prig. It causes my visual studio to crash.
Any ideas?
Problem signature:
Problem Event Name: APPCRASH
Application Name: devenv.exe
Application Version: 12.0.31101.0
Application Timestamp: 54548724
Fault Module Name: ntdll.dll
Fault Module Version: 6.1.7601.18798
Fault Module Timestamp: 5507b3e0
Exception Code: c00000fd
Exception Offset: 0002e04e
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 1033
Additional Information 1: 1b65
Additional Information 2: 1b65fd2bc837c3f68ac38b42e645b825
Additional Information 3: f0db
Additional Information 4: f0db8f09d56e5f792e4047923c985d44
I hope I am not being too annoying :(
Currently, when I upgrade the prig package I have to manually change the pre build steps to point to the correct folder/scripts because the version is in the folder name. I think a good solution would be to use a symlink to the current version.
The Prig framework managed assemblies Urasandesu.NAnonym
, Urasandesu.Prig.Framework
should be private(They shouldn't be in GAC). If we don't do that, unintended assembly neutralization is occurred by the test execution engine of Visual Studio, and also an internal error of .NET runtime - e.g. Exception Code: 0xc0000005 - is occurred.
The entry point of the test execution engine is marked by LoaderOptimizationAttribute
with LoaderOptimization.MultiDomainHost
. This acts to load the assemblies that are in GAC to the neutral domain if available.
When assemblies are loaded to the neutral domain, their JIT results are shared and static field is validated every accessing time. This is problem for Prig, because the core utility class LooseCrossDomainAccessor
is promised that any static fields is validated only once in their domain.
The only way to prohibit loading assemblies to the neutral domain is to make the assemblies private.
My test was freezed when I ported a MS Mole's sample to Prig's:
using System;
using System.Net;
namespace UntestableLibrary
{
public class ULWebClient
{
public static void ShowGoogle()
{
var client = new WebClient();
client.DownloadStringCompleted += (sender, e) =>
{
Console.WriteLine(e.Result);
};
client.DownloadStringAsync(new Uri("http://google.co.jp/"));
}
}
}
using UntestableLibrary;
using Moq;
using NUnit.Framework;
using System;
using System.Net;
using System.Net.Prig;
using System.Prig;
using Urasandesu.NAnonym;
using Urasandesu.NAnonym.Mixins.System;
using Urasandesu.Prig.Framework;
namespace UntestableLibraryTest
{
[TestFixture]
public class ULWebClientTest
{
[Test]
public void ShowGoogle_should_write_response_from_google_to_standard_output()
{
using (new IndirectionsContext())
{
// Arrange
var handler = default(DownloadStringCompletedEventHandler);
handler = (sender, e) => { };
PWebClient.AddDownloadStringCompleted.Body = (@this, value) => handler += value;
PWebClient.RemoveDownloadStringCompleted.Body = (@this, value) => handler -= value;
PWebClient.DownloadStringAsyncUri.Body = (@this, address) =>
{
var e = new PDownloadStringCompletedEventArgsProxy() { ResultGet = () => "google!modoki" };
handler(@this, e);
};
var mockWriteLine = new Mock<IndirectionAction<string>>();
mockWriteLine.Setup(_ => _(It.IsAny<string>()));
PConsole.WriteLine_string.Body = mockWriteLine.Object;
// Act
ULWebClient.ShowGoogle();
// Assert
mockWriteLine.Verify(_ => _(It.Is<string>(s => s == "google!modoki")), Times.Once());
}
}
}
class PDownloadStringCompletedEventArgsProxy
{
static readonly Type Type = typeof(DownloadStringCompletedEventArgs);
class ConstructorDelegate
{
public static readonly Work New = Type.GetConstructorDelegate(new Type[] { typeof(string), typeof(Exception), typeof(bool), typeof(object) });
}
DownloadStringCompletedEventArgs m_target;
public PDownloadStringCompletedEventArgsProxy()
{
m_target = (DownloadStringCompletedEventArgs)ConstructorDelegate.New(new object[] { null, null, false, null });
}
IndirectionFunc<string> m_resultGet;
public IndirectionFunc<string> ResultGet
{
set
{
PDownloadStringCompletedEventArgs.ResultGet.Body = @this =>
{
if (object.ReferenceEquals(@this, m_target))
return m_resultGet();
else
return IndirectionsContext.ExecuteOriginal(() => @this.Result);
};
m_resultGet = value;
}
}
public static implicit operator DownloadStringCompletedEventArgs(PDownloadStringCompletedEventArgsProxy @this)
{
return @this.m_target;
}
}
}
I seem that it can't resolve a generic MemberRef method like Interlocked.CompareExchange<T>(T, T, T)
.
I'm following the walkthrough to get my project using Prig. It's a .Net 4.5.1 unit test, and I'm using Visual Studio 2015. When I right-click on References for the test project and click Add Prig Assembly for mscorlib, I get this message:
What should I do about this?
In this commit, I have almost done the work to support three or more out/ref parameters. However, when I started writing the sample for it, I understood that the sample is very difficult to explain thereafter. Because I think it is strongly linked to the business domain like the API that is described in Issue #31. Also, I know such API in my business, but it isn't open to the public.
In generally, I believe the almost cases that developers are inconvenienced against three or more out/ref parameter are when they made the thin wrapper for P/Invoke. However, if I explain the sample to replace such thin wrapper, people probably will have the question as below in next to no time: "Why don't you replace the P/Invoke method directly?" 😈
For your information, JustMock has this feature.
When I added Prig assembly for 3rd party library, I got the following build error:
CS0234: The type or namespace name 'ComponentModel' does not exist in the namespace 'System' (are you missing an assembly reference?) [C:\Users\User\Documents\Visual Studio 2013\Projects\ConsoleApplication1\ConsoleApplication1Test\UntestableLibrary.v4.0.30319.v1.0.0.0.MSIL.Prig\UntestableLibrary.Prig.g.csproj]
I seem that UntestableLibrary.Prig.g.csproj
doesn't have the assembly references other than Urasandesu.NAnonym
, Urasandesu.Prig.Framework
and stubbing assembly. The csproj file is here:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputType>Library</OutputType>
<RootNamespace>UntestableLibrary.Prig</RootNamespace>
<FileAlignment>512</FileAlignment>
<SignAssembly>False</SignAssembly>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
<OutputPath>C:\Users\User\Documents\Visual Studio 2013\Projects\ConsoleApplication1\ConsoleApplication1Test\bin\Debug\.</OutputPath>
<DefineConstants>_M_MSIL;_NET_4</DefineConstants>
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<AssemblyName>UntestableLibrary.v4.0.30319.v1.0.0.0.MSIL.Prig</AssemblyName>
</PropertyGroup>
<ItemGroup>
<Reference Include="Urasandesu.NAnonym">
<HintPath>C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Urasandesu.NAnonym\v4.0_0.2.0.0__ce9e95b04334d5fb\Urasandesu.NAnonym.dll</HintPath>
</Reference>
<Reference Include="Urasandesu.Prig.Framework">
<HintPath>C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Urasandesu.Prig.Framework\v4.0_0.1.0.0__acabb3ef0ebf69ce\Urasandesu.Prig.Framework.dll</HintPath>
</Reference>
<Reference Include="UntestableLibrary">
<HintPath>C:\Users\User\Documents\Visual Studio 2013\Projects\ConsoleApplication1\Library\UntestableLibrary.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="**/*.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Shouldn't it rather also have references for <stubbing assembly>.GetReferencedAssemblies()
?
When I was porting JustMock's samples to Prig, I got the following exception:
System.TypeLoadException: Could not load type 'Invalid_Token.0x0100040E' from assembly 'StaticMockingSample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
It seems that the exception is occurred when detouring the multiple assemblies that are loaded in the same AppDomain. For your information, this issue is NOT occurred when detouring mscorlib
and another assembly. Because mscorlib
is domain neutral, so it gives the appearance that another AppDomain from the testing program.
In v1.0.0, the tests that use the indirection stub sometimes fail. For example, it outputs the following log:
C:\Users\Akira\Prig\Test.program1\bin\Debug(.NET 3.5)\x64>"..\..\..\..\Release\x64\prig.exe" run -process "C:\Program Files (x86)\NUnit 2.6.3\bin\nunit-console.exe" -arguments "Test.program1.dll /domain=None /run:Test.program1.MyLibrary.LifeInfoTest"
NUnit-Console version 2.6.3.13283
Copyright (C) 2002-2012 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.
Runtime Environment -
OS Version: Microsoft Windows NT 6.2.9200.0
CLR Version: 2.0.50727.8009 ( Net 3.5 )
ProcessModel: Default DomainUsage: None
Execution Runtime: net-3.5
Selected test(s): Test.program1.MyLibrary.LifeInfoTest
....................F..........
Tests run: 30, Errors: 1, Failures: 0, Inconclusive: 0, Time: 2.03592993619678 seconds
Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
Errors and Failures:
1) Test Error : Test.program1.MyLibrary.LifeInfoTest.IsTodayHoliday_should_consider_a_set_day_and_the_previous_day_as_holiday(11/21/2013 00:00:00,Thursday)
System.InvalidOperationException : T(Urasandesu.Prig.Framework.IndirectionHolder`1[Urasandesu.Prig.Framework.IndirectionAction`2[System.Collections.Generic.List`1[System.Reflection.RuntimeFieldInfo],System.Reflection.RuntimeFieldInfo]]) has not been registered yet. Please call Register method.
場所 Urasandesu.Prig.Framework.LooseCrossDomainAccessor`1.get_Holder()
場所 Urasandesu.Prig.Framework.LooseCrossDomainAccessor.GetOrRegister[T]()
場所 Urasandesu.Prig.Framework.LooseCrossDomainAccessor.TryGet[T](T& holder)
場所 System.Collections.Generic.List`1.Add(T item)
場所 System.RuntimeType.RuntimeTypeCache.MemberInfoCache`1.PopulateRtFields(Filter filter, Int32** ppFieldHandles, Int32 count, RuntimeTypeHandle declaringTypeHandle, List`1 list)
場所 System.RuntimeType.RuntimeTypeCache.MemberInfoCache`1.PopulateRtFields(Filter filter, RuntimeTypeHandle declaringTypeHandle, List`1 list)
場所 System.RuntimeType.RuntimeTypeCache.MemberInfoCache`1.PopulateFields(Filter filter)
場所 System.RuntimeType.RuntimeTypeCache.MemberInfoCache`1.Populate(String name, MemberListType listType, CacheType cacheType)
場所 System.RuntimeType.RuntimeTypeCache.MemberInfoCache`1.GetMemberList(MemberListType listType, String name, CacheType cacheType)
場所 System.RuntimeType.RuntimeTypeCache.GetMemberList[T](MemberInfoCache`1& m_cache, MemberListType listType, String name, CacheType cacheType)
場所 System.RuntimeType.RuntimeTypeCache.GetFieldList(MemberListType listType, String name)
場所 System.RuntimeType.GetFieldCandidates(String name, BindingFlags bindingAttr, Boolean allowPrefixLookup)
場所 System.RuntimeType.GetFields(BindingFlags bindingAttr)
場所 System.Enum.GetValueField(Type type)
場所 System.Enum.ToString()
場所 System.String.Concat(Object arg0, Object arg1)
場所 NUnit.Core.TestMethod.RunTest()
場所 NUnit.Core.NUnitTestMethod.RunTest()
場所 NUnit.Core.TestMethod.RunRepeatedTest()
場所 NUnit.Core.TestMethod.RunTestInContext()
C:\Users\Akira\Prig\Test.program1\bin\Debug(.NET 3.5)\x64>
Also, it sometimes outpus the following log in another case:
C:\Users\Akira\Prig\Test.program1\bin\Debug(.NET 3.5)\x64>"..\..\..\..\Release\x64\prig.exe" run -process "C:\Program Files (x86)\NUnit 2.6.3\bin\nunit-console.exe" -arguments "Test.program1.dll /domain=None /run:Test.program1.MyLibrary.LifeInfoTest"
NUnit-Console version 2.6.3.13283
Copyright (C) 2002-2012 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.
Runtime Environment -
OS Version: Microsoft Windows NT 6.2.9200.0
CLR Version: 2.0.50727.8009 ( Net 3.5 )
ProcessModel: Default DomainUsage: None
Execution Runtime: net-3.5
Selected test(s): Test.program1.MyLibrary.LifeInfoTest
.....................F.........
Tests run: 30, Errors: 1, Failures: 0, Inconclusive: 0, Time: 2.02487413261262 seconds
Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
Errors and Failures:
1) Test Error : Test.program1.MyLibrary.LifeInfoTest.IsTodayHoliday_should_consider_a_set_day_and_the_previous_day_as_holiday(11/22/2013 00:00:00,Thursday)
System.InvalidOperationException : T(Urasandesu.Prig.Framework.IndirectionHolder`1[Urasandesu.Prig.Framework.IndirectionFunc`3[System.String,System.DayOfWeek,System.DayOfWeek]]) has not been registered yet. Please call Register method.
場所 Urasandesu.Prig.Framework.LooseCrossDomainAccessor`1.get_Holder()
場所 Urasandesu.Prig.Framework.LooseCrossDomainAccessor.GetOrRegister[T]()
場所 UntestableLibrary.Prig.PULConfigurationManager.zzGetPropertyOfTStringT`1.set_Body(IndirectionFunc`3 value) 場所 c:\Users\Akira\Prig\Test.program1\UntestableLibrary.v2.0.50727.v1.0.0.0.MSIL.Prig\UntestableLibrary\PULConfigurationManager.g.cs:行 35
場所 Test.program1.MyLibrary.LifeInfoTest.IsTodayHoliday_should_consider_a_set_day_and_the_previous_day_as_holiday(DateTime today, DayOfWeek holiday) 場所 c:\Users\Akira\Prig\Test.program1\MyLibrary\LifeInfoTest.cs:行 102
C:\Users\Akira\Prig\Test.program1\bin\Debug(.NET 3.5)\x64>
If I enhanced the log level or executed the test in CLR v4.0.30319, this issue never be occurred :'( Probably, this is the problem of thread safety.
When I tried replacing .cctor()
with Prig's indirection stub, I got some build errors as the follows:
error CS1519: Invalid token '{' in class, struct, or interface member declaration [c:\users\user\documents\visual studio 2013\Projects\StaticMockingSample\StaticMockingSampleTest\StaticMockingSample.v4.0.30319.v1.0.0.0.MSIL.Prig\StaticMockingSample.Prig.g.csproj]
Indirection stub setting I used is the following:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="prig" type="Urasandesu.Prig.Framework.PilotStubberConfiguration.PrigSection, Urasandesu.Prig.Framework" />
</configSections>
<prig>
<stubs>
<add name="StaticConstructor" alias="StaticConstructor">
<RuntimeConstructorInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema" z:Id="1" z:FactoryType="MemberInfoSerializationHolder" z:Type="System.Reflection.MemberInfoSerializationHolder" z:Assembly="0" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns="http://schemas.datacontract.org/2004/07/System.Reflection">
<Name z:Id="2" z:Type="System.String" z:Assembly="0" xmlns="">.cctor</Name>
<AssemblyName z:Id="3" z:Type="System.String" z:Assembly="0" xmlns="">StaticMockingSample</AssemblyName>
<ClassName z:Id="4" z:Type="System.String" z:Assembly="0" xmlns="">StaticMockingSample.Foo</ClassName>
<Signature z:Id="5" z:Type="System.String" z:Assembly="0" xmlns="">Void .cctor()</Signature>
<Signature2 z:Id="6" z:Type="System.String" z:Assembly="0" xmlns="">.cctor()</Signature2>
<MemberType z:Id="7" z:Type="System.Int32" z:Assembly="0" xmlns="">1</MemberType>
<GenericArguments i:nil="true" xmlns="" />
</RuntimeConstructorInfo>
</add>
</stubs>
</prig>
</configuration>
It should be able to replace as same as like another member.
In Visual Studio 2015 Update 1, it seems that test hosting process is changed to te.processhost.managed
from vstest.executionengine
. So, the processes at Enable Test Adapter
should consider the change.
I got BadImageFormatException in the following steps:
Install-Package Prig -pre
.padd -as mscorlib
.About this issue's cause, I think that Add-PrigAssembly doesn't consider the configuration Any CPU + Prefer32Bit.
I created the indirection setting of Environment.GetFolderPath(SpecialFolder)
and used it, but the program is stalled.
When the above problem was occured, the program output the log as follows:
2014/09/11 06:32:23.151928,ERROR,00000x2750,2172,0x0000238c," D:\Prig\Swathe\Urasandesu.Swathe\Urasandesu/Swathe/Metadata/BaseClassPimpl/BaseInstructionMetadataPimpl.hpp(242): Throw in function unsigned long __thiscall Urasandesu::Swathe::Metadata::BaseClassPimpl::BaseInstructionMetadataPimpl<struct Urasandesu::Swathe::AutoGen::Metadata::DefaultClassPimplApiHolder::DefaultInstructionMetadataPimplApiHolder>::TakeRawData(const unsigned char *,const unsigned char *)
Dynamic exception type: class boost::exception_detail::clone_impl<struct Urasandesu::CppAnonym::CppAnonymNotImplementedException>
std::exception::what: This process is not implemented.
[struct Urasandesu::CppAnonym::tag_stack_trace *] =
","D:\Prig\Swathe\Urasandesu.Swathe\Urasandesu/Swathe/Profiling/ICorProfilerCallbackImpl.h",274,"long __stdcall CWeaverDetail::CWeaverImpl::JITCompilationStartedCore(__w64 unsigned int,int)=>Weaver.cpp,359","pModProf.IsPersisted()=>Weaver.cpp,376","(result = prigData.m_indirectables.find(mdt)) != prigData.m_indirectables.end()=>Weaver.cpp,418","Modifying method=>Weaver.cpp,424"
It seems that some IL decoding procedure is not implemented :(
In the Prig v0.0.0-alpha4, the command Add-PrigAssembly -AssemblyFrom
went dead.
When running the command, I got the following error message:
PM > Add-PrigAssembly -AssemblyFrom "C:\Users\User\Documents\Visual Studio 2013\Projects\ConsoleApplication1\ConsoleApplication1\bin\Debug\ConsoleApplication1.exe"
"1" 個の引数を指定して "GetDirectoryName" を呼び出し中に例外が発生しました: "パスの形式が無効です。"
発生場所 C:\users\user\documents\visual studio 2013\Projects\ConsoleApplication1\packages\Prig.0.0.0-alpha4\tools\Urasandesu.Prig\Urasandesu\Prig\NuGet.Add-PrigAssembly.ps1:253 文字:9
+ $tools = [System.IO.Path]::GetDirectoryName((Get-Command prig).Path)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ArgumentException
ユーザー設定変数 "ErrorActionPreference" または共通パラメーターが Stop に設定されているため、実行中のコマンドが停止しました。パス 'C:\users\user\documents\visual studio 2013\Projects\ConsoleApplication1\PilotStubber.prig' が存在しないため検出できません。
PM >
I seem that its cause is the side-effect by Issue #7.
Is it possible to use this framework without having an IndirectionCotext?
I know it's there to protect you from permanently detouring functions and do other dangerous things, but that's exactly what I want to to.
Can I achieve this with prig? Maybe even without using a test but a normal c# application.
If it's not possible do you have any idea where I could start searching for a way to do this?
Sorry if this is the wrong place to ask btw
This issue is a cause of the combination of issues. The original issue is reported at Issues 22 comment-58714123.
Prig can't create correctly the *.csproj
for the indirection stub like the below steps:
For example, after creating a project as Class Library, add the class like below:
namespace ClassLibrary1
{
public class Foo
{
public int Echo(int arg0)
{
return arg0;
}
}
}
*.csproj
For example, create the class like below at another *.csproj
:
using ClassLibrary1;
using System;
namespace ConsoleApplication45
{
public class Bar
{
public Foo CreateFoo()
{
throw new NotImplementedException();
}
}
}
Then, add the indirection setting against the above method:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="prig" type="Urasandesu.Prig.Framework.PilotStubberConfiguration.PrigSection, Urasandesu.Prig.Framework" />
</configSections>
<prig>
<stubs>
<add name="CreateFoo" alias="CreateFoo">
<RuntimeMethodInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema" z:Id="1" z:FactoryType="MemberInfoSerializationHolder" z:Type="System.Reflection.MemberInfoSerializationHolder" z:Assembly="0" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns="http://schemas.datacontract.org/2004/07/System.Reflection">
<Name z:Id="2" z:Type="System.String" z:Assembly="0" xmlns="">CreateFoo</Name>
<AssemblyName z:Id="3" z:Type="System.String" z:Assembly="0" xmlns="">ConsoleApplication45, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</AssemblyName>
<ClassName z:Id="4" z:Type="System.String" z:Assembly="0" xmlns="">ConsoleApplication45.Bar</ClassName>
<Signature z:Id="5" z:Type="System.String" z:Assembly="0" xmlns="">ClassLibrary1.Foo CreateFoo()</Signature>
<Signature2 z:Id="6" z:Type="System.String" z:Assembly="0" xmlns="">ClassLibrary1.Foo CreateFoo()</Signature2>
<MemberType z:Id="7" z:Type="System.Int32" z:Assembly="0" xmlns="">8</MemberType>
<GenericArguments i:nil="true" xmlns="" />
</RuntimeMethodInfo>
</add>
</stubs>
</prig>
</configuration>
You'll get the build error as the below:
エラー,75,型または名前空間名 'ClassLibrary1' が見つかりませんでした。using ディレクティブまたはアセンブリ参照が不足しています。 [c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\ConsoleApplication45\ConsoleApplication45.v4.0.30319.v1.0.0.0.MSIL.Prig\ConsoleApplication45.Prig.g.csproj],c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\ConsoleApplication45\ConsoleApplication45\PBar.cs,24,62,ConsoleApplication45
エラー,76,型または名前空間名 'ClassLibrary1' が見つかりませんでした。using ディレクティブまたはアセンブリ参照が不足しています。 [c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\ConsoleApplication45\ConsoleApplication45.v4.0.30319.v1.0.0.0.MSIL.Prig\ConsoleApplication45.Prig.g.csproj],c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\ConsoleApplication45\ConsoleApplication45\PBar.cs,62,124,ConsoleApplication45
エラー,77,型または名前空間名 'ClassLibrary1' が見つかりませんでした。using ディレクティブまたはアセンブリ参照が不足しています。 [c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\ConsoleApplication45\ConsoleApplication45.v4.0.30319.v1.0.0.0.MSIL.Prig\ConsoleApplication45.Prig.g.csproj],c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\ConsoleApplication45\ConsoleApplication45\PProxyBar.cs,37,62,ConsoleApplication45
エラー,79,型または名前空間名 'ClassLibrary1' が見つかりませんでした。using ディレクティブまたはアセンブリ参照が不足しています。 [c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\ConsoleApplication45\ConsoleApplication45.v4.0.30319.v1.0.0.0.MSIL.Prig\ConsoleApplication45.Prig.g.csproj],c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\ConsoleApplication45\ConsoleApplication45\PBar.cs,24,62,ConsoleApplication45
エラー,80,型または名前空間名 'ClassLibrary1' が見つかりませんでした。using ディレクティブまたはアセンブリ参照が不足しています。 [c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\ConsoleApplication45\ConsoleApplication45.v4.0.30319.v1.0.0.0.MSIL.Prig\ConsoleApplication45.Prig.g.csproj],c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\ConsoleApplication45\ConsoleApplication45\PBar.cs,62,124,ConsoleApplication45
エラー,81,型または名前空間名 'ClassLibrary1' が見つかりませんでした。using ディレクティブまたはアセンブリ参照が不足しています。 [c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\ConsoleApplication45\ConsoleApplication45.v4.0.30319.v1.0.0.0.MSIL.Prig\ConsoleApplication45.Prig.g.csproj],c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\ConsoleApplication45\ConsoleApplication45\PProxyBar.cs,37,62,ConsoleApplication45
エラー,82,"コマンド ""cmd /c "" ""%VS120COMNTOOLS%VsDevCmd.bat"" & %windir%\system32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -NoProfile -File ""c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\packages\Prig.0.0.0-alpha9\tools\Invoke-PilotStubber.ps1"" -ReferenceFrom ""@('c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\packages\Prig.0.0.0-alpha9\lib\net40\Urasandesu.NAnonym.dll','c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\packages\Prig.0.0.0-alpha9\lib\net40\Urasandesu.Prig.Framework.dll')"" -AssemblyFrom ""C:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\ConsoleApplication45\bin\Debug\ConsoleApplication45.exe"" -TargetFrameworkVersion v4.5.1 -KeyFile ""c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\packages\Prig.0.0.0-alpha9\tools\Urasandesu.Prig.snk"" -OutputPath ""c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\ConsoleApplication45\bin\Debug\."" -Settings ""c:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\ConsoleApplication45\ConsoleApplication45.v4.0.30319.v1.0.0.0.prig"" """" はコード -1 で終了しました。",C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets,1131,5,ConsoleApplication45
If you follow the build log, you'll find the error that is occurred at Invoke-PilotStubber.ps1
:
1> 警告: "1" 個の引数を指定して "Load" を呼び出し中に例外が発生しました: "ファイルまたはアセンブリ 'ClassLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'、またはその依存関係の 1 つが読み込めませんでした。指定されたファイルが見つかりません。"
1>
1> 発生場所 C:\users\akira\documents\visual studio 2013\Projects\ConsoleApplication45\packages\Prig.0.0.0-alpha9\tools\Invoke-PilotStubber.ps1:98 文字:9
1>
1> + $refAsmInfos.Add([System.Reflection.Assembly]::Load($refAsmName.FullName ...
1> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1> + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
1> + FullyQualifiedErrorId : FileNotFoundException
Though I ported this sample to using Prig, it could not work.
I tried a few variations, and I found that methods that are defined in .exe
can't be call indirectly.
They should be able to call indirectly same as in .dll
.
By default, NuGet sets path to tools
automatically, but it became unreachable in the following step:
Install-Package Prig -pre
against arbitrary project.
Reboot the Visual Studio, then confirm $env:Path
in the Package Manager Console. In this timing, the result is as the follows:
PS > $env:Path -replace ";", "`r`n"
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\WindowsPowerShell\v1.0\
C:\Program Files (x86)\Git\cmd
C:\Program Files\TortoiseGit\bin
C:\Users\User\AppData\Local\Apps\NuGet
C:\Users\User\Documents\Visual Studio 2013\Projects\ConsoleApplication1\packages\Prig.0.0.0-alpha3\tools
PS >
Rebuild the project that was installed Prig in step 1.
Confirm $env:Path
again...
PS > $env:Path -replace ";", "`r`n"
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\WindowsPowerShell\v1.0\
C:\Program Files (x86)\Git\cmd
C:\Program Files\TortoiseGit\bin
C:\Users\User\AppData\Local\Apps\NuGet
PS >
The path to tools
is removed for no special reason :(
This issue's real problem is that user can't invoke typing just prig
in some situation. Prig should be able to invoke typing just prig
any time in the Package Manager Console.
Hi,
I have a project with two unit tests - one of them uses a stub for DateTime.Now, the other one uses unstubbed DateTime.Now:
[TestClass]
public class UnitTest1
{
[TestMethod]
public void UseDateTimeWithoutStubs()
{
var dateTime = DateTime.Now;
}
[TestMethod]
public void UseDateTimeWithStubs()
{
using (new IndirectionsContext())
{
PDateTime.NowGet().Body = () => new DateTime(2013, 12, 13, 11, 00, 00);
var dateTime = DateTime.Now;
}
}
}
Surprisingly,while the first test doesn't use any stubs at all, it makes execution engine crash. The issue is resolved if I use IndirectionsContext in this test, but it looks a little bit strange why a test that doesn't use Prig Stubs should use IndirectionsContext.
Prig 0.0.0-alpha8 can't uninstall correctly against the solution that contains multiple test projects.
After installing Prig to the solution which contains multiple test projects, if uninstalling Prig from either test project, I can't test using Prig at rest projects any more.
ClassLibraryTest1
and ClassLibraryTest2
to one solution.Install-Package Prig -Pre
at ClassLibraryTest1
.Install-Package Prig -Pre
at ClassLibraryTest2
.Uninstall-Package Prig
at ClassLibraryTest1
.ClassLibraryTest2
, try to add the indirection stub settings(e.g. Add-PrigAssembly -Assembly "mscorlib, Version=4.0.0.0"
).PM> Add-PrigAssembly -Assembly "mscorlib, Version=4.0.0.0"
Add-PrigAssembly : 用語 'Add-PrigAssembly' は、コマンドレット、関数、スクリプト ファイル、または操作可能なプログラムの名前として認識されません。名前が正しく記述されていることを確認し、パスが含まれている場合はそのパスが正しいことを確認してから、再試行してください。
発生場所 行:1 文字:1
+ Add-PrigAssembly -Assembly "mscorlib, Version=4.0.0.0"
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Add-PrigAssembly:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PM>
Allow to add the indirection stub settings without error.
I am having trouble generating the below stub I debugged this a bit (powershell wise) and it is because $stub.IndirectionDelegate is null any idea why that would be?
<add name="GetContractDetailsStringBooleanRefDecimalRefDecimalRef" alias="GetContractDetailsStringBooleanRefDecimalRefDecimalRef">
<RuntimeMethodInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema" z:Id="1" z:FactoryType="MemberInfoSerializationHolder" z:Type="System.Reflection.MemberInfoSerializationHolder" z:Assembly="0" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns="http://schemas.datacontract.org/2004/07/System.Reflection">
<Name z:Id="2" z:Type="System.String" z:Assembly="0" xmlns="">GetContractDetails</Name>
<AssemblyName z:Id="3" z:Type="System.String" z:Assembly="0" xmlns="">AQR.BP.TW.FX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</AssemblyName>
<ClassName z:Id="4" z:Type="System.String" z:Assembly="0" xmlns="">AQR.BP.TW.FX.Helpers</ClassName>
<Signature z:Id="5" z:Type="System.String" z:Assembly="0" xmlns="">Void GetContractDetails(System.String, Boolean ByRef, System.Decimal ByRef, System.Decimal ByRef)</Signature>
<Signature2 z:Id="6" z:Type="System.String" z:Assembly="0" xmlns="">System.Void GetContractDetails(System.String, System.Boolean&, System.Decimal&, System.Decimal&)</Signature2>
<MemberType z:Id="7" z:Type="System.Int32" z:Assembly="0" xmlns="">8</MemberType>
<GenericArguments i:nil="true" xmlns="" />
</RuntimeMethodInfo>
</add>
Suggestion add prig files as Copy If Newer to output directory, so that it forces a build even if there were no code changes aside from the prig settings.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.