project-system icon indicating copy to clipboard operation
project-system copied to clipboard

Default C# Console (.NET Framework) project template and the DocumentationFile location

Open KirillOsenkov opened this issue 8 years ago • 5 comments

By default if I enable the doc file for a new C# console app (.NET Framework), non SDK style, it generates bin\Debug\ConsoleApp9.xml.

Isn't this wrong? Then I see this during the build:

Did not copy from file "bin\Debug\ConsoleApp9.xml" to file "bin\Debug\ConsoleApp9.xml" because the "SkipUnchangedFiles" parameter was set to "true" in the project and the files' sizes and timestamps match.

I'd expect the right thing there would be to tell Csc to output it to obj\Debug\ConsoleApp9.xml, so that this step then copies it from obj to bin?

KirillOsenkov avatar Nov 28 '17 03:11 KirillOsenkov

@nguerrera @andygerlicher - do you know about this (and where it should live)?

Pilchie avatar Nov 28 '17 17:11 Pilchie

This default comes from the property pages/project system, right?

davkean avatar Nov 28 '17 22:11 davkean

yup, the old one

KirillOsenkov avatar Nov 28 '17 23:11 KirillOsenkov

It doesn't seem to be breaking incrementality as far as I could see or have any other consequences, but it worries me. Also that the path is hardcoded vs. using a $(OutputPath) or $(OutDir). Should be $(IntermediateOutputPath)\$(AssemblyName).xml or something.

KirillOsenkov avatar Nov 28 '17 23:11 KirillOsenkov

$(IntermediateOutputPath) won't (necessarily) be set in the body of the project so project system can't write that into the project.

This really should always have just been a boolean. This shouldn't be different than pdbs. We did the work in the SDK for GenerateDocumentationFile=true to do the right thing for you, but property pages still haven't caught up: #368

We could consider moving GenerateDocumentationFile=true down to msbuild common targets so that non-SDK projects could get the nicer behavior too.

nguerrera avatar Nov 28 '17 23:11 nguerrera