Unsupported FrameworkVersion 4.2 when inspecting code

I have Visual Studio project, which compiled for .Net 4.6.1. While build this problem occurs:

Step 3/16] Unsupported FrameworkVersion 4.2
[12:17:44][Step 3/16]
[12:17:44][Step 3/16] --- EXCEPTION #1/1 [LoggerException]
[12:17:44][Step 3/16] Message = "Unsupported FrameworkVersion 4.2"
[12:17:44][Step 3/16] ExceptionPath = Root
[12:17:44][Step 3/16] ClassName = JetBrains.Util.LoggerException
[12:17:44][Step 3/16] HResult = COR_E_APPLICATION=80131600
[12:17:44][Step 3/16] StackTraceString = "
[12:17:44][Step 3/16] at JetBrains.Util.Frameworks.FrameworkDetectionUtils.GetNetFrameworkDirectory(Version version)
[12:17:44][Step 3/16] at JetBrains.Application.platforms.SystemFrameworkLocationHelper.GetMsBuildDirectory(Version version)
[12:17:44][Step 3/16] at JetBrains.Application.platforms.FrameworkDetectionHelperBase.GetPlatformInfoFromFrameworkDir(FileSystemPath frameworkDir, PlatformID platformID, Func`2 getAssemblyFolders, Func`2 getRuntimeDir, Func`2 checkFramework)
[12:17:44][Step 3/16] at JetBrains.Application.platforms.FrameworkDetectionHelperBase.<ProcessFrameworksFromReferenceAssembliesFolder>d__c.MoveNext()
[12:17:44][Step 3/16] at JetBrains.Application.platforms.FrameworkDetectionHelperBase.<GetFrameworksFromReferenceAssembliesFolder>d__0.MoveNext()
[12:17:44][Step 3/16] at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
[12:17:44][Step 3/16] at JetBrains.Application.platforms.NetPlatformsProvider.GetPlatforms()
[12:17:44][Step 3/16] at JetBrains.Application.platforms.PlatformManagerImpl.CollectPlatformsFromProvider(IPlatformsProvider provider, IDictionary`2 platformsByProvider, IDictionary`2 prefixesByProvider)
[12:17:44][Step 3/16] at JetBrains.Application.platforms.PlatformManagerImpl.<.ctor>b__0(IPlatformsProvider provider)
[12:17:44][Step 3/16] at JetBrains.DataFlow.Viewable.<>c__DisplayClass1d`1.<View>b__1b(Lifetime valueLifetime, TValue value)
[12:17:44][Step 3/16] at JetBrains.Application.Components.ViewableValueResolver.ViewableComponentDescriptor`1.<>c__DisplayClass1.<View>b__0(Lifetime descriptorLifetime, IComponentDescriptor descriptor)
[12:17:44][Step 3/16] at JetBrains.Application.Components.ComponentStorage.View[T](Lifetime lifetime, Action`2 viewer)
[12:17:44][Step 3/16] at JetBrains.Application.Components.ViewableValueResolver.ViewableComponentDescriptor`1.View(Lifetime lifetime, Action`2 viewer)
[12:17:44][Step 3/16] at JetBrains.Application.platforms.PlatformManagerImpl..ctor(Lifetime lifetime, IFrameworkDetectionHelper frameworkDetectionHelper, IViewable`1 providers)
[12:17:44][Step 3/16] at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
[12:17:44][Step 3/16] at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
[12:17:44][Step 3/16] at JetBrains.Application.Extensibility.PartComponentDescriptor.CreateInstanceOf(Type type, IValueResolveContext context)
[12:17:44][Step 3/16] at JetBrains.Application.Components.SingletonDescriptor.CreateInstanceChecked(OnError onError, IComponentContainer container)
[12:17:44][Step 3/16] at JetBrains.Application.Components.SingletonDescriptor.GetValue()
[12:17:44][Step 3/16] at JetBrains.Application.Components.SignatureResolution.BindArguments(List`1 argumentDescriptors, String origin)
[12:17:44][Step 3/16] at JetBrains.Application.Extensibility.PartComponentDescriptor.CreateInstanceOf(Type type, IValueResolveContext context)
[12:17:44][Step 3/16] at JetBrains.Application.Components.SingletonDescriptor.CreateInstanceChecked(OnError onError, IComponentContainer container)
[12:17:44][Step 3/16] at JetBrains.Application.Components.SingletonDescriptor.GetValue()
[12:17:44][Step 3/16] at JetBrains.Application.Components.InitializationStrategyDefault.Schedule(Lifetime lifetime, IComponentDescriptor dsc)
[12:17:44][Step 3/16] at JetBrains.Application.Components.ComponentStorage.InstantiateDescriptors(IEnumerable`1 descriptors)
[12:17:44][Step 3/16] at JetBrains.Application.Components.ComponentStorage.ComposeDescriptors(ICollection`1 descriptors)
[12:17:44][Step 3/16] at JetBrains.Application.Environment.RunsProducts.RunProduct(Lifetime lifetimeProduct, IApplicationHost product, JetEnvironment environment, RunningProducts runningProducts, ILogger logger)
[12:17:44][Step 3/16] at JetBrains.Application.Environment.RunsProducts.<>c__DisplayClass2.<.ctor>b__0(Lifetime lifetimeShouldStart)
[12:17:44][Step 3/16] at JetBrains.DataFlow.Lifetimes.Define(Lifetime lifetime, String id, Action`2 FAtomic, ILogger logger)
[12:17:44][Step 3/16] at JetBrains.DataFlow.SequentialLifetimes.DefineNext(Action`2 FNext)
[12:17:44][Step 3/16] at JetBrains.DataFlow.Property`1.PropertyChangeSignal.Acknowledge(Action`1 handler, AddRemove addremove)
[12:17:44][Step 3/16] at JetBrains.DataFlow.Signal`1.<>c__DisplayClass2.<AdviseCore>b__0()
[12:17:44][Step 3/16] at JetBrains.DataFlow.Lifetime.AddBracket(Action FOpening, Action FClosing)
[12:17:44][Step 3/16] at JetBrains.Application.Environment.RunsProducts..ctor(Lifetime lifetime, EnvironmentZones zones, ReportsProductsAllowedToRun reportsProductsAllowedToRun, JetEnvironment environment, RunningProducts runningProducts, IApplicationHost product, ILogger logger, ZoneLicenseChecker zoneLicenseChecker, ZoneUserPreferenceChecker zoneUserPreferenceChecker, TimebombZoneFilter timebombZoneFilter, IInitializationStrategyProvider initializationStrategyProvider)
[12:17:44][Step 3/16] at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
[12:17:44][Step 3/16] at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
[12:17:44][Step 3/16] at JetBrains.Application.Extensibility.PartComponentDescriptor.CreateInstanceOf(Type type, IValueResolveContext context)
[12:17:44][Step 3/16] at JetBrains.Application.Components.SingletonDescriptor.CreateInstanceChecked(OnError onError, IComponentContainer container)
[12:17:44][Step 3/16] at JetBrains.Application.Components.SingletonDescriptor.GetValue()
[12:17:44][Step 3/16] at JetBrains.Application.Components.SignatureResolution.BindArguments(List`1 argumentDescriptors, String origin)
[12:17:44][Step 3/16] at JetBrains.Application.Extensibility.PartComponentDescriptor.CreateInstanceOf(Type type, IValueResolveContext context)
[12:17:44][Step 3/16] at JetBrains.Application.Components.SingletonDescriptor.CreateInstanceChecked(OnError onError, IComponentContainer container)
[12:17:44][Step 3/16] at JetBrains.Application.Components.SingletonDescriptor.GetValue()
[12:17:44][Step 3/16] at JetBrains.Application.Components.InitializationStrategyDefault.Schedule(Lifetime lifetime, IComponentDescriptor dsc)
[12:17:44][Step 3/16] at JetBrains.Application.Components.ComponentStorage.InstantiateDescriptors(IEnumerable`1 descriptors)
[12:17:44][Step 3/16] at JetBrains.Application.Components.ComponentStorage.ComposeDescriptors(ICollection`1 descriptors)
[12:17:44][Step 3/16] at JetBrains.Application.Environment.JetEnvironment..ctor(Lifetime lifetime, JetHostParametersCaller host)
[12:17:44][Step 3/16] at JetBrains.Application.Environment.JetEnvironment.<>c__DisplayClasse.<InternalCreate>b__b()
[12:17:44][Step 3/16] at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
[12:17:44][Step 3/16] at JetBrains.Application.Environment.JetEnvironment.InternalCreate(LifetimeDefinition lifetimeDefinition, JetHostParametersCaller host, JetEnvironment& environment)
[12:17:44][Step 3/16] at JetBrains.Application.Environment.JetEnvironment.CreateAndRun(Full hostparams)
[12:17:44][Step 3/16] at JetBrains.CommandLine.DupFinder.DupFinderProgram.Main(Assembly assembly, HostInfo hostInfo, String[] args)
[12:17:44][Step 3/16] at JetBrains.CommandLine.DupFinder.DupFinderProgram.Main(String[] args)
[12:17:44][Step 3/16] "
[12:17:44][Step 3/16]
[12:17:44][Step 3/16] Unsupported FrameworkVersion 4.2
[12:17:44][Step 3/16]
[12:17:44][Step 3/16] --- EXCEPTION #1/1 [LoggerException]
[12:17:44][Step 3/16] Message = "Unsupported FrameworkVersion 4.2"
[12:17:44][Step 3/16] ExceptionPath = Root
[12:17:44][Step 3/16] ClassName = JetBrains.Util.LoggerException
[12:17:44][Step 3/16] HResult = COR_E_APPLICATION=80131600
[12:17:44][Step 3/16] StackTraceString = "
[12:17:44][Step 3/16] at JetBrains.Util.Frameworks.FrameworkDetectionUtils.GetNetFrameworkDirectory(Version version)
[12:17:44][Step 3/16] at JetBrains.Application.platforms.SystemFrameworkLocationHelper.GetMsBuildDirectory(Version version)
[12:17:44][Step 3/16] at JetBrains.Application.platforms.FrameworkDetectionHelperBase.GetPlatformInfoFromFrameworkDir(FileSystemPath frameworkDir, PlatformID platformID, Func`2 getAssemblyFolders, Func`2 getRuntimeDir, Func`2 checkFramework)
[12:17:44][Step 3/16] at JetBrains.Application.platforms.FrameworkDetectionHelperBase.<ProcessFrameworksFromReferenceAssembliesFolder>d__c.MoveNext()
[12:17:44][Step 3/16] at JetBrains.Application.platforms.FrameworkDetectionHelperBase.<GetFrameworksFromReferenceAssembliesFolder>d__0.MoveNext()
[12:17:44][Step 3/16] at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
[12:17:44][Step 3/16] at JetBrains.Application.platforms.NetPlatformsProvider.GetPlatforms()
[12:17:44][Step 3/16] at JetBrains.Application.platforms.PlatformManagerImpl.CollectPlatformsFromProvider(IPlatformsProvider provider, IDictionary`2 platformsByProvider, IDictionary`2 prefixesByProvider)
[12:17:44][Step 3/16] at JetBrains.Application.platforms.PlatformManagerImpl.<.ctor>b__0(IPlatformsProvider provider)
[12:17:44][Step 3/16] at JetBrains.DataFlow.Viewable.<>c__DisplayClass1d`1.<View>b__1b(Lifetime valueLifetime, TValue value)
[12:17:44][Step 3/16] at JetBrains.Application.Components.ViewableValueResolver.ViewableComponentDescriptor`1.<>c__DisplayClass1.<View>b__0(Lifetime descriptorLifetime, IComponentDescriptor descriptor)
[12:17:44][Step 3/16] at JetBrains.Application.Components.ComponentStorage.View[T](Lifetime lifetime, Action`2 viewer)
[12:17:44][Step 3/16] at JetBrains.Application.Components.ViewableValueResolver.ViewableComponentDescriptor`1.View(Lifetime lifetime, Action`2 viewer)
[12:17:44][Step 3/16] at JetBrains.Application.platforms.PlatformManagerImpl..ctor(Lifetime lifetime, IFrameworkDetectionHelper frameworkDetectionHelper, IViewable`1 providers)
[12:17:44][Step 3/16] at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
[12:17:44][Step 3/16] at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
[12:17:44][Step 3/16] at JetBrains.Application.Extensibility.PartComponentDescriptor.CreateInstanceOf(Type type, IValueResolveContext context)
[12:17:44][Step 3/16] at JetBrains.Application.Components.SingletonDescriptor.CreateInstanceChecked(OnError onError, IComponentContainer container)
[12:17:44][Step 3/16] at JetBrains.Application.Components.SingletonDescriptor.GetValue()
[12:17:44][Step 3/16] at JetBrains.Application.Components.SignatureResolution.BindArguments(List`1 argumentDescriptors, String origin)
[12:17:44][Step 3/16] at JetBrains.Application.Extensibility.PartComponentDescriptor.CreateInstanceOf(Type type, IValueResolveContext context)
[12:17:44][Step 3/16] at JetBrains.Application.Components.SingletonDescriptor.CreateInstanceChecked(OnError onError, IComponentContainer container)
[12:17:44][Step 3/16] at JetBrains.Application.Components.SingletonDescriptor.GetValue()
[12:17:44][Step 3/16] at JetBrains.Application.Components.InitializationStrategyDefault.Schedule(Lifetime lifetime, IComponentDescriptor dsc)
[12:17:44][Step 3/16] at JetBrains.Application.Components.ComponentStorage.InstantiateDescriptors(IEnumerable`1 descriptors)
[12:17:44][Step 3/16] at JetBrains.Application.Components.ComponentStorage.ComposeDescriptors(ICollection`1 descriptors)
[12:17:44][Step 3/16] at JetBrains.Application.Environment.RunsProducts.RunProduct(Lifetime lifetimeProduct, IApplicationHost product, JetEnvironment environment, RunningProducts runningProducts, ILogger logger)
[12:17:44][Step 3/16] at JetBrains.Application.Environment.RunsProducts.<>c__DisplayClass2.<.ctor>b__0(Lifetime lifetimeShouldStart)
[12:17:44][Step 3/16] at JetBrains.DataFlow.Lifetimes.Define(Lifetime lifetime, String id, Action`2 FAtomic, ILogger logger)
[12:17:44][Step 3/16] at JetBrains.DataFlow.SequentialLifetimes.DefineNext(Action`2 FNext)
[12:17:44][Step 3/16] at JetBrains.DataFlow.Property`1.PropertyChangeSignal.Acknowledge(Action`1 handler, AddRemove addremove)
[12:17:44][Step 3/16] at JetBrains.DataFlow.Signal`1.<>c__DisplayClass2.<AdviseCore>b__0()
[12:17:44][Step 3/16] at JetBrains.DataFlow.Lifetime.AddBracket(Action FOpening, Action FClosing)
[12:17:44][Step 3/16] at JetBrains.Application.Environment.RunsProducts..ctor(Lifetime lifetime, EnvironmentZones zones, ReportsProductsAllowedToRun reportsProductsAllowedToRun, JetEnvironment environment, RunningProducts runningProducts, IApplicationHost product, ILogger logger, ZoneLicenseChecker zoneLicenseChecker, ZoneUserPreferenceChecker zoneUserPreferenceChecker, TimebombZoneFilter timebombZoneFilter, IInitializationStrategyProvider initializationStrategyProvider)
[12:17:44][Step 3/16] at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
[12:17:44][Step 3/16] at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
[12:17:44][Step 3/16] at JetBrains.Application.Extensibility.PartComponentDescriptor.CreateInstanceOf(Type type, IValueResolveContext context)
[12:17:44][Step 3/16] at JetBrains.Application.Components.SingletonDescriptor.CreateInstanceChecked(OnError onError, IComponentContainer container)
[12:17:44][Step 3/16] at JetBrains.Application.Components.SingletonDescriptor.GetValue()
[12:17:44][Step 3/16] at JetBrains.Application.Components.SignatureResolution.BindArguments(List`1 argumentDescriptors, String origin)
[12:17:44][Step 3/16] at JetBrains.Application.Extensibility.PartComponentDescriptor.CreateInstanceOf(Type type, IValueResolveContext context)
[12:17:44][Step 3/16] at JetBrains.Application.Components.SingletonDescriptor.CreateInstanceChecked(OnError onError, IComponentContainer container)
[12:17:44][Step 3/16] at JetBrains.Application.Components.SingletonDescriptor.GetValue()
[12:17:44][Step 3/16] at JetBrains.Application.Components.InitializationStrategyDefault.Schedule(Lifetime lifetime, IComponentDescriptor dsc)
[12:17:44][Step 3/16] at JetBrains.Application.Components.ComponentStorage.InstantiateDescriptors(IEnumerable`1 descriptors)
[12:17:44][Step 3/16] at JetBrains.Application.Components.ComponentStorage.ComposeDescriptors(ICollection`1 descriptors)
[12:17:44][Step 3/16] at JetBrains.Application.Environment.JetEnvironment..ctor(Lifetime lifetime, JetHostParametersCaller host)
[12:17:44][Step 3/16] at JetBrains.Application.Environment.JetEnvironment.<>c__DisplayClasse.<InternalCreate>b__b()
[12:17:44][Step 3/16] at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
[12:17:44][Step 3/16] at JetBrains.Application.Environment.JetEnvironment.InternalCreate(LifetimeDefinition lifetimeDefinition, JetHostParametersCaller host, JetEnvironment& environment)
[12:17:44][Step 3/16] at JetBrains.Application.Environment.JetEnvironment.CreateAndRun(Full hostparams)
[12:17:44][Step 3/16] at JetBrains.CommandLine.DupFinder.DupFinderProgram.Main(Assembly assembly, HostInfo hostInfo, String[] args)
[12:17:44][Step 3/16] at JetBrains.CommandLine.DupFinder.DupFinderProgram.Main(String[] args)
[12:17:44][Step 3/16] "
[12:17:44][Step 3/16]
 
 
There are no projects for .net 4.2 in my solution, but .net 4.2 June CTP installed on machine for legacy reasons, for other projects. How to fix this?
3 comments

Hi Alex,

Could you please try run the same build on agent machine in the working directory via command line under the same user that the agent is running under? Please follow the steps described in the section. Does the build work as expected?

If the build succeeds from the console but still fails in TeamCity, please attach logs requested in the section linked. Thank you!

0

In build log I found that this command generates error:

D:\TeamCityBuildAgent\work\7da3e617e4690aa>D:\TeamCityBuildAgent\plugins\dotnet-tools\bin\dupfinder.exe /config=D:\TeamCityBuildAgent\temp\agentTmp\dotnet-tools-dupfinder.con
fig /logFile=D:\TeamCityBuildAgent\temp\agentTmp\dotnet-to
ols-dupfinder.log

D:\TeamCityBuildAgent\work\7da3e617e4690aa - this is directory of build.

But if dupfinder.exe started from command line without parameters, it shows the same error.

 

1

Looks like a problem in dupfinder.exe when it detects .net versions, installed on computer, and something goes wrong when 4.2 June CTP installed.

0

Please sign in to leave a comment.