Build/Test Issues

T4 Template generation fails in 3.18

Started by smitchamb on 21,088 views

smitchamb wrote:I still need the copy assemblies flag to run the ncrunch build.


Sorry to hear :( I guess I'll need a sample project before I can get to this bottom of this one.
Touching back in on this thread. I've made some updates for VS 15.8 in the original text templating code and it doesn't appear to be an issue any more. However, I haven't been able to cut back the project to reproduce the runtime error in a minimal fashion. I'm hoping to get a block of time to do this tomorrow.
smitchamb wrote:Touching back in on this thread. I've made some updates for VS 15.8 in the original text templating code and it doesn't appear to be an issue any more. However, I haven't been able to cut back the project to reproduce the runtime error in a minimal fashion. I'm hoping to get a block of time to do this tomorrow.


Thanks :) I've had to push out v3.19 in the mean time, since the original issue was too serious to leave alone. If you can get me a use case to produce the problem, I'm fairly certain we can get to the bottom of it.
Sorry it's taken so long to get back to this, but I've been busy getting stuff done. Here's a link to a new minimal set that shows the error. I had another error post build that was causing a test to fail, but after I started removing some dependencies it went away so I think that is something with my project configuration.

https://blizzard-my.sharepoint.com/:f:/p/smitcham/EqdRHgKLa45NmPbELfPNZa0Bgd5cslPe7uVP-mH1eT_iGA?e=5fIFV9

Both of these projects fail. I've only kept external dependencies, but I think the key is related to the .NET Core 1.1 vs 2.0 versioning going on with the mixed dependencies.
Thanks! We'll take a look and will get back to you.
I'm sorry for the time it's taken to come back to you on this issue. The MSBuild redirection hack that MS introduced with VS15.8 has given us tremendous problems with our build integration and it's taken a while to figure out how to fix everything. Would you be interested in trying the build below to see if this solves the problem for you?

NCrunch_Console_3.21.0.3.msi
NCrunch_Console_3.21.0.3.zip
NCrunch_GridNodeServer_3.21.0.3.msi
NCrunch_GridNodeServer_3.21.0.3.zip
NCrunch_LicenseServer_3.21.0.3.zip
NCrunch_VS2008_3.21.0.3.msi
NCrunch_VS2010_3.21.0.3.msi
NCrunch_VS2010_3.21.0.3.zip
NCrunch_VS2012_3.21.0.3.msi
NCrunch_VS2012_3.21.0.3.zip
NCrunch_VS2013_3.21.0.3.msi
NCrunch_VS2013_3.21.0.3.zip
NCrunch_VS2015_3.21.0.3.msi
NCrunch_VS2015_3.21.0.3.msi.7z
NCrunch_VS2015_3.21.0.3.zip
NCrunch_VS2017_3.21.0.3.msi
NCrunch_VS2017_3.21.0.3.msi.7z
NCrunch_VS2017_3.21.0.3.zip
With my actual project, the problem is still happening with this update.
Here's the error message


An error occurred while analysing this project after it was built: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ---> System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Users\smitcham\AppData\Local\NCrunch\35844\10\_ncrunchreferences\System.Runtime.dll' or one of its dependencies. The system cannot find the file specified.
File name: 'file:///C:\Users\smitcham\AppData\Local\NCrunch\35844\10\_ncrunchreferences\System.Runtime.dll'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at nCrunch.Common.CustomAssemblyResolver.resolveAssemblyFrom(IEnumerable`1 possibleAssemblyPaths, ParsedAssemblyName parsedAssemblyName)
at nCrunch.Common.CustomAssemblyResolver.ResolveAssembly(ParsedAssemblyName parsedAssemblyName)
at nCrunch.Common.CustomAssemblyResolver.AssemblyResolve(Object sender, ResolveEventArgs args)
at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at nCrunch.Common.CustomAssemblyResolver.resolveAssemblyFrom(IEnumerable`1 possibleAssemblyPaths, ParsedAssemblyName parsedAssemblyName)
at nCrunch.Common.CustomAssemblyResolver.ResolveAssembly(ParsedAssemblyName parsedAssemblyName)
at nCrunch.Common.CustomAssemblyResolver.AssemblyResolve(Object sender, ResolveEventArgs args)
at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)


at Xunit.Sdk.TestFrameworkProxy.GetTestFrameworkType(IAssemblyInfo testAssembly, IMessageSink diagnosticMessageSink)
at Xunit.Sdk.TestFrameworkProxy..ctor(Object testAssemblyObject, Object sourceInformationProviderObject, Object diagnosticMessageSinkObject)$$RethrowMarker$$ at ExceptionExtensions.RethrowWithNoStackTraceLoss(Exception ex)
at Xunit.AppDomainManager_NoAppDomain.CreateObject[TObject](AssemblyName assemblyName, String typeName, Object[] args)
at Xunit.Xunit2Discoverer..ctor(AppDomainSupport appDomainSupport, ISourceInformationProvider sourceInformationProvider, IAssemblyInfo assemblyInfo, String assemblyFileName, String xunitExecutionAssemblyPath, String configFileName, Boolean shadowCopy, String shadowCopyFolder, IMessageSink diagnosticMessageSink, Boolean verifyAssembliesOnDisk)
at nCrunch.Module.XUnit2.Integration.XUnitTestFrameworkContainer.GetDynamicFramework(FilePath assemblyFilePath, DirectoryPath workingDirectory)
at nCrunch.Module.XUnit2.Integration.XUnit2DiscoveryEnvironment.<>c__DisplayClass2_0.<FindFrameworkTestsInAssembly>b__1()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Common.PerformanceTracking.PerfTracker.TryTrackActivity(String name, Action activity)
at nCrunch.Module.XUnit2.Integration.XUnit2DiscoveryEnvironment.FindFrameworkTestsInAssembly(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, ComponentUniqueName testComponentUniqueName, PlatformType platformType, DynamicProxy[] dynamicProxies)
at nCrunch.TestExecution.TestFinder..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.TestExecution.TestFinder..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.TestExecution.TestFinder.FindTestsForFrameworks(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, DescribedTestFrameworkDiscoverer[] describedDiscoverers, ComponentUniqueName testComponentUniqueName, PlatformType platformType, DynamicProxy[] dynamicProxies)
at nCrunch.TestExecution.RemoteTaskRunner.AnalyseAssembly(DescribedTestFrameworkDiscoverer[] applicableFrameworks, ComponentUniqueName testComponentUniqueName, PerfTracker perfTracker)


Sorry. Here's the next try. I'm feeling a bit more confident about this one:

NCrunch_Console_3.21.0.4.msi
NCrunch_Console_3.21.0.4.zip
NCrunch_GridNodeServer_3.21.0.4.msi
NCrunch_GridNodeServer_3.21.0.4.zip
NCrunch_LicenseServer_3.21.0.4.zip
NCrunch_VS2008_3.21.0.4.msi
NCrunch_VS2010_3.21.0.4.msi
NCrunch_VS2010_3.21.0.4.zip
NCrunch_VS2012_3.21.0.4.msi
NCrunch_VS2012_3.21.0.4.zip
NCrunch_VS2013_3.21.0.4.msi
NCrunch_VS2013_3.21.0.4.zip
NCrunch_VS2015_3.21.0.4.msi
NCrunch_VS2015_3.21.0.4.msi.7z
NCrunch_VS2015_3.21.0.4.zip
NCrunch_VS2017_3.21.0.4.msi
NCrunch_VS2017_3.21.0.4.msi.7z
NCrunch_VS2017_3.21.0.4.zip
That build seems to be working.
smitchamb wrote:That build seems to be working.


Awesome :) Thanks for your patience with this!

Post a reply

Log in to reply.