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

[BUG] msix:create doesn't handle package_names #1

Closed
domesticmouse opened this issue Nov 3, 2020 · 2 comments
Closed

[BUG] msix:create doesn't handle package_names #1

domesticmouse opened this issue Nov 3, 2020 · 2 comments
Assignees
Labels
bug Something isn't working fixed bug fixed good first issue Good for newcomers

Comments

@domesticmouse
Copy link
Contributor

ℹ️ Info

  msix:
    dependency: "direct dev"
    description:
      name: msix
      url: "https://pub.dartlang.org"
    source: hosted
    version: "0.0.8"

💬 Description

Attempting to run flutter pub run msix:create on a package that has _ characters in the package name errors out.

PS C:\src\flutter-projects\foo_project> flutter pub run msix:create
getting config values..    done!
validate config values..    
No certificate was specified, useing test certificate
done!
create icons folder..    done!
copy icons..    done!
create manifest file..    done!
copy VCLibs files..    done!
packing....    
Microsoft (R) MakeAppx Tool
Option /v specified, switching to verbose output.
Option /o specified, existing files will be overwritten.
Using default hash method: SHA256.
The path (/p) parameter is: "\\?\C:\src\flutter-projects\foo_project\build\windows\runner\Release\foo_project.msix"
The content directory (/d) parameter is: "\\?\C:\src\flutter-projects\foo_project\build\windows\runner\Release"
Enumerating files from directory "\\?\C:\src\flutter-projects\foo_project\build\windows\runner\Release"
Packing 16 file(s) in "\\?\C:\src\flutter-projects\foo_project\build\windows\runner\Release" (content directory) to "\\?\C:\src\flutter-projects\foo_project\build\windows\runner\Release\foo_project.msix" (output file name).
Using "\\?\C:\src\flutter-projects\foo_project\build\windows\runner\Release\AppxManifest.xml" as the manifest for the package.
MakeAppx : error: Failure at appxFactory->CreateManifestReader(manifestStream, &manifestReader) - 0x80080204 - The specified package format is not valid: The package manifest is not 
valid.
MakeAppx : error: Error info: /*[local-name()="Package" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"]/*[local-name()="Applications" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"][1]/*[local-name()="Application" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"][1]/@Id
'foo_project' violates pattern constraint of '([A-Za-z][A-Za-z0-9]*)(\.[A-Za-z][A-Za-z0-9]*)*'.
The attribute 'Id' with value 'foo_project' failed to parse.
MakeAppx : error: Failure at (CreatePackage( overwrite, hashAlgorithm, fileList, outputPath, manifestStream.Get(), forceCompressionNone, performanceOptions, encryptPackage, encryptionOptions, cgmPath, mainPackagePathForResourceExemption, makepriExeFullPath)) - 0x80080204 - The specified package format is not valid: The package manifest is not valid.
MakeAppx : error: Package creation failed.
MakeAppx : error: 0x80080204 - The specified package format is not valid: The package manifest is not valid.

📜 Pubspec.yaml

name: foo_project
description: A new Flutter project.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
  sdk: ^2.11.0-260.0.dev
  flutter: ^1.24.0-6.0.pre

dependencies:
  flutter:
    sdk: flutter
  cupertino_icons: ^1.0.0

dev_dependencies:
  flutter_test:
    sdk: flutter
  msix: ^0.0.8
  pedantic: ^1.9.2

flutter:
  uses-material-design: true

msix_config:
  display_name: FooApp
  publisher_name: FooInc
  identity_name: MyCompany.MySuite.FooApp
  msix_version: 1.0.0.0
  # certificate_path: C:/<PathToCertificate>/<MyCertificate.pfx>
  # certificate_password: 1234 (require if using .pfx certificate)
  certificate_subject: CN=MyName
  # logo_path: C:\<PathToIcon>\<Logo.png>
  # start_menu_icon_path: C:\<PathToIcon>\<Icon.png>
  # tile_icon_path: C:\<PathToIcon>\<Icon.png>
  # icons_background_color: ffffff
  architecture: x64
@YehudaKremer
Copy link
Owner

Fixed in version 0.0.9 (available now),
thank you for report this bug.

@YehudaKremer
Copy link
Owner

bug close after fix and test.

@YehudaKremer YehudaKremer added the bug Something isn't working label Nov 3, 2020
@YehudaKremer YehudaKremer self-assigned this Nov 3, 2020
@YehudaKremer YehudaKremer added fixed bug fixed good first issue Good for newcomers labels Nov 3, 2020
@kiaxseventh kiaxseventh mentioned this issue Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed bug fixed good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants