fsprojects-archive / zzarchive-VisualFSharpPowerTools

[ARCHIVED] Power commands for F# in Visual Studio
http://fsprojects.github.io/VisualFSharpPowerTools/
Apache License 2.0
310 stars 77 forks source link

PowerTools crashes during visual studio launch time #1498

Open abhiranjankumar00 opened 7 years ago

abhiranjankumar00 commented 7 years ago

FSharp PowerTools is crashing with following exception after last upgrade. Seems to be some issue with tasklist comment manager.

Below is the related component from ActivityLog.xml

  <entry>
    <record>260</record>
    <time>2017/03/02 08:35:39.519</time>
    <type>Error</type>
    <source>F# Power Tools</source>
    <description>Exception Message: No exports were found that match the constraint: ContractName FSharp.Editing.VisualStudio.TaskList.CrossSolutionTaskListCommentManager RequiredTypeIdentity FSharp.Editing.VisualStudio.TaskList.CrossSolutionTaskListCommentManager Stack Trace: at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition) at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportsCore(Type type, Type metadataViewType, String contractName, ImportCardinality cardinality) at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValueCore[T](String contractName, ImportCardinality cardinality) at FSharpVSPowerTools.PowerToolsCommandsPackage.PerformRegistrations(IGeneralOptions generalOptions)</description>
  </entry>

Known workarounds

None.

Tried following

Related information

vasily-kirichenko commented 7 years ago

@abhiranjankumar00 turn off task list comments on settings dialog.

This project is not actively maintained anymore, everything has been ported to Visual F# Tools and is available in VS 2017.

@smoothdeveloper may fix the bug, but frankly I don't see the point. Just use VS 2017.

abhiranjankumar00 commented 7 years ago

Thanks.

Version ~2.5.2~ 2.5.0 works for this config. Can't upgrade to 2017, on work system.

dsyme commented 7 years ago

@vasily-kirichenko Many people are stuck on VS2013 and VS2015 for a long time to come (enterprises are often 2-5 years behind in VS editions). Can we do a patch release to turn off task list comments by default?

smoothdeveloper commented 7 years ago

@abhiranjankumar00 can you confirm disabling the setting @vasily-kirichenko points at is a valid workaround?

When I compile/run VFPT in DEBUG, I've seen error related to TODO comment extractor which I think is related to this component, but haven't seen the issue in RELEASE builds.

I'm still in process of completing update to latest FCS in #1496 but there are obscure test failures I haven't had chance to look at (beside the one related to Fantomas, which will be fixed with the new nuget package).

abhiranjankumar00 commented 7 years ago

Nope, it's not working even after disabling task list. No release since 2.5.2 has been working for me. Had to switch to 2.5.0.

In later versions, there's no rename refactoring option, no code outlining and few more. While generating references for F# interactive this exception is thrown:

[VFPT][Error 11:50:36 AM] Exception Message: Expression of type 'Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[System.String[],System.String[]]]' cannot be used for return type 'Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[System.String[],System.String[]]]'
Stack Trace:    at System.Linq.Expressions.Expression.ValidateLambdaArgs(Type delegateType, Expression& body, ReadOnlyCollection`1 parameters)
   at System.Linq.Expressions.Expression.Lambda[TDelegate](Expression body, String name, Boolean tailCall, IEnumerable`1 parameters)
   at System.Linq.Expressions.Expression.Lambda[TDelegate](Expression body, Boolean tailCall, IEnumerable`1 parameters)
   at System.Linq.Expressions.Expression.Lambda[TDelegate](Expression body, ParameterExpression[] parameters)
   at FSharp.Editing.Reflection.precompileFieldGet[R](FieldInfo f)
   at FSharp.Editing.VisualStudio.ProjectSystem.ProjectProvider..ctor(Project project, FSharpFunc`2 getProjectProvider, FSharpFunc`2 onChanged)
   at FSharp.Editing.VisualStudio.Reference.FsiReferenceCommand.createProjectProvider(Project project)
   at <StartupCode$FSharp-Editing-VisualStudio>.$FsiReferenceCommand.clo@186-419.Invoke(String _arg3)
   at FSharp.Editing.VisualStudio.Reference.FsiReferenceCommand.generateReferenceFiles(Project project)
   at <StartupCode$FSharp-Editing-VisualStudio>.$FsiReferenceCommand.clo@202-425.Invoke(Project project)
   at Microsoft.FSharp.Core.OptionModule.Iterate[T](FSharpFunc`2 action, FSharpOption`1 option)
   at <StartupCode$FSharp-Editing-VisualStudio>.$FsiReferenceCommand.clo@200-424.Invoke(Unit _arg5)
   at FSharp.Editing.VisualStudio.Utils.protectOrDefault[a](FSharpFunc`2 f, a defaultVal)
vasily-kirichenko commented 7 years ago

Just use whatever version that works for you.

smoothdeveloper commented 7 years ago

@abhiranjankumar00 thanks for the update, I'm seeing this is running on VS2013 while I was testing in 2015.

For example that last message seems to be an issue with conflicting FSharp.Core, because one older version is loaded in VS2013 process.

I think your best course of action is to try to build the stuff locally to try to troubleshoot to make it work in VS2013 (I can help you with that) or to find the last release which effectively supports VS2013 (which we will put in the readme).

abhiranjankumar00 commented 7 years ago

I think your best course of action is to try to build the stuff locally to try to troubleshoot to make it work in VS2013 (I can help you with that)

Sure, I will try after somedays. Going on a vacation now.

to find the last release which effectively supports VS2013 (which we will put in the readme).

That's 2.5.0.