sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Need a setting in project.json to enable xml doc comments

Open muratg opened this issue 10 years ago • 28 comments

From @BillHiebert on April 27, 2015 15:6

This option is needed to allow generation of xml doc comments. It would also be picked up by tooling to provide diagnostics for broken or missing comments.

Copied from original issue: aspnet/dnx#1717

muratg avatar Dec 18 '15 16:12 muratg

From @Eilon on June 8, 2015 15:54

This is about generating the doc XML file. Nothing to do with comments in JSON :smile:

muratg avatar Dec 18 '15 16:12 muratg

From @Eilon on June 8, 2015 15:54

And BTW I thought we always generate it now, don't we? At most I think we'd have an option to turn it off (though, do we even need that?).

muratg avatar Dec 18 '15 16:12 muratg

From @BillHiebert on June 8, 2015 22:2

@davidfowl
Looks like that is the case. So I should just enable it by default instead of having it disabled by default.

muratg avatar Dec 18 '15 16:12 muratg

From @barrytang on June 10, 2015 5:28

Moved to U1.

@BillHiebert's comment:

I put in a small change to enable document comments in the language service since the runtime is generating the xml file anyway. However, Roslyn does a lot of validation (kind of like fxcop) when doc comments are enabled and I see 260 warnings in the error list for a new Web Application.

muratg avatar Dec 18 '15 16:12 muratg

From @barrytang on June 10, 2015 5:29

foo

muratg avatar Dec 18 '15 16:12 muratg

From @davidfowl on June 10, 2015 5:43

Uhhhh this cannot be on by default.

muratg avatar Dec 18 '15 16:12 muratg

From @BillHiebert on June 10, 2015 15:45

Nope. I punted the bug to update1 until there is a way to enable\disable the feature in project.json

muratg avatar Dec 18 '15 16:12 muratg

From @davidfowl on June 10, 2015 15:46

Sweet

muratg avatar Dec 18 '15 16:12 muratg

From @barrytang on July 17, 2015 21:38

@davidfowl, where are we at with the runtime change?

muratg avatar Dec 18 '15 16:12 muratg

From @davidfowl on July 17, 2015 21:49

@barrytang This bug isn't in a milestone and so it doesn't exist :smile:

muratg avatar Dec 18 '15 16:12 muratg

From @barrytang on July 17, 2015 22:44

@BillHiebert, can you update it? I don't seem to have permission to.

muratg avatar Dec 18 '15 16:12 muratg

From @BillHiebert on July 17, 2015 23:39

How do I do that?

muratg avatar Dec 18 '15 16:12 muratg

From @BillHiebert on July 17, 2015 23:43

Looks like I don't have permission either. I assume it is because this is in the Dnx project

muratg avatar Dec 18 '15 16:12 muratg

From @barrytang on July 18, 2015 5:22

@davidfowl, what kind of tool is this? :)

Can you set the milestone?

muratg avatar Dec 18 '15 16:12 muratg

From @davidfowl on July 18, 2015 5:26

/cc @muratg This needs to go through triage.

muratg avatar Dec 18 '15 16:12 muratg

From @Anderman on October 22, 2015 10:33

@muratg I found a incorrect xml documetation. Is this something that will be fixed later or do must I make a new issue of this

/// <summary>
        /// Initalizes a new instance of the <see cref="RoslynCompilationService"/> class.
        /// </summary>
        /// <param name="environment">The environment for the executing application.</param>
        /// <param name="loaderAccessor">
        /// The accessor for the <see cref="IAssemblyLoadContext"/> used to load compiled assemblies.
        /// </param>
        /// <param name="libraryManager">The library manager that provides export and reference information.</param>
        /// <param name="compilerOptionsProvider">
        /// The <see cref="ICompilerOptionsProvider"/> that provides Roslyn compilation settings.
        /// </param>
        /// <param name="host">The <see cref="IMvcRazorHost"/> that was used to generate the code.</param>
        public RoslynCompilationService(
            IApplicationEnvironment environment,
            IAssemblyLoadContextAccessor loaderAccessor,
            ILibraryExporter libraryExporter,
            ICompilerOptionsProvider compilerOptionsProvider,
            IMvcRazorHost host,
            IOptions<RazorViewEngineOptions> optionsAccessor)

muratg avatar Dec 18 '15 16:12 muratg

@Anderman That class is in MVC repo, please file a bug in that repo. This bug in particular tracks ability to generate XML doc comments file for your libraries and apps.

muratg avatar Dec 18 '15 16:12 muratg

Any hint about when this is going to be implemented?

jonathansotoan avatar Dec 20 '15 18:12 jonathansotoan

Also wondering about any roadmap status for this.

For now, I've been creating a shim .csproj file and adding all my library code to it so I can generate the XML needed for API documentation. Not sure if there's a better way to go about it, but it works.

nbarbettini avatar Feb 19 '16 16:02 nbarbettini

@nbarbettini I think it's already there, actually. In ASP.NET we started using these options: https://github.com/aspnet/HttpAbstractions/blob/dev/src/Microsoft.AspNetCore.Http/project.json#L12-L13

Eilon avatar Feb 19 '16 17:02 Eilon