Rank: Advanced Member
Groups: Registered
Joined: 6/25/2012(UTC) Posts: 89 Location: China
Thanks: 23 times Was thanked: 19 time(s) in 18 post(s)
|
NCrunch 1.42.0.12 VS2012 Windows 8 64bit This is a similar issue to this one: Portable class libraries fail to build if they include metroResharper and the built in test runner of VS2012 works fine. I tested some classes as optional argument and found only String and user created classes don't cause this issue. Steps to reproduce the issue: 1) Create a Portable Class Library; 2) Remove Silverlight as target platform; 3) Add the following class: Code:
public class MyClass
{
public void DoSomething(Type arg = null)
{
}
}
4) Enable NCrunch. I get the following build error: Code:
[13:04:19.2936-BuildTask-7] ERROR (Compilation): PortableClassLibrary1: (0): System.InvalidOperationException: Failed to resolve type: System.Type
at Mono.Cecil.Mixin.CheckedResolve(TypeReference self)
at Mono.Cecil.MetadataBuilder.GetConstantType(TypeReference constant_type, Object constant)
at Mono.Cecil.MetadataBuilder.AddConstant(IConstantProvider owner, TypeReference type)
at Mono.Cecil.MetadataBuilder.AddParameter(UInt16 sequence, ParameterDefinition parameter, ParamTable table)
at Mono.Cecil.MetadataBuilder.AddParameters(MethodDefinition method)
at Mono.Cecil.MetadataBuilder.AddMethod(MethodDefinition method)
at Mono.Cecil.MetadataBuilder.AddMethods(TypeDefinition type)
at Mono.Cecil.MetadataBuilder.AddType(TypeDefinition type)
at Mono.Cecil.MetadataBuilder.AddTypeDefs()
at Mono.Cecil.MetadataBuilder.BuildTypes()
at Mono.Cecil.MetadataBuilder.BuildModule()
at Mono.Cecil.ModuleWriter.<BuildMetadata>b__0(MetadataBuilder builder, MetadataReader _)
at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
at Mono.Cecil.ModuleWriter.BuildMetadata(ModuleDefinition module, MetadataBuilder metadata)
at Mono.Cecil.ModuleWriter.WriteModuleTo(ModuleDefinition module, Stream stream, WriterParameters parameters)
at Mono.Cecil.ModuleDefinition.Write(Stream stream, WriterParameters parameters)
at Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters)
at nCrunch.Compiler.StaticManipulation.BuiltAssembly.#=qVVxyPFyV07SGmGwvnqJ58GP1CjxFAgHrcNQX4zelNig=.#=qVhwsrVPHh0cRHCRNhV_dH0P51C3c8nYxqUsFAc9QohE=()
at nCrunch.Compiler.StaticManipulation.BuiltAssembly.#=qxEWPuumRjENxBqFDuwVIPQ==(Action #=qNFebLMPvzAnxbLsp9k2cSw==)
at nCrunch.Compiler.StaticManipulation.BuiltAssembly.Instrument(ComponentSourceLineMap sourceLineMap, IDictionary`2 instrumentationDirectivesByCodeFileId, IDictionary`2 codeFileIDsByFilePath, Boolean proxyProcessIsActive, Int32 componentId, IInstrumentationFilter[] instrumentationFilters)
at nCrunch.Compiler.RemoteBuildRunner.#=qPVZ1Qvt7K1dg$S2Tsbki14jXz55V81a4b0lw2Gy2H9I=(ComponentBuildParameters #=qaLbij$nvLcp1xzKxt0ECzQ==, String #=q3Qo9mUTR8Ej_efd8kOmuaRPOgcadukhysqWjzfCknIs=, BuildOutput #=qc1a02FFghipoiqbEEWdEuA==, String #=qib4s6fOXht5wNWFzsTveI52_75PbtixMjh7DSUYzHhg=)
at nCrunch.Compiler.RemoteBuildRunner.Build(ComponentBuildParameters parameters)
Regards, Yang
|