Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate MakeConstCS sample to be based off analyzer + codefix template project #3215

Closed
pawel-kedzior-sw opened this issue Jun 1, 2015 · 1 comment
Assignees
Milestone

Comments

@pawel-kedzior-sw
Copy link

Hi,
I struggle to run/debug MakeConstCS sample in VS2015 RC for some time already.
My steps were:
-> Checkout roslyn code-base (branch releases/VS2015RC)
-> Change references of project MakeConstCS to pick dlls from
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies*.dll
(instead of private build of Roslyn)
-> Open roslyn\src\Samples\Samples.sln
-> Set MakeConstCS to be the startup project and run VS2015.

  1. I can see that assembly MakeConstCS.dll is loaded into VS, but the flow never enters public API of MakeConstCS.DiagnostircAnalyzer class. Of course I do not see the expected warning to be displayed by the sample in Error List dialog of Visual Studio 14.0RoslynDev instance.
  2. For the second run of VS, the assembly is not loaded at all. Until I delete:
    C:\Users\AppData\Local\Microsoft\VisualStudio\14.0RoslynDev\ComponentModelCache*.*
    which brings me to 1. The *.err file which is there, does not suggest any problem with MakeConstCS.dll.

Menu 'Tools''Extensions and Updates' shows that 'Make Const for C#' is installed and enabled in 14.0RoslynDev instance.

At the same time, I can successfully run and debug ConvertToAutoPropertyCS sample.

Do you have any idea what I am doing wrong ? Is there any known issue with MakeConstCS example ?
What can I do to bring me closer to troubleshoot the issue ?

Thanks

@mavasani
Copy link
Contributor

We need to migrate MakeConstCS and MakeConstVB to be based on our latest analyzer + code fix template project, i.e. needs to have portable analyzer project + unit test project + VSIX project with analyzer asset.

@zuraff You can workaround for now by creating a new analyzer + code fix project from the templates, and copying the contents of MakeConst analyzer/fixer into that project and doing an F5.

@mavasani mavasani added Bug and removed Question labels Dec 14, 2015
@mavasani mavasani removed their assignment Dec 14, 2015
@mavasani mavasani removed this from the 1.2 milestone Dec 14, 2015
@mavasani mavasani changed the title How to run MakeConstCS example in VS2015RC Migrate MakeConstCS sample to be based off analyzer + codefix template project Dec 14, 2015
@srivatsn srivatsn assigned ghost Jan 6, 2016
@srivatsn srivatsn added this to the 1.2 milestone Jan 6, 2016
@srivatsn srivatsn modified the milestones: 1.3, 1.2 Feb 29, 2016
@srivatsn srivatsn assigned mavasani and unassigned ghost Feb 29, 2016
mavasani added a commit to mavasani/roslyn that referenced this issue Apr 29, 2016
…sset.

I verified that make const diagnostics now show up when these projects are set as startup projects and deployed to dev hive.

Fixes dotnet#3215
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants