-
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the Bug
I'm unable to compile a project using JsonPeek. It fails with the error:
Error (active) MSB4036 The "JsonPeek" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64" directory.
Steps to Reproduce
In Visual Studio 2022:
- Create a new .net 8.0 C# assembly project.
- Add the NuGet package
JsonPeek
version 1.2.0 package to the project. - In the
csproj
file add:
<Target Name="PeekSimpleValue"
BeforeTargets="Clean;Build;Pack;GenerateNuspec;SetTeamCityBuildLabel">
<JsonPeek ContentPath="$(Git2SemVer_SharedVersioningPropsFile)" Empty="$empty" Query="$.InformationalVersion">
<Output TaskParameter="Result" PropertyName="Git2SemVer_InformationalVersion" />
</JsonPeek>
<PropertyGroup>
<InformationalVersion>$(Git2SemVer_InformationalVersion)</InformationalVersion>
</PropertyGroup>
</Target>
- Compile. The compile fails.
Expected Behavior
Compile without error.
Exception with Stack Trace
No exception. MSBuild error given above.
Version Info
1.2.0
Additional Info
It works, on Windows, if I add to the csproj
:
<UsingTask TaskName="JsonPeek" AssemblyFile="C:\Users\Robert\.nuget\packages\jsonpeek\1.2.0\build\JsonPeek.dll"/>
This fails if using dotnet CLI to build on linux.
This also fails:
<UsingTask TaskName="JsonPeek" AssemblyFile="JsonPeek.dll"/>
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working