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

The target "BundleApp" does not exist in the project. #10

Open
0x90d opened this issue Aug 3, 2021 · 3 comments
Open

The target "BundleApp" does not exist in the project. #10

0x90d opened this issue Aug 3, 2021 · 3 comments

Comments

@0x90d
Copy link

0x90d commented Aug 3, 2021

I've added the nuget package to my project. Then I've added the following lines to my csproj file:

<PropertyGroup>
    <CFBundleName>AppName</CFBundleName> <!-- Also defines .app file name -->
    <CFBundleDisplayName>App Name</CFBundleDisplayName>
    <CFBundleIdentifier>com.example</CFBundleIdentifier>
    <CFBundleVersion>1.0.0</CFBundleVersion>
    <CFBundlePackageType>APPL</CFBundlePackageType>
    <CFBundleSignature>????</CFBundleSignature>
    <CFBundleExecutable>AppName</CFBundleExecutable>
    <CFBundleIconFile>icon.icns</CFBundleIconFile> <!-- Will be copied from output directory -->
    <NSPrincipalClass>NSApplication</NSPrincipalClass>
</PropertyGroup>

and ran dotnet msbuild -t:BundleApp -p:RuntimeIdentifier=osx-x64 via commandline on my csproj file. But I receive this error: The target "BundleApp" does not exist in the project. What am I doing wrong?

@McoreD
Copy link

McoreD commented Jan 28, 2022

I had the same issue but adding these worked:

  <PropertyGroup>
    <TargetFramework>net5.0</TargetFramework>
    <RuntimeIdentifiers>osx-x64</RuntimeIdentifiers>
    <CFBundleName>NftJsonGen</CFBundleName> <!-- Also defines .app file name -->
    <CFBundleDisplayName>NftJsonGen</CFBundleDisplayName>
    <CFBundleIdentifier>com.endomint</CFBundleIdentifier>
    <CFBundleVersion>1.0.0</CFBundleVersion>
    <CFBundleShortVersionString>1.0.0</CFBundleShortVersionString>
     <OutputType>WinExe</OutputType>
    <CFBundlePackageType>APPL</CFBundlePackageType>
    <CFBundleExecutable>NftJsonGen</CFBundleExecutable>
    <CFBundleIconFile>Logo.icns</CFBundleIconFile> <!-- Will be copied from output directory -->
    <NSPrincipalClass>NSApplication</NSPrincipalClass>
    <NSHighResolutionCapable>true</NSHighResolutionCapable>
  </PropertyGroup>

@mysteryx93
Copy link

mysteryx93 commented Jul 5, 2022

I'm getting the same issue with these added project values.

<PropertyGroup>
  <TargetFrameworks>net6.0</TargetFrameworks>
  <RuntimeIdentifiers>osx-x64</RuntimeIdentifiers>
  <CFBundleName>Player432hz</CFBundleName> <!-- Also defines .app file name -->
  <CFBundleDisplayName>432hz Player</CFBundleDisplayName>
  <CFBundleIdentifier>com.player432hz</CFBundleIdentifier>
  <CFBundleVersion>2.1</CFBundleVersion>
  <CFBundleShortVersionString>2.1</CFBundleShortVersionString>
  <CFBundlePackageType>APPL</CFBundlePackageType>
  <CFBundleSignature>????</CFBundleSignature>
  <CFBundleExecutable>Player432hz</CFBundleExecutable>
  <CFBundleIconFile>Player432hz.icns</CFBundleIconFile> <!-- Will be copied from output directory -->
  <NSPrincipalClass>NSApplication</NSPrincipalClass>
  <NSHighResolutionCapable>true</NSHighResolutionCapable>

  <!-- Optional -->
  <NSRequiresAquaSystemAppearance>true</NSRequiresAquaSystemAppearance>
</PropertyGroup>

@ardittristan
Copy link

After struggling with it myself for a while, you need to supply the -p:TargetFramework=net6.0 (or whatever framework you intend to publish) to the msbuild command when using <TargetFrameworks>...</TargetFrameworks>, since the task depends on the publish task, and the publish task requires a single framework to be selected

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

4 participants