Skip to content
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

Is it possible to create the deb package as part of the standard build process? #227

Open
stephen-swensen opened this issue Aug 4, 2022 · 1 comment

Comments

@stephen-swensen
Copy link

Rather than having to invoke dotnet deb from the command line, is it possible to create the deb package as part of the regular build process (i.e. right click project -> Build in Visual Studio). After poking around, I tried adding the following to my project file

  <UsingTask TaskName="Packaging.Targets.DebTask" AssemblyName="Packaging.Targets" />
  ...
  <ItemGroup>
    <PackageReference Include="Packaging.Targets" Version="0.1.220">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
  </ItemGroup>
  ...
  <Target Name="CreateDebOnReleaseBuild" Condition="$(Configuration) == 'Release'" AfterTargets="Build">
    <CreateDeb />
  </Target>

But I get the following error:

error MSB4036: The "CreateDeb" 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\Enterprise\MSBuild\Current\Bin\amd64" directory.

@nref
Copy link

nref commented Jul 20, 2023

CreateDeb target is available for me after referencing Packaging.Targets

    <PackageReference Include="Packaging.Targets" Version="0.1.220" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants