EchoesPaths.xml

Hi,
I cant tell if this is working.

My file looks like

<?xml version="1.0" standalone="no"?>
<paths>
<NuGetRepository Include="file:///Users/JohnMoshakis/Documents/develop/Nancy/build/nuget/" />
</paths>

The file is here

~/Library/Application\ Support/RemObjects\ Software/Elements/

I have nupkg files there but I cant see them being picked up. Its just showing the versions from nuget.org

Cheers,
John

I dont believe EBuild reads NuGet repositories anywhere from Application Support yet. Only the hardcoded ones and those specified in the project.

Do you mean adding NuGetRepository to the elements file ?

I had been reading the documentation page

https://docs.elementscompiler.com/Projects/References/PackageReferences/#q=nuget

I think it would be nice if it included examples

its there at the very end:

You can also manually add package reference elements to your project file, e.g.:

  • <NuGetReference Include="Microsoft.NETCore.App:*" />
  • <GradleReference Include="com.android.support:support-v4:22.2.1" />

I meant the NuGetRepository. It mentions it can be added to the elements file but doesn’t say where

Same as any other object. Elements project files are really simple. You can have settings (name/value pairs, the tag name is the setting name, last one wins) in PropertyGroup tags, and objects (named objects of a type/kind determined by their tag) in ItemGroups.

https://docs.elementscompiler.com/EBuild/ObjectsAndSettings/ explain this, but I’ll make a note to document the file format itself more specifically.

I added this to a console app

  <ItemGroup>
    <NuGetRepository Include="file:///Users/JohnMoshakis/Documents/develop/Nancy/build/nuget/" />
    <Reference Include="mscorlib" />
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Core">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <NuGetReference Include="Nancy:[2.0.10]">
      <Private>True</Private>
    </NuGetReference>
  </ItemGroup>

Fire seems to recognize that as a repository, I see this in the build output

                 -> Task RemObjects.EBuild.Elements.ElementsProcessNuGetReferences started for RemoteConsoleApplication, Echoes.
                    Registering NuGet Repository 'file:///Users/JohnMoshakis/Documents/develop/Nancy/build/nuget/'

E: Package Nancy matching version [2.0.10] was not found in any repositories.

The version number should be ok because I registered the same folder with visual studio for mac and that picks it up.

how does the structure inside /Users/JohnMoshakis/Documents/develop/Nancy/build/nuget/ look?

It just a collection of nupkg files

I don’t believe that’s how its supposed to be structured. it needs to have the extracted packages like the ~/.nuget/packages folder:

I know that the nupkg are just zip files but it doesnt look like just unzipping the nupkg is the way to go. Do you have code in ebuild that I can use to open the nupg and extract it ?

I just until then, in rebuild. A plain rename-to-.zip and unzip (and make sure the folder name is correct) should do the trick.

If I Unzip the folder it looks like this

Screen Shot 2020-07-19 at 5.50.22 PM

I just added it to the nancy folder in my .nuget. It sees that version but then when I add it I get

Package Nancy matching version [2.0.10] was not found in any repositories. Falling back to 0.23.2, for IDE use only.

This is what 2.0.0 looks like and that came from nuget
Screen Shot 2020-07-19 at 5.53.34 PM

Ah yes. the way this works is, it doesn’t check all repositories for all versions. if checks all repositories until it finds the package and then it sees what versions are available (on that repository).

I’ll see if I can provide a way to override what repository to use for a specific package.

Thanks, logged as bugs://84687

bugs://84687 got closed with status fixed.

See https://docs.elementscompiler.com/Projects/References/PackageReferences/, “Per-Reference Repositories” section. docs will update within 15.

1 Like