Unable to build Data Model 'Ice.Data.Model'

Hi all, attempting to regenerate our data models and I’m getting the following error:

'Unable to build Data Model ‘Ice.Data.Model’, ICE = 4.2.300.16, ERP = 11.2.300.16

I’ve tried repairing all .NET packages, removing the database from EAC, adding it back, and the DataModelGenerator.log spews out this:

C:\Users\REDACTED\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\Ice.Data.Model.csproj : error NU1101: Unable to find package Microsoft.NETCore.App.Ref. No packages exist with this id in source(s): Offline
C:\Users\REDACTED\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\Ice.Data.Model.csproj : error NU1101: Unable to find package Microsoft.WindowsDesktop.App.Ref. No packages exist with this id in source(s): Offline
C:\Users\REDACTED\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\Ice.Data.Model.csproj : error NU1101: Unable to find package Microsoft.AspNetCore.App.Ref. No packages exist with this id in source(s): Offline
  Failed to restore C:\Users\REDACTED\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\Ice.Data.Model.csproj (in 2.18 sec).
  Determining projects to restore...
C:\Users\REDACTED\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\Ice.Data.Model.csproj : error NU1101: Unable to find package Microsoft.NETCore.App.Ref. No packages exist with this id in source(s): Offline
C:\Users\REDACTED\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\Ice.Data.Model.csproj : error NU1101: Unable to find package Microsoft.WindowsDesktop.App.Ref. No packages exist with this id in source(s): Offline
C:\Users\REDACTED\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\Ice.Data.Model.csproj : error NU1101: Unable to find package Microsoft.AspNetCore.App.Ref. No packages exist with this id in source(s): Offline
  Failed to restore C:\Users\REDACTED\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\Ice.Data.Model.csproj (in 233 ms).

Error Generating the Data Models: Unable to build Data Model 'Ice.Data.Model'.

I’ve created a support case on epicare, and they cannot give me a solid resolution. Unfortunately I cannot seem to find much online either. Anyone have experience with this?

Any chance you are very low in space?

Negative, good chunk of space left.

What version of Epicor and I assume you have regened before from this computer?

It is saying it can’t find a bunch of standard .net libraries which are installed when you install .net

2023.1.16, base version is 11.2.300.0. Yes I’ve regenerated from the same computer multiple times.

Did you recently install or uninstall anything?

Yes, we’ve started the upgrade process to 2024.2.10, so there are multiple .NET versions installed, along with the 2024.2.10 update. I think that may have been the root cause, but during that time I had no reason to regenerate the data model so cannot be sure.

Was able to get this resolved by trying anything I could imagine. Finally clicked after re-reading the logs a couple of times. Pretty much a guessing game.

Open this directory: C:\Users\{username}\AppData\Local\Temp\Epicor\DataModelGenerator

Find the file: NuGet.config, open it with notepad or another text editor.

Mine looked like this before the fix:

<configuration>
  <packageSources>
    <clear />
    <add key="Offline" value="packages" />
  </packageSources>
</configuration>

It was missing the nuget.org key, which can simply be added by adding this line:

  <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />

Final version:

<configuration>
  <packageSources>
    <clear />
    <add key="Offline" value="packages" />
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
  </packageSources>
</configuration>

Re-ran the regeneration model and it worked fine. Haven’t tested actually using the client, but it solved the error.

3 Likes

We had an open ticket with Epicor about this for our end of year environment. This fixed it, thank you!

1 Like

Awesome to hear! I provided the details in my ticket with epicare, so here’s hoping they add some documentation on it for anyone else having this issue.

1 Like