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

add C# documentationFile feature #2103

Merged
merged 28 commits into from
Sep 28, 2024
Merged

Conversation

lolrobbe2
Copy link
Contributor

@lolrobbe2 lolrobbe2 commented Jun 29, 2023

closes #359

What does this PR do?

this PR makes it possible to enable the xmlDocumentationFile in visualStudio C# projects.

vs

How does this PR change Premake's behavior?

No existing behavior should be changed, only functionality has been added.

Anything else we should know?

There are 2 ways of enabeling this new feature, either by an empty string "", or by specifying a custom dirrectory. the projectName will automaticcaly be appended to this path with the xml extension added.

when an empty string is entered the resulting filepath will be made consisting of the targetDir and the projectName with the xml extension appended to it.

this is the preffered method because visualstudio can by default only recognize when dll and xmlDocumentationFile are in the sam folder.

hacky ways that wher used before this feature
solution to 359 'closed'
Did you check all the boxes?

  • Focus on a single fix or feature; remove any unrelated formatting or code changes
  • Add unit tests showing fix or feature works; all tests pass
  • Mention any related issues (put closes #XXXX in comment to auto-close issue when PR is merged)
  • Follow our coding conventions
  • Minimize the number of commits
  • Align documentation to your changes

You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!

@lolrobbe2
Copy link
Contributor Author

forgot to make a new sub branch on my fork :(

modules/vstudio/tests/cs2005/test_documentation_file.lua Outdated Show resolved Hide resolved
src/_premake_init.lua Outdated Show resolved Hide resolved
modules/vstudio/tests/cs2005/test_documentation_file.lua Outdated Show resolved Hide resolved
website/docs/documentationFile.md Outdated Show resolved Hide resolved
website/docs/documentationFile.md Outdated Show resolved Hide resolved
modules/vstudio/tests/cs2005/test_documentation_file.lua Outdated Show resolved Hide resolved
modules/vstudio/vs2005_dotnetbase.lua Outdated Show resolved Hide resolved
website/docs/documentationFile.md Outdated Show resolved Hide resolved
website/docs/documentationFile.md Outdated Show resolved Hide resolved
@nickclark2016
Copy link
Member

Currently away on travel. Will review when back near my computer.

Copy link
Member

@nickclark2016 nickclark2016 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, the code LGTM. Just a few comments on the documentation.

website/docs/documentationFile.md Outdated Show resolved Hide resolved
@Jarod42
Copy link
Contributor

Jarod42 commented Oct 5, 2023

Missing documentation file for: documentationfile

Copy link
Member

@nickclark2016 nickclark2016 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the docs are missing from the sidebar and such.

@lolrobbe2
Copy link
Contributor Author

lolrobbe2 commented Oct 5, 2023

my bad updated it and added it to the sidebar.js file. Also tested it using npm!

@lolrobbe2
Copy link
Contributor Author

lolrobbe2 commented Oct 14, 2023

Can you just show me the doc mistakes because i can't see it anymore! PLS

@nickclark2016
Copy link
Member

I think the issue with the build at this point is a mismatch in capitalization in the documentation (documentationFile.md vs documentationfile.md).

@lolrobbe2
Copy link
Contributor Author

changed the name to be documentationfile.md

Beernaert Robbe added 2 commits June 9, 2024 19:17
@lolrobbe2
Copy link
Contributor Author

Looks like the docs are missing from the sidebar and such.

image

it is in there

--
-- tests/actions/vstudio/cs2005/test_documentation_file.lua
-- Test DocumentationFile feature Visual Studio 2005+ C# project.
-- Copyright (c) 2012-2023 Jason Perkins and the Premake project
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are in 2024 ;-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea it's been a while ;-) but iam gonna stick whit it!

wks = test.createWorkspace()
configurations { "Debug", "Release" }
language "C#"
targetdir("test\\targetDir")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly

Suggested change
targetdir("test\\targetDir")
targetdir("test/targetDir")


### Availability ###

Premake 5.0 or later.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure which beta we are currently to be more accurate.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be beta3, so Premake 5.0 beta3 or later..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will change that

modules/vstudio/tests/cs2005/test_documentation_file.lua Outdated Show resolved Hide resolved
website/docs/documentationfile.md Outdated Show resolved Hide resolved
website/docs/documentationfile.md Outdated Show resolved Hide resolved
@lolrobbe2
Copy link
Contributor Author

made it so that when you just want default behaviour aka true to be used you use documentationfile(true) instead of documentationfile "".

i was thinking to allow custom file name when you provide an path wich end with .xml and is ofcoarse a valid path.

would like to now your opion on this!

@nickclark2016 nickclark2016 merged commit 711f1ff into premake:master Sep 28, 2024
14 checks passed
noresources pushed a commit to depinxi/premake-core that referenced this pull request Nov 8, 2024
* added C# documentationFile feature

* wrote unit tests for C# documentationFile

* removed null opt to not enable documentationFile

* add documentationFile documentation

* add documentationFile documentation

* added some extra info for custom dir

* implemented comments

* fixed title

* fixed spelling + addd test

* fixed spelling + addd test

* improved grammar / capitalization

* changed styling of the documentation

* changed docs to fit api

* added MSFT links to See Also

* fixed capitalization

* changed wording/ capitalization of documentation

* removed the slashes!

* added documenationfile to the sidebar

* Rename documentationFile.md to documentationfile.md

* added support for newer <GenerateDocumentationFile> tag
(functional result stays the same)

* changed tests

* changed default from documentationfile "" to documentationfile(true)

* changed documentation to match!

* changed availability in docs for documentationfile.md

---------

Co-authored-by: robbe beernaert <[email protected]>
Co-authored-by: Beernaert Robbe <[email protected]>
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

Successfully merging this pull request may close these issues.

How about the Visual Studio's XmlDoc?
4 participants