mirror of
https://github.com/quamotion/dotnet-packaging.git
synced 2026-02-15 05:35:56 +00:00
error MSB4057: The target "CreateDeb" does not exist in the project #46
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LeVence1 on GitHub (Jan 14, 2019).
Hello,
I followed the instructions located in the readme file but I get the following error if I execute
dotnet deb -r debian9.5-x64 -f netcoreapp2.2.0command.C:\Users\Privat\Desktop\Server-Core\Server-Core\Server-Core.csproj : error MSB4057: The target "CreateDeb" does not exist in the projectThis is how my Program.cs class looks like
This is how my Server-Core.csproj file looks like
Thank you.
Sincerley,
Chris
@jorgegarciax2 commented on GitHub (Feb 5, 2019):
I get the same error. Did you solve this issue?
@qmfrederik commented on GitHub (Feb 15, 2019):
Try to make sure you have the latest version of Packaging.Targets (and dotnet-deb). I just updated the README:
@budul100 commented on GitHub (Jun 12, 2019):
It seems that you have to run firstly the respective
dotnet publishcommand and then thedotnet debcommand. I had the same error, but after usingdotnet publishit worked correctly.@qmfrederik commented on GitHub (Jun 16, 2019):
This can happen if you did not run
dotnet restorefirst (you shouldn't need to rundotnet publish).Can you check whether this problem reproduces on a clean checkout, and that running
dotnet restorefixes this?@aggsol commented on GitHub (Sep 9, 2019):
It does not fix it for me, neither publish nor restore fixed the Problem. I am using Rider 2019.1.2 on Windows 10. Command:
dotnet deb -f netcore2.2 -r ubuntu.18.04-x64@aggsol commented on GitHub (Sep 9, 2019):
I fixed it: I had to explicitly set the framework version in the project like
@budul100 commented on GitHub (Sep 9, 2019):
@aggsol is right. I was adding the following PropertyGroup:
Afterwards my project was compiled without the need of using
dotnet publish.@aggsol commented on GitHub (Sep 10, 2019):
@qmfrederik Maybe you could open up the wiki and list all relevant project properties and best practices, examples there?