# Using a frameworkz reference with the .core compiler

**URL:** https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367
**Category:** EBuild
**Created:** [October 14, 2022, 11:18pm UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367 "2022-10-14T23:18:05Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![JohnMoshakis](https://talk.remobjects.com/user_avatar/talk.remobjects.com/johnmoshakis/32/2286_2.png) [@JohnMoshakis](https://talk.remobjects.com/u/JohnMoshakis)
#### Post date: [October 14, 2022, 11:18pm UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367/1 "2022-10-14T23:18:05Z")

</div>

Hi,  
When building the attached using the .core version of the compiler

[App5.zip](https://talk.remobjects.com/uploads/short-url/ep5EJTTRFX8hc5TqjX9XM8CALUE.zip) (641.7 KB)

I get

```auto
               Zipping up '/Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Obj/PureLayout-3947566B58231D2E73C54F4AC923A548EF8C157F/Debug/Island.Darwin.iOS/Device/arm64/PureLayout.frameworkz'.
E: There was an exception executing the Elements compiler: ''IBM437' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. (Parameter 'name')'
D: | at System.Text.EncodingTable.InternalGetCodePageFromName(String name)
D: | at System.Text.EncodingTable.GetCodePageFromName(String name)
D: | at System.Text.Encoding.GetEncoding(String name)
D: | at Ionic.Zip.ZipFile..ctor()
D: | at RemObjects.Elements.Compiler.CoreCompiler.<>c __DisplayClass0.<b>b__ 0(EBuildTarget t, EBuildContext lContext)
D: | at RemObjects.EBuild.EBuildTask.ForEachEnabledTarget(Func`3 aCallback)
D: | at RemObjects.Elements.Compiler.CoreCompiler.b(EBuildTask a)
D: | at RemObjects.Elements.Compiler.CoreCompiler.Compile(EBuildTask aTask)
D: CompilerOutput for Island.Darwin.iOS
D: - <CompilerOutput-Device-arm64: /Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Obj/PureLayout-3947566B58231D2E73C54F4AC923A548EF8C157F/Debug/Island.Darwin.iOS/Device/arm64/PureLayout.fx [Target: Island.Darwin.iOS]>
D: - <CompilerOutput-Device-arm64: /Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Obj/PureLayout-3947566B58231D2E73C54F4AC923A548EF8C157F/Debug/Island.Darwin.iOS/Device/arm64/PureLayout.pas [Target: Island.Darwin.iOS]>
            <- Task Import failed for PureLayout, took 0.3506s (0.504s).

```

Cheers,  
John

---

<div class="post-metadata">

### Author: ![JohnMoshakis](https://talk.remobjects.com/user_avatar/talk.remobjects.com/johnmoshakis/32/2286_2.png) [@JohnMoshakis](https://talk.remobjects.com/u/JohnMoshakis)
#### Post date: [October 15, 2022, 3:44pm UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367/2 "2022-10-15T15:44:35Z")

</div>

Based on this

> <https://stackoverflow.com/questions/48388409/zipping-a-file-using-dotnetzip-on-c-on-mac>

It doesnt seem to be supported on .net core

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [October 16, 2022, 11:42am UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367/3 "2022-10-16T11:42:09Z")

</div>

Logged as [bugs://E26205](https://www.remobjects.com/portal/bugs/?id=E26205).

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [October 18, 2022, 2:16pm UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367/4 "2022-10-18T14:16:44Z")

</div>

```nohighlight
   > git: error: pathspec 'master' did not match any file(s) known to git
E: There was a problem obtaining remote project 'github.com/mosh/ImportSolution/PureLayout.elements:*' referenced from 'App5'.

```

can I get a test case that doesn’t involve remote projects? (or at least a working one 😉

---

<div class="post-metadata">

### Author: ![JohnMoshakis](https://talk.remobjects.com/user_avatar/talk.remobjects.com/johnmoshakis/32/2286_2.png) [@JohnMoshakis](https://talk.remobjects.com/u/JohnMoshakis)
#### Post date: [October 18, 2022, 2:51pm UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367/5 "2022-10-18T14:51:16Z")

</div>

Strange, it should be a public repo  
[zip.zip](https://talk.remobjects.com/uploads/short-url/aBglKXDI5uW20pOedA11NcEQ8kJ.zip) (245.3 KB)

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [October 18, 2022, 3:22pm UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367/6 "2022-10-18T15:22:11Z")

</div>

That one doesnt seem to have any .frameworkz references

Can I just get a simple self-contained test case?

---

<div class="post-metadata">

### Author: ![JohnMoshakis](https://talk.remobjects.com/user_avatar/talk.remobjects.com/johnmoshakis/32/2286_2.png) [@JohnMoshakis](https://talk.remobjects.com/u/JohnMoshakis)
#### Post date: [October 18, 2022, 3:35pm UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367/7 "2022-10-18T15:35:34Z")

</div>

I noticed it doesnt need references. I get this

```auto
E: There was an exception executing the Elements compiler: ''IBM437' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. (Parameter 'name')'
D: | at System.Text.EncodingTable.InternalGetCodePageFromName(String name)
D: | at System.Text.EncodingTable.GetCodePageFromName(String name)
D: | at System.Text.Encoding.GetEncoding(String name)
D: | at Ionic.Zip.ZipFile..ctor()
D: | at RemObjects.Elements.Compiler.CoreCompiler.<>c __DisplayClass0.<b>b__ 0(EBuildTarget t, EBuildContext lContext)
D: | at RemObjects.EBuild.EBuildTask.ForEachEnabledTarget(Func`3 aCallback)
D: | at RemObjects.Elements.Compiler.CoreCompiler.b(EBuildTask a)
D: | at RemObjects.Elements.Compiler.CoreCompiler.Compile(EBuildTask aTask)
D: CompilerOutput for Island.Darwin.iOS
D: - <CompilerOutput-Simulator-arm64: /Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Obj/PureLayout-DF7F96A0E8BBE33B1286204E9778C90C6FEA8ADB/Debug/Island.Darwin.iOS/Simulator/arm64/PureLayout.fx [Target: Island.Darwin.iOS]>
D: - <CompilerOutput-Simulator-arm64: /Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Obj/PureLayout-DF7F96A0E8BBE33B1286204E9778C90C6FEA8ADB/Debug/Island.Darwin.iOS/Simulator/arm64/PureLayout.pas [Target: Island.Darwin.iOS]>

```

If you build

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [October 18, 2022, 3:50pm UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367/8 "2022-10-18T15:50:15Z")

</div>

Ah yeah, its _creating_ the .frameworkz that fails, not extracting it. reproduced and will investigate.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [October 18, 2022, 4:08pm UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367/9 "2022-10-18T16:08:08Z")

</div>

Ah yes. like everything on .NET Core, this needs a separate package to be explicitly referenced and registered to get functionality that was commonly available everywhere in classic .NET. Should be fixed, pending testing when I have a new build.

---

<div class="post-metadata">

### Author: ![JohnMoshakis](https://talk.remobjects.com/user_avatar/talk.remobjects.com/johnmoshakis/32/2286_2.png) [@JohnMoshakis](https://talk.remobjects.com/u/JohnMoshakis)
#### Post date: [October 18, 2022, 5:15pm UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367/10 "2022-10-18T17:15:24Z")

</div>

Thanks. Are you going to use System.IO.Compression.ZipFile ?

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [October 18, 2022, 5:38pm UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367/11 "2022-10-18T17:38:19Z")

</div>

Not for now, I simply #ifdef’ed it to use a new way to obtain the IBM347 encoding, in all places that use it:

```auto
      #if NETCOREAPP || NETSTANDARD
        public readonly static System.Text.Encoding IBM437Encoding = System.Text.CodePagesEncodingProvider.Instance.GetEncoding("IBM437");
        #else
        public readonly static System.Text.Encoding IBM437Encoding = System.Text.Encoding.GetEncoding("IBM437");
        #endif

        public readonly static System.Text.Encoding DefaultEncoding = ZipFile.IBM437Encoding;

```

If that doesn’t work, I might look at porting to System.IO.Compression.ZipFile, but there are a few places that use the Ionic.Zip AIs directly, I’m afraid (rather than a platform-specific abstraction as some other places already do), so this would mean rewriting/retesting several places that work with zip files — and i don’t reallyfeel like doing that now, if i don’t need to.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [October 19, 2022, 4:13pm UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367/12 "2022-10-19T16:13:08Z")

</div>

Seems to work.

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [October 19, 2022, 4:13pm UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367/13 "2022-10-19T16:13:41Z")

</div>

[bugs://E26205](https://www.remobjects.com/portal/bugs/?id=E26205) was closed as fixed.

---

<div class="post-metadata">

### Author: ![JohnMoshakis](https://talk.remobjects.com/user_avatar/talk.remobjects.com/johnmoshakis/32/2286_2.png) [@JohnMoshakis](https://talk.remobjects.com/u/JohnMoshakis)
#### Post date: [October 19, 2022, 4:24pm UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367/14 "2022-10-19T16:24:29Z")

</div>

Great. There is a build coming ?

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [October 19, 2022, 4:25pm UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367/15 "2022-10-19T16:25:06Z")

</div>

I tested with the last build from yesterday.

---

<div class="post-metadata">

### Author: ![JohnMoshakis](https://talk.remobjects.com/user_avatar/talk.remobjects.com/johnmoshakis/32/2286_2.png) [@JohnMoshakis](https://talk.remobjects.com/u/JohnMoshakis)
#### Post date: [October 19, 2022, 5:23pm UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367/16 "2022-10-19T17:23:47Z")

</div>

Thanks, that worked.

On ios projects it seems like a huge improvement. A full rebuild on my biggest project goes from 9 minutes to 3

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [October 19, 2022, 5:57pm UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367/17 "2022-10-19T17:57:06Z")

</div>

> [@JohnMoshakis](#):
>
> On ios projects it seems like a huge improvement. A full rebuild on my biggest project goes from 9 minutes to 3

Wow. just by switching from (I assume you’re on Mac) Mono to .NET Core?

---

<div class="post-metadata">

### Author: ![JohnMoshakis](https://talk.remobjects.com/user_avatar/talk.remobjects.com/johnmoshakis/32/2286_2.png) [@JohnMoshakis](https://talk.remobjects.com/u/JohnMoshakis)
#### Post date: [October 19, 2022, 6:08pm UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367/18 "2022-10-19T18:08:34Z")

</div>

Yes. Its an m1 mac.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [October 19, 2022, 6:37pm UTC](https://talk.remobjects.com/t/using-a-frameworkz-reference-with-the-core-compiler/27367/19 "2022-10-19T18:37:07Z")

</div>

That _is_ impressive…
