star-micronics / react-native-star-io10

react-native-star-io10 is a library for supporting application development for Star Micronics devices.
Other
91 stars 55 forks source link

[UWP] Example app for Windows x86 architecture cannot be built #98

Closed bandit-ibayashi closed 1 year ago

bandit-ibayashi commented 1 year ago

Description

The example application in this SDK ver. 1.3.0 cannot be built for Windows x86 architecture with error CS0579: 'global::System.Runtime.Versioning.TargetFrameworkAttribute'.

Device where the bug occurs

It is device-independent on Windows.

Printer

This is a build error so it is printer-independent.

Development environment

To Reproduce

Steps to reproduce the behavior:

  1. Run a release build for x86.

    $ cd example
    $ yarn install
    $ npx react-native run-windows --arch x86 --release
  2. If the error described in Q: What should I do when building the Windows example application is failed? of the SDK manual occurs, fix it according to the guidance.

  3. The following error occurs and build fails.

    Build failed with message 11:6>C:\Users\xxx\example\node_modules\react-native-windows\Microsoft.ReactNative.Managed.CodeGen\build\x86\Debug\Microsoft.ReactNative.Managed.CodeGen\net6.0\win-x64\.NETCoreApp,Version=v6.0.AssemblyAttributes.cs(4,12): error CS0579: 'global::System.Runtime.Versioning.TargetFrameworkAttribute' ...

Temporary Workaround

Upgrade React Native for Windows to ver. 0.71.6, which is the version that the example application links to.

https://github.com/star-micronics/react-native-star-io10/blob/be6635fa52b9e6374c3d860c271879f937f7d0cb/example/package.json#L18

bandit-ibayashi commented 1 year ago

Fixed at our latest release.