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

Unable to find output path of current compilation from analyzer #29491

Closed
msbasanth opened this issue Aug 24, 2018 · 4 comments
Closed

Unable to find output path of current compilation from analyzer #29491

msbasanth opened this issue Aug 24, 2018 · 4 comments
Labels
Area-Analyzers Concept-API This issue involves adding, removing, clarification, or modification of an API. Question Resolution-By Design The behavior reported in the issue matches the current design
Milestone

Comments

@msbasanth
Copy link

Version Used:
v2.6.0

Steps to Reproduce:

  1. There is no API exposed for identifying OutputPath used by the current compilation session [from analyzer implementation].
  2. Currently I tried reading CSPROJ for finding the OutputPath by checking the current PropertyGroup.
  3. Need Platform used by the compilation to identify the PropertyGroup.
    Observation:
    CompilationOptions.Platform gives the PlatformTarget tag inside the PropertyGroup which may or maynot be matching Platfrom inside 'Condition'. So we cannot rely on CompilationOptions.Platform.

Expected Behavior:
An API directly gives which is the OutputPath used by the compilation.

Actual Behavior:
No API gives which is the OutputPath used by the compilation.

Regards
Basanth

@sharwell sharwell added Area-Analyzers Concept-API This issue involves adding, removing, clarification, or modification of an API. labels Aug 28, 2018
@sharwell sharwell added this to the 15.9 milestone Aug 28, 2018
@sharwell
Copy link
Member

Analyzers are not expected to access the file system on which the project is located. In fact, analyzers are allowed to run on compilations that are not located on the file system at all, e.g. when operating on a Workspace that directly accesses data for a commit stored in Git without checking out the files locally.

@mavasani should be able to provide more clarification about the usage of these APIs.

@mavasani
Copy link
Contributor

@msbasanth As mentioned by @sharwell, analyzers and compilations in general are neither tied to a file system nor a specific host (such as command line compiler or VS IDE live analysis). Can you please clarify why you need the file path? What is your analysis scenario?

@msbasanth
Copy link
Author

This query is related to #23673

I could not retrieve the XML Documentation of an assembly from an analyzer for symbols from a custom assembly referenced. XmlDocumentationProvider is internal, and ISymbol.GetDocumentationCommentXml() returns string.Empty.

To read the XML Documentation from the Output directory, so that I can parse it for analyzing the XML documentation.

@jinujoseph jinujoseph modified the milestones: 15.9, Unknown, 16.0.P1 Sep 20, 2018
@mavasani
Copy link
Contributor

@msbasanth I am going to close this issue as the workaround you are trying to get around #23673 is not supported. Please use #23673 to track your required feature request.

@mavasani mavasani removed their assignment Oct 29, 2018
@mavasani mavasani added the Resolution-By Design The behavior reported in the issue matches the current design label Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Analyzers Concept-API This issue involves adding, removing, clarification, or modification of an API. Question Resolution-By Design The behavior reported in the issue matches the current design
Projects
None yet
Development

No branches or pull requests

4 participants