Dotnet Build Error

#1

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

0 Likes

#2

Hi Josh,

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

Best Regards,
Vladimir

0 Likes

#3

Thanks for your reply. It's 2.2.105.

0 Likes

#4

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

0 Likes

#5

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

0 Likes

#6

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?

0 Likes

#7

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.

0 Likes

#8

If you have access to 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 to see if it runs at our side.

0 Likes

#9

I worked after adding NuGet.Config to server root like so: 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.

0 Likes