Friday, April 28, 2017

.NET Literacy Day 3: GitHub Solution Cloning / Relocation Fallout

Hm. Still not done with the fall-out from cloning my repo and moving it into a new location. Everything in VS looked okay at first, but there was a green squiggly green line under my solution. Mousing over it revealed this message:

Once again, VS automation facilitates the solution, but ... this process seems really messy. I have to think that I have either done something wrong, or I'm not taking the best approach. Time to Google.

The Microsoft Git Quickstart was somewhat helpful, in that it confirmed what I knew. I found this interesting question on Stack Overflow asking whether Git repos should be at the project level or solution level. Visual Studio facilitates storing at the solution level, so I'll stick with that for now. Well, since no quick advice on approach is forthcoming, I'll charge ahead and research this later. I'm either going to get this repo working, or hit a wall. Either way, I'm going to go through this exercise again start to finish so I understand what is involved when I clone a solution.

Back to my squiggly line... Following the instructions, I right clicked on the solution and chose "Manage NuGet Packages". VS found the missing packages and facilitated the install. Even after the action completed, the green squiggle remained with the same message. There were a number of updates available, so I installed those as well. Green squiggle was still there. I right clicked on the solution and chose Clean and the green squiggle disappeared. Several supporting files were changed during the NuGet update, so I did a Commit / Push to get those changes out to the remote repository.

So! Ready to go, right?

Wrong. Ok... What the heck? Right click the solution, choose Restore NuGet Packages and I'm told everything is fine.

Clearly, I've got configuration issues. Hm. Stack Overflow seems to think I need to fix the relative paths in my .csproj file, That was part of the problem. There were references to a  ..\packages folder, which did not exist. The error message mentions Microsoft.Net.Compilers.1.3.2, which I did not see in my solution's \packages folder. How are packages missing? Shouldn't they have been part of the solution in Git? I browsed for the package with the NuGet manager and installed it.

One frustrating hour later... the package installed had a different folder name. I found the original package path in Program Files under Microsoft Web Tools. The vidly.csproj file is pointing to the right path, but VS still says the wrong path. I tried putting the missing package in the "wrong" path and it still did not care. The same error message appeared. Very frustrating.

Sigh... this is technology in the raw. You want to jump right in and start something new, but you are hamstrung by the setup. Time to cut my losses.

Goals for Day 4

Tomorrow, I'm going to create a new repo in GitHub, clone it locally and rebuild this basic project. Then, I'm going to move the project to a new folder and see what happens. I need to understand all of the dependencies these prefab projects have and where they are located. 

No comments:

Post a Comment