# Dotnet Build Error

**URL:** <https://forum.radzen.com/t/dotnet-build-error/1156>\
**Category:** Uncategorized\
**Created:** [May 6, 2019, 8:48pm UTC](https://forum.radzen.com/t/dotnet-build-error/1156 "2019-05-06T20:48:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshbooker](https://forum.radzen.com/user_avatar/forum.radzen.com/joshbooker/32/12624_2.png) [@joshbooker](https://forum.radzen.com/u/joshbooker)\
**Post date:** [May 6, 2019, 8:48pm UTC](https://forum.radzen.com/t/dotnet-build-error/1156/1 "2019-05-06T20:48:02Z")

</div>

New install of Radzen on Server 2008 R2 machine.

I can run the Sample CRUD App. I cannot run an app having a server project. I keep getting various build errors regarding dotnet dependencies. the latest is AspNetCore.OData. Any ideas how to troubleshoot?

radzen: Generating code ...  
radzen: Code generation done in 275ms.  
dotnet: C:\SOURCE\RadZen\SP\_Charts3\server\project.csproj : error NU1100: Unable to resolve 'Microsoft.AspNetCore.OData (\>= 7.1.0)' for '.NETCoreApp,Version=v2.2'.  
C:\SOURCE\RadZen\SP\_Charts3\server\project.csproj : error NU1100: Unable to resolve 'DocumentFormat.OpenXml (\>= 2.8.1)' for '.NETCoreApp,Version=v2.2'.

dotnet:

dotnet: The build failed. Please fix the build errors and run again.  
dotnet:

Thanks in advance,  
Josh

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [May 7, 2019, 3:54am UTC](https://forum.radzen.com/t/dotnet-build-error/1156/2 "2019-05-07T03:54:18Z")

</div>

Hi Josh,

What is your .NET Core version? Can you post the output from dotnet—version?

Best Regards,  
Vladimir

---

<div class="post-metadata">

**Author:** ![joshbooker](https://forum.radzen.com/user_avatar/forum.radzen.com/joshbooker/32/12624_2.png) [@joshbooker](https://forum.radzen.com/u/joshbooker)\
**Post date:** [May 7, 2019, 1:00pm UTC](https://forum.radzen.com/t/dotnet-build-error/1156/3 "2019-05-07T13:00:57Z")

</div>

Thanks for your reply. It's 2.2.105.

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [May 7, 2019, 1:08pm UTC](https://forum.radzen.com/t/dotnet-build-error/1156/4 "2019-05-07T13:08:02Z")

</div>

Can you build the application from Visual Studio? It looks as if there is an error retrieving the nuget packages.

---

<div class="post-metadata">

**Author:** ![joshbooker](https://forum.radzen.com/user_avatar/forum.radzen.com/joshbooker/32/12624_2.png) [@joshbooker](https://forum.radzen.com/u/joshbooker)\
**Post date:** [May 7, 2019, 1:17pm UTC](https://forum.radzen.com/t/dotnet-build-error/1156/5 "2019-05-07T13:17:55Z")

</div>

I don't have VS on this machine, unfortunately.

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [May 7, 2019, 1:22pm UTC](https://forum.radzen.com/t/dotnet-build-error/1156/6 "2019-05-07T13:22:34Z")

</div>

Try running it from command prompt then. Go to the `C:\SOURCE\RadZen\SP_Charts3\server\` directory and execute `dotnet run`. Does it fail with the same error? Can you access the nuget feed from this machine?

---

<div class="post-metadata">

**Author:** ![joshbooker](https://forum.radzen.com/user_avatar/forum.radzen.com/joshbooker/32/12624_2.png) [@joshbooker](https://forum.radzen.com/u/joshbooker)\
**Post date:** [May 7, 2019, 1:50pm UTC](https://forum.radzen.com/t/dotnet-build-error/1156/7 "2019-05-07T13:50:28Z")

</div>

Thanks for your reply.

```
Z:\>dotnet restore c:\source\radzen\sp_charts3\server
  Restoring packages for c:\source\radzen\sp_charts3\server\project.csproj...
c:\source\radzen\sp_charts3\server\project.csproj : error NU1100: Unable to reso
lve 'Microsoft.AspNetCore.OData (>= 7.1.0)' for '.NETCoreApp,Version=v2.2'.
c:\source\radzen\sp_charts3\server\project.csproj : error NU1100: Unable to reso
lve 'DocumentFormat.OpenXml (>= 2.8.1)' for '.NETCoreApp,Version=v2.2'.
  Generating MSBuild file c:\source\radzen\sp_charts3\server\obj\project.csproj.
nuget.g.props.
  Restore failed in 17.9 sec for c:\source\radzen\sp_charts3\server\project.cspr
oj.

Z:\>dotnet run --project c:\source\radzen\sp_charts3\server
c:\source\radzen\sp_charts3\server\project.csproj : error NU1100: Unable to reso
lve 'Microsoft.AspNetCore.OData (>= 7.1.0)' for '.NETCoreApp,Version=v2.2'.
c:\source\radzen\sp_charts3\server\project.csproj : error NU1100: Unable to reso
lve 'DocumentFormat.OpenXml (>= 2.8.1)' for '.NETCoreApp,Version=v2.2'.

The build failed. Please fix the build errors and run again.

```

I don't know how to see if nuget is installed properly since that's usually handled by VS in my experience.

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [May 7, 2019, 2:14pm UTC](https://forum.radzen.com/t/dotnet-build-error/1156/8 "2019-05-07T14:14:51Z")

</div>

If you have access to [https://api.nuget.org/v3/index.json](https://api.nuget.org/v3/index.json) then you should be fine. Did you make any customizations to the Radzen application? You can send us the code to [info@radzen.com](mailto:info@radzen.com) to see if it runs at our side.

---

<div class="post-metadata">

**Author:** ![joshbooker](https://forum.radzen.com/user_avatar/forum.radzen.com/joshbooker/32/12624_2.png) [@joshbooker](https://forum.radzen.com/u/joshbooker)\
**Post date:** [May 7, 2019, 3:20pm UTC](https://forum.radzen.com/t/dotnet-build-error/1156/9 "2019-05-07T15:20:15Z")

</div>

I worked after adding NuGet.Config to server root like so: [https://github.com/dotnet/cli/issues/1034#issuecomment-174754806](https://github.com/dotnet/cli/issues/1034#issuecomment-174754806)

```
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="dotnet-core" value="https://www.myget.org/F/dotnet-core/api/v3/index.json"/>
    <add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
  </packageSources>
</configuration>

```

Weird(?)

Thanks for your help.
