jeffchen-codingconsultantco / CodeMetric

CodeMetric for Visual Studio
https://marketplace.visualstudio.com/items?itemName=JeffChenCodingConsultantCo.CodeMetricforVisualStudio
4 stars 2 forks source link

Support for Visual Studio 2017 #1

Open lethalshadow opened 7 years ago

lethalshadow commented 7 years ago

Could this extension be built for Visual Studio 2017 as well?

jeffchen-codingconsultantco commented 7 years ago

Hi @lethalshadow, I am working on it.

OsirisTerje commented 7 years ago

How is this proceeding?

jeffchen-codingconsultantco commented 7 years ago

@OsirisTerje , I have made some progress including refactor the project structure, and adding new code. Currently, I am blocked by a issue that VS2017 does not trigger data point creation code which is used to trigger the code for metric calculation.

brukwa commented 6 years ago

I had the same problem with VS 2017, but it turned out to be a problem with ICodeLensDataPointProvider implementation.

Try adding an Importing constructor

[ImportingConstructor]
public DataPointProvider([Import(typeof(SVsServiceProvider))] IServiceProvider service, IVisualStudioIntegrationService integration)
{
/// ... some ctor body
}

Also I have switched to Microsoft.VisualStudio.CodeSense.Roslyn which contains the Microsoft.VisualStudio.Alm.Roslyn.Client namespace

The SVsServiceProvider type can be found in public Microsoft.VisualStudio.Shell.Framework assembly.

jeffchen-codingconsultantco commented 6 years ago

@Brukwa , thank you for your help. I will give it a try.

norcino commented 5 years ago

Hi @jeffchen-codingconsultantco , my guess is that you abandoned the project, am I right?

jeffchen-codingconsultantco commented 5 years ago

Hi @jeffchen-codingconsultantco , my guess is that you abandoned the project, am I right?

Microsoft has opened CodeLens API for 3rd party extension. I guess I will have a look if there is a chance to migrate to official API. However, I guess other extension vendor has already started to provide new functionality base on this new API.

brukwa commented 5 years ago

Well it is somewhat official: VSSDK-Extensibility-Samples From what I saw theses classes are even documented.