Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Ncrunch VS2012 does not build the project.
khushbu
#1 Posted : Friday, February 22, 2013 1:04:29 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/22/2013(UTC)
Posts: 6
Location: Germany

Hallo All,
Info: VS 2010+ Ncrunch works fine.
Now I have installed recently NCrunch for VS 2012( Version 1.44). My Projects are not build by Ncrunch. Here is the exception detail :-


System.Runtime.Serialization.SerializationException: Unable to find assembly 'Gallio, Version=3.3.0.0, Culture=neutral, PublicKeyToken=eb9cfa67ee6ab36e'.

Server stack trace:
at System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name)
at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryResponseMessage(Stream inputStream, IMethodCallMessage reqMsg, Boolean bStrictBinding)
at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at nCrunch.TestExecution.Frameworks.IFrameworkDescriptionResolver.GetDescriptionForEachFramework()
at nCrunch.Core.TestManagement.TestFrameworkDescriptionManager.EnsureDescriptionsAreLoaded()
at nCrunch.Core.ComponentLoader.SnapshotComponentFactory.CreateSnapshotComponentFromXml(String projectFilePath, String projectXml, String solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile)

Can Somebody help me further , and suggest what can be a possible reason ??

Thanks In Advance :)

Remco
#2 Posted : Friday, February 22, 2013 11:37:52 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,989

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for posting!

This looks like an installation issue. NCrunch isn't able to find the Gallio components that are packaged with it inside the MSI. Try following the reinstallation fix described here. Hopefully this will do the trick - otherwise, let me know and we'll try something else.


Cheers,

Remco
khushbu
#3 Posted : Tuesday, February 26, 2013 9:53:03 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/22/2013(UTC)
Posts: 6
Location: Germany

Hallo Remco,

I followed your Installation Steps, But unfortunately did not worked.Please help me further in investigating this issue.
If you need any further information to investigate , Let me Know

Thanks In Advance
Khushbu
Remco
#4 Posted : Tuesday, February 26, 2013 9:59:00 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,989

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Thanks Khushbu.

Can you check for me whether you have the Gallio.dll file installed under:

\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2012

Also, do you have Gallio (any version) installed on your machine other than the one packaged with NCrunch?

Does your NCrunch work for any solution that doesn't make use of Xunit/MbUnit? (For example, if you set up a simple NUnit solution, does this work?)
khushbu
#5 Posted : Tuesday, February 26, 2013 3:10:23 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/22/2013(UTC)
Posts: 6
Location: Germany

Thanks Remco

Yes there is a Galio.dll (Version 3.3.0.0) on the given location.

We are not using Xunit/MbUnit in our project.How can i check if there are any other version of Gallio.dll are installed??

Also some other info:-

My Project Code is located in D Drive and Ncrunch is installed in C drive. Are there any Settings which needs to be changes so as to reference Gallio.dll correctly??

We have newly installed VS 2012 and then Ncrunch for VS 2012.
GillerP
#6 Posted : Tuesday, February 26, 2013 3:14:47 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/26/2013(UTC)
Posts: 2
Location: United Kingdom

We too are experiencing the exact same problem. I have attempted multiple re-installs. Even reinstalling VS2012. It worked for one build. Then for all other builds it fails with the same stack trace as the OP. I can confirm the Gallio.dll is in the location expected.
Remco
#7 Posted : Wednesday, February 27, 2013 12:18:30 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,989

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
I suspect this problem may be caused by shadow copying behaviour inside the IDE process.

Please try the following steps:

1. Close down all instances of Visual Studio (check task manager to make sure no devenv.exe processes are running)
2. Delete the contents of your C:\Users\USER\AppData\Local\Temp directory
3. Restart VS2012, running as an Administrator
4. Create a new, blank class library in its own solution using the standard VS template, without any tests
5. Enable NCrunch, just click Cancel on the wizard when it pops up

.. Does the project build correctly?



Cheers,

Remco
khushbu
#8 Posted : Wednesday, February 27, 2013 8:30:46 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/22/2013(UTC)
Posts: 6
Location: Germany

Hello Remco,
No, Project does not build
I have deleted contents from temp folder and started VS2012 as administrator. But Sorry to say.. that does not work as well :(

I have created a new class library project in existing solution but that does not build=> same error
In complete new solution also i added a new class library project but that does not build=> same error.

Thanks
Remco
#9 Posted : Wednesday, February 27, 2013 8:45:15 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,989

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
This is indeed proving to be an ugly one ...

Ok, the next thing to try ... Can you submit a bug report after the build exception has occurred? There may be something useful in the log file that can explain why this is happening.

Also, is there any chance you can zip up the contents of your 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2012' directory and submit it via the contact form on this website? In this way if there is an installation problem of some kind, I may be able to use the install files to recreate the problem.

Something else that could be quite telling ... do you have any other version of Visual Studio installed? i.e. VS2010 or 2008? If so, do you have the same problem with NCrunch in this version of VS as you do with 2012? Sorry I know you mentioned that this was working with VS2010 for you earlier, I just want to be sure this is still the case.

Do you have any colleagues you work with that may be using NCrunch with a similar setup? If so, do they also experience this problem?

Sorry for the drawn out process with lots of questions. There may be a bit of back and forward until I can establish enough information to reproduce and resolve it.
khushbu
#10 Posted : Wednesday, February 27, 2013 10:42:22 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/22/2013(UTC)
Posts: 6
Location: Germany

Hallo Remco,

I have submitted a bug report. I have also sent the zip file asked by you. Please check! Yes my colleagues use Ncrunch VS2012 and it works fine for them, and they have installed the same version of Ncrunch

Let me explain my local environment. I have one Project Solution( Lets name as Solution1) and Two machines(Lets name them as Machine1 and Machine2).

On Machine1 : Only VS2010 installed + Solution1 + Ncrunch for VS 2010 => Works fine

OnMachine2 :
1) Initially VS 2010 installed + Ncrunch for VS 2010 + Solution1 => as far as i remember worked fine
2)Uninstalled Ncrunch for Vs2010
3) Thereafter Vs 2012 installed + Ncrunch Vs 2012 installed + Solution1 => Does not work :(
4) Ncrunch for VS 2010 again installed +Solution1 => does not work any more( But there are some other error, not the same Gallio error)

I hope my info helps!!



Remco
#11 Posted : Wednesday, February 27, 2013 11:12:54 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,989

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Thanks for sending through the report. Based on the information you've provided so far, it looks as though there is something very wrong with how the .NET framework on your machine is handling assembly resolution. Something I don't understand is why this is happening for the Gallio.dll assembly and not for the others used at runtime by NCrunch. Do you have any other automated testing tools or visual studio plugins installed that may make use of Gallio in any way?

If the error you're receiving in VS2010 is happening consistently, would you mind pushing it through the bug reporter too? Perhaps this will be a more description symptom of the underlying problem and it may yield some more clues as to why this is failing.

Something I think that may be worth trying is to install the Gallio.dll assembly shipped with NCrunch into your GAC. This will simplify much of the assembly resolution logic and may either allow you to work around the problem or give us a different error that provides more details. Try running in a command prompt (as administrator): "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\Gacutil.exe" /i "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2012\Gallio.dll"

.. Then running NCrunch again under VS2012 to see if you still see the same result.

Something else that will give some useful information about the failed assembly resolution is to turn on fusion logging. This is a built-in feature in .NET that reports detailed information on assembly resolution, although it may involve a bit of running through log files after the error appears. If you can get me a fusion log capture from the failed Gallio.dll resolution, this could be very informative. There's some more details on how to turn on fusion logging here: http://stackoverflow.com/questions/255669/how-to-enable-assembly-bind-failure-logging-fusion-in-net.
khushbu
#12 Posted : Wednesday, February 27, 2013 11:55:47 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/22/2013(UTC)
Posts: 6
Location: Germany

Hallo Remco,
Okay.. I have done as you said..and Now the error is different in my VS 2012. Also I have sent you the FusionLog.zip via your Contact form.



Gallio.Runtime.RuntimeException: The runtime could not be initialized. ---> System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: It is an error to use a section registered as allowExeDefinition='MachineToApplication' beyond the application, in the user's config. (This is the default behavior if not specified) (C:\Users\shah\AppData\Roaming\nCrunch.TestRunner.AppDom_Url_x13ctxwdzox4i2wigw405uc4bxpgd5ul\1.0.0.0\user.config line 6)
at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
at System.Configuration.ClientConfigurationSystem.OnConfigRemoved(Object sender, InternalConfigEventArgs e)
--- End of inner exception stack trace ---
at System.Configuration.ClientConfigurationSystem.OnConfigRemoved(Object sender, InternalConfigEventArgs e)
at System.Configuration.Internal.InternalConfigRoot.OnConfigRemoved(InternalConfigEventArgs e)
at System.Configuration.Internal.InternalConfigRoot.RemoveConfigImpl(String configPath, BaseConfigurationRecord configRecord)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at Gallio.Runtime.DefaultRuntime.RegisterLoadedPlugins()
at Gallio.Runtime.DefaultRuntime.Initialize()
--- End of inner exception stack trace ---

Server stack trace:
at Gallio.Runtime.DefaultRuntime.Initialize()
at Gallio.Runtime.RuntimeBootstrap.Initialize(RuntimeSetup setup, ILogger logger)
at #=qYOn$XPoLBpzBzGVEfr2UXKp7ITIl8FGpbo8zqac26WUTUpfajfy0qP32Gf933bwkavydiipGTpheHAR9gNeL8g==.#=qD1nH72zdFSxc9wZ2hPPC3l$fXEZz83I$Azp9Z0A8AbE=()
at nCrunch.TestExecution.Frameworks.Gallio.GallioWrapper.GetCustomConfig()
at nCrunch.TestExecution.Frameworks.Gallio.GallioTestFramework.GetCustomConfig()
at nCrunch.TestExecution.Frameworks.Gallio.GallioTestFramework.GetDescription()
at nCrunch.TestExecution.Frameworks.TestFrameworkRegistry.GetDescriptionForEachFramework()
at nCrunch.TestExecution.Frameworks.FrameworkDescriptionResolver.GetDescriptionForEachFramework()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at nCrunch.TestExecution.Frameworks.IFrameworkDescriptionResolver.GetDescriptionForEachFramework()
at nCrunch.Core.TestManagement.TestFrameworkDescriptionManager.EnsureDescriptionsAreLoaded()
at nCrunch.Core.ComponentLoader.SnapshotComponentFactory.CreateSnapshotComponentFromXml(String projectFilePath, String projectXml, String solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile)



Cheers
Khushbu
Remco
#13 Posted : Wednesday, February 27, 2013 12:21:09 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,989

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Thanks Khushbu - This confirms that for some reason the assembly resolution within .NET is completely ignoring the Gallio.dll file in the NCrunch installation.

I don't think we'll have much chance of getting this to work with the DLL in the GAC (as it needs to load plugins based on its current location), but at least we've narrowed the problem down a bit further.

Are you running a virus scanner or any kind of scanning/interception software that might interfere with file system access on your machine?

Something a bit random to try is to rename the 'Gallio.dll' file in your NCrunch install directory to 'Gallio.exe' and see if this makes any difference at all. You'll need to uninstall the existing assembly from your GAC using "gacutil /u" before we'll be able to see if this has any effect.
Remco
#14 Posted : Wednesday, February 27, 2013 12:27:21 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,989

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Also - doublecheck that the Gallio.dll file isn't being blocked somehow by your operating system through file I/O permissions or other security measures. Check whether you're able to open the file directly (i.e. using notepad or some other tool).
GillerP
#15 Posted : Thursday, February 28, 2013 1:31:15 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/26/2013(UTC)
Posts: 2
Location: United Kingdom

NCrunch remains unusable to us.

One symptom I've noticed whilst attempting reinstalls etc. is that I can't reinstall NCrunch using the msi. It refuses to acknowledge the installation of Visual Studio 2012. Is it possible this is connected? By installing it manually are we missing steps/registrations.

Remco
#16 Posted : Thursday, February 28, 2013 9:18:54 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,989

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
It's hard to say whether there is a connection between the need for a manual install and the problem described above. At the moment both of these problems do have two things in common - neither has been reproduced in an environment where they could be fixed, and both are caused by unknown constraints that are present in the install environment.

The MSI contains a pre-condition that checks for the location of Visual Studio before running the installer. This condition checks the registry for the value defined in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\11.0\InstallDir (or alternatively under the Wow6432Node for 64-bit installs). If for whatever reason this registry key can't be accessed by the installer, it will fail. My suspicion is that this could be blocked by a virus scanner or security restrictions in the O/S, although I've never been able to create an environment with configuration that could cause this to happen.

In the case of the Gallio.dll resolution issue, I'm quite certain that this is also caused by a constraint in the environment which is abnormal. In this case we have two normal co-located assemblies being loaded from the same directory, and one cannot find the other. I suspect this to be caused by one (or more) of the following:
1. Unusual configuration of the machine (i.e. machine.config or CLR configuration at some other level)
2. O/S restriction perhaps caused by security constraints/permissions issues
3. Virus scanner or third party software that is interfering with the assembly resolution

Provided the manual install is done per the instructions in the documentation, there shouldn't really be any functional difference between the MSI install and the manual install. NCrunch itself is just an xcopy installation - with an additional step to flush the VS extension cache so that it will find the addin.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.120 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download