Pre loader

Error: Unable to load the service index for source https://api.nuget.org/v3/index.json

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

Hello,
I’m attempting to build one of the WPF examples on a machine that has no internet access. I get the error mentioned in the title. When I exported the project, I selected the “Installation Folder” option rather than the “NuGet Package”.

How can I fix this error?

Thanks, Brett S.

Version
v8.0.0.27737
  • You must to post comments
1
0

Hi Brett,

I just tried this locally. When exporting a chart example to a stand-alone project from the SciChart WPF Examples App, if you select ‘Local Installation Folder’ then the exported project will reference the SciChart libraries found on disk, assuming that you’ve installed the SciChart SDK on that computer.

Export Example to stand-alone Project or Visual Studio Solution - SciChart

If you have the libraries elsewhere, you can change the installation directory.

The output *.csproj file looks like this for me. Here you can see the project references and their paths.

<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
  <PropertyGroup>
    <TargetFramework>net462</TargetFramework>
    <OutputType>WinExe</OutputType>
    <UseWPF>true</UseWPF>
  </PropertyGroup>
  <PropertyGroup>
    <Copyright>Copyright © 2011-2023</Copyright>
    <AssemblyVersion>1.0.0.0</AssemblyVersion>
    <FileVersion>1.0.0.0</FileVersion>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="SciChart.Core">
      <HintPath>C:\Users\aburn\AppData\Local\Programs\SciChart\SciChart SDK\ExamplesBin\net462\SciChart.Core.dll</HintPath>
    </Reference>
    <Reference Include="SciChart.Data">
      <HintPath>C:\Users\aburn\AppData\Local\Programs\SciChart\SciChart SDK\ExamplesBin\net462\SciChart.Data.dll</HintPath>
    </Reference>
    <Reference Include="SciChart.Charting">
      <HintPath>C:\Users\aburn\AppData\Local\Programs\SciChart\SciChart SDK\ExamplesBin\net462\SciChart.Charting.dll</HintPath>
    </Reference>
    <Reference Include="SciChart.Charting3D">
      <HintPath>C:\Users\aburn\AppData\Local\Programs\SciChart\SciChart SDK\ExamplesBin\net462\SciChart.Charting3D.dll</HintPath>
    </Reference>
    <Reference Include="SciChart.Drawing">
      <HintPath>C:\Users\aburn\AppData\Local\Programs\SciChart\SciChart SDK\ExamplesBin\net462\SciChart.Drawing.dll</HintPath>
    </Reference>
    <Reference Include="SciChart.Charting.DrawingTools">
      <HintPath>C:\Users\aburn\AppData\Local\Programs\SciChart\SciChart SDK\ExamplesBin\net462\SciChart.Charting.DrawingTools.dll</HintPath>
    </Reference>
    <Reference Include="SciChart.Examples.ExternalDependencies">
      <HintPath>C:\Users\aburn\AppData\Local\Programs\SciChart\SciChart SDK\ExamplesBin\net462\SciChart.Examples.ExternalDependencies.dll</HintPath>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
    <PackageReference Include="MahApps.Metro.IconPacks.Material" Version="4.11.0" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)' == 'net462'">
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="PresentationCore" />
    <Reference Include="PresentationFramework" />
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Data" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="System.Xaml">
      <RequiredTargetFramework>4.6.2</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Xml" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="WindowsBase" />
  </ItemGroup>
</Project>

However, the exported project if you notice still has two PackageReference nodes which will pull packages from NuGet: Microsoft.Xaml.Behaviors.Wpf and MahApps.Metro.IconPacks.Material.

This is probably why the exported solution is failing to compile on a system without internet access.

What can you do about this?

You could:

  1. Download these libraries from NuGet yourself and reference them manually, locally. E.g. the ‘Download Package’ button on nuget.org/packages/MahApps.Metro.IconPacks.Material downloads a *.nupkg file. Rename the file extension to *.zip and you can open it like an archive to get the libraries out.
  2. You could try recreating the example yourself using the exported code as a starting point
  3. Alternatively, you could remove these PackageReferences and fix the resulting compiler errors.

For (3), both are used by the SciChart.Examples.ExternalDependencies assembly which is a helper DLL that contains styles, buttons, the SciChartInteractionToolbar type which is present in many of the examples.

Removing this won’t affect the chart but it might affect example functionality depending on which example you exported. The SciChart.Examples.ExternalDependencies package is not recommended for referencing in production code. However, if you want to use any of the styles, classes, toolbars or types in there in production code, they can be found in our open source SciChart.Wpf.Examples repository

  • You must to post comments
1
0

Andrew,
I appreciate the clear explanation and suggested remedies. I’ll probably try solution #3, since downloading is a problem on this particular system.
Thanks, Brett S.

  • Andrew Burnett-Thompson
    No problem, it’s a good Q&A actually as others may hit the same issue. I could recommend #4 – export them all on another computer and compile before moving the projects, including downloaded & cached packages over
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.