Open Mackiovello opened 6 years ago
Hi @Mackiovello,
If you hope to enable dependency, could you create another issue or rename the title? It is not an easy task, so we hope to get more discussion. @KathleenDollard
Hi @wli3 thanks for the answer.
Currently we don't allow dependency in tools package.
What do you mean with that? What kind of dependencies are not supported? dotnet-serve has dependencies to external dependencies: https://github.com/natemcmaster/dotnet-serve/blob/master/src/dotnet-serve/dotnet-serve.csproj
Also only portable app is supported
What's the difference between a portable app and a self-contained app?
@Mackiovello please reference the above linked document. Dependency as in nuspec dependency. Project level dependency is allowed.
<dependencies>
<dependency id="runtime.win7-x64.runtime.native.Starcounter.Bluestar2" version="$version$" />
<dependency id="runtime.ubuntu.16.04-x64.runtime.native.Starcounter.Bluestar2" version="$version$" />
</dependencies>
@Mackiovello please reference the above linked document.
I understand, then I'll rename this issue to request support for dependency
in nuspec files.
There are two kinds of dependencies. Dependencies that can be included in the package, and dependencies that are to external packages. Global tools supports the first.
A self contained application is a runnable app that carries a copy of the .NET Core Runtime inside itself. Global tools doesn't support this for a few reasons - we assume the user of the package wants to decide what .NET Core Runtime to use within the targeted frameworks specified by the author. Self contained apps are comparatively giant (because they contain the core). More importantly though, current global tools rely on a shim that provides the app host to run the tool.
We may support running any executable in the future (which is what is needed for self-contained apps), but are looking for scenarios to aid prioritization (repo tools, credentials, and some other features are higher).
That makes sense, thanks for the explanation.
It would be neat if there was a clearer exception when this happens.
What do you want to do with this issue? I could close it as answered, or we could keep it as a feature request, or as an issue for the unclear exception.
@Mackiovello I would prefer to either close this issue or change the name to be "needs a clearer exception when..."
I would also appreciate you ensuring there is an issue for self-contained global tools, because that part is a feature request we should have if we don't already.
Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label.
Steps to reproduce
The nuspec for
runtime.native.Starcounter.Bluestar2
looks like this:The dependencies of this package contain native dlls.
Expected behavior
dotnet pack
should produce a package, or fail with a meaningful error.Actual behavior
See above, fails with "error : The DateTimeOffset specified cannot be converted into a Zip file timestamp." and "error : Parameter name: value".
Environment data
dotnet --info
output: