-
Notifications
You must be signed in to change notification settings - Fork 376
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
Missing tools from PackageDownload when publishing as global tool #394
Comments
Could you please star the project? |
Sure, :) |
If needed, I can help write a blog and publicity in China .net community website. I have about 2000+ followers of .net fans |
@yang-xiaodong sure, always welcome :) what do you mean, what works in Visual Studio? |
Source code in visual studio, click nuke icon and debug can print the version, no error! |
Yes. That works different than after installing as global tool. |
For now I suggest to switch to |
@matkoch Thanks for your answer, I tried the suggested way you pointed, it doesn't seem to work for me, am I missing something? <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<PackAsTool>True</PackAsTool>
<IsPackable>True</IsPackable>
<ToolCommandName>mycommand</ToolCommandName>
<PackageOutputPath>./../artefacts</PackageOutputPath>
<Version>1.0.4</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Nuke.Common" Version="0.24.0" />
<!--<PackageDownload Include="GitVersion.Tool" Version="[5.1.1]" />-->
<PackageReference Include="GitVersion.Tool" Version="5.1.1">
<ExcludeAssets>all</ExcludeAssets>
</PackageReference>
</ItemGroup>
</Project> |
Maybe some information on this: When you're using I've nearly managed it though Another option regarding this: NuGet/Home#9132 (comment) is not using `. Suggestion from nuget team is to use https://github.com/microsoft/MSBuildSdks
|
I had the same problem. The found workaround is to add constructor public Build()
{
ToolPathResolver.ExecutingAssemblyDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
} |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
GitVersion does not work when packaged as dotnet tools for sharing in a team.
The error message is
Could not find package 'GitVersion.Tool', or 'GitVersion.CommandLine'
Steps to reproduce
4、Install as the dotnet tool and execute to show the version
Then the error will be raised
Relevant log output
The text was updated successfully, but these errors were encountered: