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

DocumentationFile cannot be set in project file #703

Closed
AArnott opened this issue Jan 21, 2017 · 4 comments
Closed

DocumentationFile cannot be set in project file #703

AArnott opened this issue Jan 21, 2017 · 4 comments

Comments

@AArnott
Copy link
Contributor

AArnott commented Jan 21, 2017

  1. Create a new .NET Core netstandard class library
  2. In project designer, check the box to generate a documentation file

The value set for the path is \projectname.xml, so the build fails because it tries to write to the root directory.

Trying to fix this manually in the project file fails all around:

  1. "projectname.xml" writes to the project directory
  2. "bin\$(Configuration)\$(TargetFramework)\projectname.xml" fails because $(TargetFramework) isn't set at that point in the project.
  3. "$(TargetDir)\..." or $(OutDir) fails for the same reason: not defined yet.

In fact more generally, how on earth are we supposed to write properties in our project file that depend on these properties that are only defined in an imported .targets file that is implicitly defined, as is the case with the Sdk import?

Using d15rel 26119.0

@nguerrera
Copy link
Contributor

@AArnott You can now also set only GenerateDocumentationFile=true and it will pick the appropriate path. (Like pdb.). It looks like the property pages were not updated to account for this. There was supposed to be a capability to drive this.

Cc @dsplaisted who worked on it

Also, I don't understand (2). TargetFramework is either set in the project for single targeting or passed in as global property for multi targeting. So you shouldn't have problems referencing it. Is the issue that the project system is saving DocumentationFile above TargetFramework?

@nguerrera
Copy link
Contributor

I see dotnet/project-system#368 is still open for handling the boolean case.

@nguerrera
Copy link
Contributor

There's nothing to change in the SDK here. Project system work is underway.

@AArnott
Copy link
Contributor Author

AArnott commented Jan 25, 2017

You're right about (2). It works when I hand author it. Thanks.

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

No branches or pull requests

2 participants