-
Notifications
You must be signed in to change notification settings - Fork 3
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
Availability as "dotnet tool" #1
Comments
Hey, the changes look great. |
How are you typically making a new public release? I try to understand why publishing doesn't work on my end. Also should be teast-ready as well, feel free to! |
Usually it goes like this.
I have employed this process in my other project, https://github.com/dady8889/Aniwari/blob/master/publish.ps1. Currently, the Setup.exe doesn't install from GitHub. But it is on todo. |
Odd, it doesn't want to work over here but if it works on your end, feel free to bump the version number and prepare a release if you like, I'll set the PR at ready for review. This is what I get: Text copy: Onova.Publisher dotnet publish -c Release
MSBuild version 17.6.0-preview-23174-01+e7de13307 for .NET
D:\Development\GitHub\Onova.Publisher\Onova.Installer\Onova.Installer.vcxproj : warning NU1503: Skipping restore for project 'D:\Development\GitHub\Ono
va.Publisher\Onova.Installer\Onova.Installer.vcxproj'. The project file may be invalid or missing targets required for restore. [D:\Development\GitHub\
Onova.Publisher\Onova.Publisher.sln]
Determining projects to restore...
C:\Program Files\dotnet\sdk\8.0.100-preview.3.23178.7\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK113
8: The target framework 'net5.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-supp
ort for more information about the support policy. [D:\Development\GitHub\Onova.Publisher\Onova.Publisher\Onova.Publisher.csproj]
All projects are up-to-date for restore.
D:\Development\GitHub\Onova.Publisher\Onova.Installer\Onova.Installer.vcxproj(28,3): error MSB4019: The imported project "D:\Microsoft.Cpp.Default.prop
s" was not found. Confirm that the expression in the Import declaration "\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
Onova.Publisher dotnet publish -c Release .\Onova.Publisher\Onova.Publisher.csproj
MSBuild version 17.6.0-preview-23174-01+e7de13307 for .NET
Determining projects to restore...
C:\Program Files\dotnet\sdk\8.0.100-preview.3.23178.7\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK113
8: The target framework 'net5.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-supp
ort for more information about the support policy. [D:\Development\GitHub\Onova.Publisher\Onova.Publisher\Onova.Publisher.csproj]
C:\Program Files\dotnet\sdk\8.0.100-preview.3.23178.7\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK113
8: The target framework 'net5.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-supp
ort for more information about the support policy. [D:\Development\GitHub\Onova.Publisher\Onova.Publisher\Onova.Publisher.csproj]
All projects are up-to-date for restore.
C:\Program Files\dotnet\sdk\8.0.100-preview.3.23178.7\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK113
8: The target framework 'net5.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-supp
ort for more information about the support policy. [D:\Development\GitHub\Onova.Publisher\Onova.Publisher\Onova.Publisher.csproj]
C:\Program Files\dotnet\sdk\8.0.100-preview.3.23178.7\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(287,5): message N
ETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [D:\Development\GitHub\Onova.Publisher\Onova.Publisher\On
ova.Publisher.csproj]
Onova.Publisher -> D:\Development\GitHub\Onova.Publisher\Onova.Publisher\bin\Onova.Publisher\Release\AnyCPU\net5.0\Onova.Publisher.dll
D:\Development\GitHub\Onova.Publisher\Onova.Publisher\Onova.Publisher.csproj(45,3): error MSB3030: Could not copy the file "*Undefined*bin\Onova.Instal
ler\Release\Win32\Onova.Installer.exe" because it was not found. |
Oh, I would like to apologize for the steps before, that is if you want to release a new version of your own app. When I am preparing a new release for the tool, I first have to compile the installer project in Release/Win32. Then I just publish the Publisher project as you did with the However, in the project I have to copy the installer to the publisher, so there is a macro for this: https://github.com/dady8889/Onova.Publisher/blame/7f18a1300077b1d6665ac7fe2103eae3cf48149e/Onova.Publisher/Onova.Publisher.csproj#LL47C18-L47C18 I think because you don't have the solution open, the macro I will check the code and make a release, thanks for the contribution. |
IIRC this variable is never populated if you publish using the |
The PR is ready btw. |
Hm, it still can't be consumed as a dotnet tool unfortunately: dotnet tool install -g -v n Onova.Publisher
Build started 31/05/2023 14:25:20.
1>Project "C:\Users\nefar\AppData\Local\Temp\0489d449-78f7-42f6-967c-cb9ad5fc659b\restore.csproj" on node 1 (Restore target(s)).
1>_GetAllRestoreProjectPathItems:
Determining projects to restore...
Restore:
X.509 certificate chain validation will use the default trust store selected by .NET for code signing.
X.509 certificate chain validation will use the default trust store selected by .NET for timestamping.
Restoring packages for C:\Users\nefar\AppData\Local\Temp\0489d449-78f7-42f6-967c-cb9ad5fc659b\restore.csproj...
CACHE https://api.nuget.org/v3-flatcontainer/onova.publisher/index.json
GET https://baget.vigem.org/v3/package/onova.publisher/index.json
NotFound https://baget.vigem.org/v3/package/onova.publisher/index.json 174ms
CACHE https://api.nuget.org/v3-flatcontainer/onova.publisher/1.2.5/onova.publisher.1.2.5.nupkg
Installed Onova.Publisher 1.2.5 from https://api.nuget.org/v3/index.json with content hash McElQXW6yJMaJR662xMHwwmer5tOMZNQO/s5FrRDMefKafrtGOaUAFzt2Vpw7UaXxPpYw2ugRNfE88DMej7E5A==.
1>C:\Users\nefar\AppData\Local\Temp\0489d449-78f7-42f6-967c-cb9ad5fc659b\restore.csproj : error NU1212: Invalid project-package combination for Onova.Publisher 1.2.5. DotnetToolReference project style can only contain references of the DotnetTool
type
Generating MSBuild file C:\Users\nefar\.dotnet\tools\.store\.stage\wmxfi2pe.ar5\restore.csproj.nuget.g.props.
Writing assets file to disk. Path: C:\Users\nefar\.dotnet\tools\.store\.stage\wmxfi2pe.ar5\project.assets.json
Failed to restore C:\Users\nefar\AppData\Local\Temp\0489d449-78f7-42f6-967c-cb9ad5fc659b\restore.csproj (in 549 ms).
NuGet Config files used:
C:\Users\nefar\AppData\Roaming\NuGet\NuGet.Config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.FallbackLocation.config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
Feeds used:
https://api.nuget.org/v3/index.json
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
https://baget.vigem.org/v3/index.json
C:\Program Files\dotnet\sdk\NuGetFallbackFolder
Installed:
1 package(s) to C:\Users\nefar\AppData\Local\Temp\0489d449-78f7-42f6-967c-cb9ad5fc659b\restore.csproj
1>Done Building Project "C:\Users\nefar\AppData\Local\Temp\0489d449-78f7-42f6-967c-cb9ad5fc659b\restore.csproj" (Restore target(s)) -- FAILED.
Build FAILED.
"C:\Users\nefar\AppData\Local\Temp\0489d449-78f7-42f6-967c-cb9ad5fc659b\restore.csproj" (Restore target) (1) ->
(Restore target) ->
C:\Users\nefar\AppData\Local\Temp\0489d449-78f7-42f6-967c-cb9ad5fc659b\restore.csproj : error NU1212: Invalid project-package combination for Onova.Publisher 1.2.5. DotnetToolReference project style can only contain references of the DotnetTo
ol type
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:01.08
The tool package could not be restored.
Tool 'onova.publisher' failed to install. This failure may have been caused by:
* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.
For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool Will do some more digging, weird... |
If I build and publish locally and disable the official NuGet feed it works... ❓ dotnet tool install --global --configfile disable_nuget.config --add-source D:\Development\GitHub\Onova.Publisher\Onova.Publisher\publish\ Onova.Publisher
You can invoke the tool using the following command: Onova.Publisher
Tool 'onova.publisher' (version '1.2.5') was successfully installed. |
Alright, I've uploaded the dotnet tool install -v n --global --configfile disable_nuget.config --add-source https://baget.vigem.org/v3/index.json Onova.Publisher
Build started 31/05/2023 15:00:06.
1>Project "C:\Users\nefar\AppData\Local\Temp\87ef2d68-e2c2-4d95-a96d-51a0b86746ad\restore.csproj" on node 1 (Restore target(s)).
1>_GetAllRestoreProjectPathItems:
Determining projects to restore...
Restore:
X.509 certificate chain validation will use the default trust store selected by .NET for code signing.
X.509 certificate chain validation will use the default trust store selected by .NET for timestamping.
Restoring packages for C:\Users\nefar\AppData\Local\Temp\87ef2d68-e2c2-4d95-a96d-51a0b86746ad\restore.csproj...
CACHE https://baget.vigem.org/v3/package/onova.publisher/index.json
CACHE https://baget.vigem.org/v3/package/onova.publisher/1.2.5/onova.publisher.1.2.5.nupkg
Installed Onova.Publisher 1.2.5 from https://baget.vigem.org/v3/index.json with content hash CA8j8+rtlfZmC/IAQsK6XRR1wHlNg1grjNCFOUcziztOG4UTJO17hZZ4qQtUcpQEzdjAyLeGQUwtDlBNaJv6NQ==.
Generating MSBuild file C:\Users\nefar\.dotnet\tools\.store\.stage\beta5chl.hn1\restore.csproj.nuget.g.props.
Writing assets file to disk. Path: C:\Users\nefar\.dotnet\tools\.store\.stage\beta5chl.hn1\project.assets.json
Restored C:\Users\nefar\AppData\Local\Temp\87ef2d68-e2c2-4d95-a96d-51a0b86746ad\restore.csproj (in 255 ms).
NuGet Config files used:
C:\Users\nefar\disable_nuget.config
Feeds used:
C:\Program Files\dotnet\sdk\NuGetFallbackFolder
https://baget.vigem.org/v3/index.json
Installed:
1 package(s) to C:\Users\nefar\AppData\Local\Temp\87ef2d68-e2c2-4d95-a96d-51a0b86746ad\restore.csproj
1>Done Building Project "C:\Users\nefar\AppData\Local\Temp\87ef2d68-e2c2-4d95-a96d-51a0b86746ad\restore.csproj" (Restore target(s)).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:00.82
You can invoke the tool using the following command: Onova.Publisher
Tool 'onova.publisher' (version '1.2.5') was successfully installed. I wonder what the difference is here 🤔 |
Pardon the spam but I think we need to pull this release; I just dissected the My bad mate, should've tested this more thoroughly 😦 |
Alright, progress 💪 Install tooldotnet tool install -v n --global --configfile C:\Users\nefar\disable_nuget.config --add-source .\Onova.Publisher\publish\ Onova.Publisher
Build started 31/05/2023 16:31:23.
1>Project "C:\Users\nefar\AppData\Local\Temp\8bb998c1-4f72-4dee-8cc6-a23b4add553e\restore.csproj" on node 1 (Restore target(s)).
1>_GetAllRestoreProjectPathItems:
Determining projects to restore...
Restore:
X.509 certificate chain validation will use the default trust store selected by .NET for code signing.
X.509 certificate chain validation will use the default trust store selected by .NET for timestamping.
Restoring packages for C:\Users\nefar\AppData\Local\Temp\8bb998c1-4f72-4dee-8cc6-a23b4add553e\restore.csproj...
Installed Onova.Publisher 1.2.6 from D:\Development\GitHub\Onova.Publisher\Onova.Publisher\publish\ with content hash M5weqGhbHxwF81wNUhOXCmMkZD+QadiWn+UwCo8TnDVXQZAP50iCCNDvy+J1uCDV2ORJ1xDXY7fNsN36wG1lbg==.
Generating MSBuild file C:\Users\nefar\.dotnet\tools\.store\.stage\3rylznqc.q11\restore.csproj.nuget.g.props.
Writing assets file to disk. Path: C:\Users\nefar\.dotnet\tools\.store\.stage\3rylznqc.q11\project.assets.json
Restored C:\Users\nefar\AppData\Local\Temp\8bb998c1-4f72-4dee-8cc6-a23b4add553e\restore.csproj (in 276 ms).
NuGet Config files used:
C:\Users\nefar\disable_nuget.config
Feeds used:
C:\Program Files\dotnet\sdk\NuGetFallbackFolder
D:\Development\GitHub\Onova.Publisher\Onova.Publisher\publish\
Installed:
1 package(s) to C:\Users\nefar\AppData\Local\Temp\8bb998c1-4f72-4dee-8cc6-a23b4add553e\restore.csproj
1>Done Building Project "C:\Users\nefar\AppData\Local\Temp\8bb998c1-4f72-4dee-8cc6-a23b4add553e\restore.csproj" (Restore target(s)).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:00.87
You can invoke the tool using the following command: Onova.Publisher
Tool 'onova.publisher' (version '1.2.6') was successfully installed. Installed tool extracted locationPublishing a test applicationOnova.Publisher --name NAC --version 1.0.0 --url https://apps.nefarius.at/files/ --target .\setup\publish\x64\
Publishing application NAC...
WARNING: File NAC-1.0.0.zip will be overwritten.
Resuming in 3 seconds...
Creating zip...
Building installer...
Successfully published NAC version 1.0.0 into NAC-1.0.0.zip. Doing more comprehensive testing now 🖖 |
I see, will look into it. Btw, I unpacked 1.2.5 and the files are still there, so I am leaving it up. |
Hey there!
Would it be feasible to make this available via "dotnet tool" for us Rider plebs? 😉
I tried to be adventurous but that didn't work 😅
Thanks, cheers!
EDIT: got curious and started working on #2
The text was updated successfully, but these errors were encountered: