dotnet / iot

This repo includes .NET Core implementations for various IoT boards, chips, displays and PCBs.
MIT License
2.17k stars 583 forks source link

Can't build in VS or in Rider #366

Closed daveyostcom closed 5 years ago

daveyostcom commented 5 years ago

I cloned the repo, then selected the DeviceApiTester solution. Something very basic is wrong, and it won't build.

Screen Shot 2019-04-16 at 12 01 01 PM
joperezr commented 5 years ago

Did you run .build.cmd first? As part of our workflow we require you to run build.cmd on the root of the repo once, so that you get all of the dependencies restored and then you should be able to open the projects in VS. Rider isn't officially supported by the repo and therefore hasn't be tested yet.

daveyostcom commented 5 years ago

No, I didn’t.

This is the first I’ve heard of a repo that can’t be used in Visual Studio without doing something on the command line first.

Is this because of a shortcoming of VS? If so, have you reported it to them?

joperezr commented 5 years ago

Most of the repos in the dotnet org use a shared central infrastructure. In order to use it, this infrastructure must be restored, which is what is accomplished by running the build.cmd script. This is not uncommon, as it is similar to other repos that require some sort of restore (either using npm install, or restoring some build dependencies in general) before the initial build. If you check all of the rest of our repos, corefx, coreclr, etc, they all require you to restore these tools first, before opening VS.

I'll go ahead and close this given that the question has been answered. Feel free to re-open if you still have some questions/concerns.

daveyostcom commented 5 years ago

Thanks. Your ReadMe says I can load your stuff using NuGet. I failed. I set up Rider NuGet to use your source, checked the prerelease checkbox, and NuGet couldn't find your stuff.

Thanks

daveyostcom commented 5 years ago

Here's what I tried:

using System;
using System.Device.Gpio; // NuGet source: https://dotnet.myget.org/feed/dotnet-core/package/nuget/System.Device.Gpio

namespace iotapp {

  class Program {

    static void Main(string[] args) {
      Console.WriteLine("Hello World!");
    }

  }
}
joperezr commented 5 years ago

Reopening to track the additional questions.

So then is the issue that you are trying to consume the packages but you can't seem to be able to install the package? I thought the original issue was that you were trying to load a solution from our repo into VS. If all you want is to consume our package, you can either try using our latest prerelease version available in NuGet.org, or alternatively you could try adding this source in order to get our daily builds: https://dotnetfeed.blob.core.windows.net/dotnet-iot/index.json

daveyostcom commented 5 years ago

Sorry. I thought I was writing that response to Rider support. (Wrong window open.) I edited my response above for this location. But nevermind.