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

Directory.Build.props file not being recognized #733

Closed
Evelios opened this issue Jan 6, 2022 · 3 comments
Closed

Directory.Build.props file not being recognized #733

Evelios opened this issue Jan 6, 2022 · 3 comments

Comments

@Evelios
Copy link

Evelios commented Jan 6, 2022

Documentation building issue

I've been unable to build the documentation for my project completely. I keep getting stuck at the same step getting the error please set '<Attribute...>' in 'Directory.Build.props'. I've tried to fix this issue by including the Build.Directory.props file at the root of the project but it appears that the program is not picking that file up when processing my Geometry.fsproj file.

$ fsdocs watch

Gives me the following error

Done executing task "Fsc".
Done building target "CoreCompile" in project "Geometry.fsproj".
Done building project "Geometry.fsproj".
Build FAILED.

log - 
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1433.Invoke(String message) in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\printf.fs:line 1433
   at [email protected](String p) in /home/runner/work/FSharp.Formatting/FSharp.Formatting/src/fsdocs-tool/ProjectCracker.fs:line 378
Warning: While cracking project files, no project files succeeded.
please set '<FsDocsLicenseLink>' in 'Directory.Build.props'
please set '<FsDocsReleaseNotesLink>' in 'Directory.Build.props'
please set '<Version>' in 'Directory.Build.props'
please set '<RepositoryUrl>' in 'Directory.Build.props'
using extra content from /Users/tommy/.dotnet/tools/.store/fsdocs-tool/14.0.1/fsdocs-tool/14.0.1/extras

/Build.Directory.props

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

    <PropertyGroup>
        <Version>0.0.1</Version>
        <PackageVersion>0.0.1</PackageVersion>
        <Product>Fsharp.Geometry</Product>
        <Authors>Thomas Waters</Authors>
        <Copyright>Thomas Waters</Copyright>
        <Company/>
        <PackageTags>geometry, fsharp, f#</PackageTags>
        <PackageLicense>MIT</PackageLicense>
        
        <RepositoryUrl>https://github.com/Evelios/fsharp-geometry</RepositoryUrl>
        <PackageProjectUrl>https://www.nuget.org/packages/Fsharp.Geometry/</PackageProjectUrl>

        <RepositoryType>git</RepositoryType>
        <NeutralLanguage>en</NeutralLanguage>
    </PropertyGroup>

    <PropertyGroup>
        <FsDocsLicenseLink>https://opensource.org/licenses/MIT</FsDocsLicenseLink>
        <FsDocsReleaseNotesLink>https://www.nuget.org/packages/Fsharp.Geometry/</FsDocsReleaseNotesLink>
    </PropertyGroup>
</Project>
@nhirschey
Copy link
Collaborator

A shot in the dark: it looks like it’s failing before the build props:

...

Build FAILED.
...

Warning: While cracking project files, no project files succeeded.

Do you know which project is failing to build? It’s probably the same one that the project cracking tool is failing on.

To narrow it down, maybe you could try using the input parameter such as fsdocs —input src/… to target your three projects individually one by one? That could help narrow down the problem to which project is failing.

@rdipardo
Copy link

Is there also a solution file (e.g. "Geometry.sln") under the project directory?
If yes, it may be similar to the problem reported at #680.

A while ago I tried looking into that issue by taking the steps that were suggested already.
The following is quoted from a longer comment, on the topic of fsdoc 11.2.0 choking on multi-project builds:

This appears to only affect input files in solution format; *.fsproj files can still be processed one by one:

$ dotnet fsdocs build --projects $(pwd)/FsDocsSample.Lib1/FsDocsSample.Lib1.fsproj --strict
cracking projects...
please set '<FsDocsLicenseLink>' in 'Directory.Build.props'
please set '<FsDocsReleaseNotesLink>' in 'Directory.Build.props'
please set '<RepositoryUrl>' in 'Directory.Build.props'
please set '<FsDocsLicenseLink>' in 'Directory.Build.props'
please set '<FsDocsReleaseNotesLink>' in 'Directory.Build.props'
please set '<RepositoryUrl>' in 'Directory.Build.props'

Inputs for API Docs:
    /home/rob/dev/FsDocsSample/FsDocsSample.Lib1/bin/Debug/netstandard2.0/FsDocsSample.Lib1.dll

Substitutions/parameters:
  root --> /FsDocsSample/
  fsdocs-authors --> FsDocsSample.Lib1
  fsdocs-collection-name --> FsDocsSample
  fsdocs-collection-name-link --> /FsDocsSample/
  fsdocs-logo-src --> /FsDocsSample/img/logo.png
  fsdocs-navbar-position --> fixed-left
  fsdocs-theme --> default
  fsdocs-logo-link --> /FsDocsSample/
  fsdocs-package-project-url --> /FsDocsSample/
  fsdocs-package-tags -->
  fsdocs-package-version --> 1.0.0
using extra content from /home/rob/.nuget/packages/fsharp.formatting.commandtool/11.2.0/extras
note, no template files: 'docs/reference/_template.html', 'docs/_template.html', 'docs/reference/_template.md', 'docs/_template.md' found, using default template /home/rob/.nuget/packages/fsharp.formatting.commandtool/11.2.0/templates/_template.html

API docs:
  generating model for 1 assemblies in API docs...
  loading 1 assemblies...
isNetCoreApp = true
  registering entities for assembly FsDocsSample.Lib1...
  reading XML doc for /home/rob/dev/FsDocsSample/FsDocsSample.Lib1/bin/Debug/netstandard2.0/FsDocsSample.Lib1.dll...
  reading assembly data for /home/rob/dev/FsDocsSample/FsDocsSample.Lib1/bin/Debug/netstandard2.0/FsDocsSample.Lib1.dll...
  collecting namespaces...
  found namespace FsDocsSample.Lib1 in assembly FsDocsSample.Lib1...
  found 2 entities in namespace FsDocsSample.Lib1...
  found 1 namespaces...

Content:

Write API Docs:
  Generating output/reference/index.html
  Generating output/reference/fsdocssample-lib1.html
  Generating output/reference/fsdocssample-lib1-imyinterface1.html
  Generating output/reference/fsdocssample-lib1-myexception.html

Write Content:

$ dotnet fsdocs build --projects $(pwd)/FsDocsSample.Lib2/FsDocsSample.Lib2.fsproj --strict
discarding project state in '.fsdocs/cache' as now invalid
cracking projects...
please set '<FsDocsLicenseLink>' in 'Directory.Build.props'
please set '<FsDocsReleaseNotesLink>' in 'Directory.Build.props'
please set '<RepositoryUrl>' in 'Directory.Build.props'
please set '<FsDocsLicenseLink>' in 'Directory.Build.props'
please set '<FsDocsReleaseNotesLink>' in 'Directory.Build.props'
please set '<RepositoryUrl>' in 'Directory.Build.props'

Inputs for API Docs:
    /home/rob/dev/FsDocsSample/FsDocsSample.Lib2/bin/Debug/netstandard2.0/FsDocsSample.Lib2.dll

Substitutions/parameters:
  root --> /FsDocsSample/
  fsdocs-authors --> FsDocsSample.Lib2
  fsdocs-collection-name --> FsDocsSample
  fsdocs-collection-name-link --> /FsDocsSample/
  fsdocs-logo-src --> /FsDocsSample/img/logo.png
  fsdocs-navbar-position --> fixed-left
  fsdocs-theme --> default
  fsdocs-logo-link --> /FsDocsSample/
  fsdocs-package-project-url --> /FsDocsSample/
  fsdocs-package-tags -->
  fsdocs-package-version --> 1.0.0
using extra content from /home/rob/.nuget/packages/fsharp.formatting.commandtool/11.2.0/extras
note, no template files: 'docs/reference/_template.html', 'docs/_template.html', 'docs/reference/_template.md', 'docs/_template.md' found, using default template /home/rob/.nuget/packages/fsharp.formatting.commandtool/11.2.0/templates/_template.html

API docs:
  generating model for 1 assemblies in API docs...
  loading 1 assemblies...
isNetCoreApp = true
  registering entities for assembly FsDocsSample.Lib2...
  reading XML doc for /home/rob/dev/FsDocsSample/FsDocsSample.Lib2/bin/Debug/netstandard2.0/FsDocsSample.Lib2.dll...
  reading assembly data for /home/rob/dev/FsDocsSample/FsDocsSample.Lib2/bin/Debug/netstandard2.0/FsDocsSample.Lib2.dll...
  collecting namespaces...
  found namespace FsDocsSample.Lib2 in assembly FsDocsSample.Lib2...
  found 2 entities in namespace FsDocsSample.Lib2...
  found 1 namespaces...

Content:

Write API Docs:
  Generating output/reference/index.html
  Generating output/reference/fsdocssample-lib2.html
  Generating output/reference/fsdocssample-lib2-mymodule2.html
  Generating output/reference/fsdocssample-lib2-imyinterface2.html

@Evelios
Copy link
Author

Evelios commented Feb 18, 2022

@rdipardo That doesn't seem to be the issue. I've been doing major refactoring on this project and I'm no longer seeing this issue. Thanks for the help

@Evelios Evelios closed this as completed Feb 18, 2022
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

3 participants