Skip to content

Add support of nugetsource for local directory.#2621

Open
Jarod42 wants to merge 1 commit intopremake:masterfrom
Jarod42:nugetsource_directory
Open

Add support of nugetsource for local directory.#2621
Jarod42 wants to merge 1 commit intopremake:masterfrom
Jarod42:nugetsource_directory

Conversation

@Jarod42
Copy link
Contributor

@Jarod42 Jarod42 commented Feb 14, 2026

Add zip.list to get list of files from a zip file.

What does this PR do?

Add support for nugetsource to use local directory

How does this PR change Premake's behavior?

No changes of previous script expected, just new behavior

Anything else we should know?

I need to get list of files from zip/nupkg file,
So I also added zip.list

Testing with https://github.com/Jarod42/wxWidgets_nuget_test

Not sure best way to add UTs for that.
Adding dummy zip file nuget package seems not really good.

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

@Jarod42 Jarod42 marked this pull request as ready for review February 16, 2026 11:43

Premake 5.0.0-alpha12 or later.
Nuget "galleries" since Premake 5.0.0-alpha12 or later.
Local directory since Premake 5.0.0-beta9 or later.
Copy link
Member

Choose a reason for hiding this comment

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

5.0.0 -- The next release is 5.0 stable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed.

nugetsource "https://api.nuget.org/v3/index.json"
```

```lua
Copy link
Member

Choose a reason for hiding this comment

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

Add a comment to both the original snippet and this snippet describing it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added.

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I should have been more specific. This is what I'm looking for: https://premake.github.io/docs/defines/ -- Not in the code block itself, but a snippet above describing what the example does.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved.

### Parameters ###

`url` is the NuGet v3 feed URL.
`url` is the NuGet v3 feed URL, or local directory.
Copy link
Member

Choose a reason for hiding this comment

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

No comma needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed


### Availability ###

Premake 5.0.0-beta9 or later.
Copy link
Member

Choose a reason for hiding this comment

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

drop beta nomenclature

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed.


-- It should be possible to implement this for platforms other than
-- Windows, but we'll need to figure out where the NuGet cache is on
-- these platforms (or if they even have one).
Copy link
Member

Choose a reason for hiding this comment

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

Can we write an issue to track that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, moved code BTW.
Not sure how Nuget is used outside MSVC.

Copy link
Member

@nickclark2016 nickclark2016 Feb 24, 2026

Choose a reason for hiding this comment

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

It's used with dotnet on MacOS, Linux, and Windows in addition to the native C++ packages on Windows. That said, Microsoft recommends vcpkg now for native projects.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added #2630

@Jarod42 Jarod42 force-pushed the nugetsource_directory branch from 4637391 to 6cc0bd0 Compare February 25, 2026 09:06
nugetsource "https://api.nuget.org/v3/index.json"
```

```lua
Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I should have been more specific. This is what I'm looking for: https://premake.github.io/docs/defines/ -- Not in the code block itself, but a snippet above describing what the example does.

Add `zip.list` to get list of files from a zip file.
@Jarod42 Jarod42 force-pushed the nugetsource_directory branch from 6cc0bd0 to 0c09957 Compare February 27, 2026 08:12
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.

2 participants