Error MSB4057: The target "CreateDeb" does not exist in the project. #51

Closed
opened 2026-01-29 16:28:10 +00:00 by claunia · 6 comments
Owner

Originally created by @endasil on GitHub (May 4, 2019).

I saw the response to the other post and have made sure i have entry under ItemGroups . Is there something i missed in the readme?

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.2</TargetFramework>	
    <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
    <RootNamespace>myprogram</RootNamespace>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="FirebaseDatabase.net" Version="4.0.1" />
    <PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="2.2.4" />
    <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.2.0" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
    <PackageReference Include="RabbitMQ.Client" Version="5.1.0" />
	<PackageReference Include="Packaging.Targets" Version="0.1.56" />
  </ItemGroup>

  <ItemGroup>
    <None Update="config.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
  </ItemGroup>
  <ProjectExtensions><VisualStudio><UserProperties /></VisualStudio></ProjectExtensions>

</Project>

Originally created by @endasil on GitHub (May 4, 2019). I saw the response to the other post and have made sure i have <PackageReference Include="Packaging.Targets" Version="0.1.56" /> entry under ItemGroups . Is there something i missed in the readme? ``` <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>netcoreapp2.2</TargetFramework> <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch> <RootNamespace>myprogram</RootNamespace> </PropertyGroup> <ItemGroup> <PackageReference Include="FirebaseDatabase.net" Version="4.0.1" /> <PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="2.2.4" /> <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.2.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" /> <PackageReference Include="RabbitMQ.Client" Version="5.1.0" /> <PackageReference Include="Packaging.Targets" Version="0.1.56" /> </ItemGroup> <ItemGroup> <None Update="config.json"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> </ItemGroup> <ProjectExtensions><VisualStudio><UserProperties /></VisualStudio></ProjectExtensions> </Project> ```
Author
Owner

@maikebing commented on GitHub (May 19, 2019):

I had the same problem on Appveyor.
https://ci.appveyor.com/project/MaiKeBing/iotsharp

@maikebing commented on GitHub (May 19, 2019): I had the same problem on Appveyor. https://ci.appveyor.com/project/MaiKeBing/iotsharp
Author
Owner

@buckstephenh commented on GitHub (May 24, 2019):

Same issue. My error refers to a related test project that the .sln file in the current project references. Still appears to work at first blush.

@buckstephenh commented on GitHub (May 24, 2019): Same issue. My error refers to a related test project that the .sln file in the current project references. Still appears to work at first blush.
Author
Owner

@budul100 commented on GitHub (Jun 12, 2019):

It seems that you have to run firstly the respective dotnet publish command and then the dotnet deb command. I had the same error, but after using dotnet publish it worked correctly.

@budul100 commented on GitHub (Jun 12, 2019): It seems that you have to run firstly the respective` dotnet publish` command and then the `dotnet deb` command. I had the same error, but after using ` dotnet publish` it worked correctly.
Author
Owner

@qmfrederik commented on GitHub (Jun 16, 2019):

This can happen if you did not run dotnet restore first (you shouldn't need to run dotnet publish).

Can you check whether this problem reproduces on a clean checkout, and that running dotnet restore fixes this?

@qmfrederik commented on GitHub (Jun 16, 2019): This can happen if you did not run `dotnet restore` first (you shouldn't need to run `dotnet publish`). Can you check whether this problem reproduces on a clean checkout, and that running `dotnet restore` fixes this?
Author
Owner

@qmfrederik commented on GitHub (Jun 16, 2019):

Duplicate of #90, by the way.

@qmfrederik commented on GitHub (Jun 16, 2019): Duplicate of #90, by the way.
Author
Owner

@qmfrederik commented on GitHub (Nov 22, 2019):

This should have been fixed with the latest versions, this should now just work:

dotnet new console
dotnet tool install --global dotnet-deb
dotnet deb install
dotnet deb

Please reopen if you still have this issue with the latest versions.

@qmfrederik commented on GitHub (Nov 22, 2019): This should have been fixed with the latest versions, this should now just work: ```bash dotnet new console dotnet tool install --global dotnet-deb dotnet deb install dotnet deb ``` Please reopen if you still have this issue with the latest versions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dotnet-packaging#51