davezych / shience

A .NET port(ish) of Github's Scientist library. (https://github.com/github/scientist)
MIT License
9 stars 1 forks source link

Code not compiling because of reference errors #25

Closed MovGP0 closed 8 years ago

MovGP0 commented 8 years ago

similar to #14, the source is once again not building on my machine.

When I execute

dnu restore ./src/shience

Then I get the error message

Unable to resolve dependency Microsoft.CSharp 4.0.1-beta-23516

C:\Users\Johann\Documents\shience\src\shience\project.json(14,29): error NU1001: The dependency Microsoft.CSharp >= 4.0.1-beta-23516 could not be resolved.

Version Info

I am currently using the dnu (using where dnu) from

C:\Users\Johann\.dnx\runtimes\dnx-clr-win-x64.1.0.0-rc2-16357\bin\dnu.cmd

Currently, the following .NET runtimes are installed on my machine (using dnvm list):

Active Version           Runtime Architecture OperatingSystem Alias
------ -------           ------- ------------ --------------- -----
       1.0.0-beta5       clr     x64          win
       1.0.0-beta5       clr     x86          win
       1.0.0-beta5       coreclr x64          win
       1.0.0-beta5       coreclr x86          win
       1.0.0-rc1-update1 clr     x64          win
       1.0.0-rc1-update1 clr     x86          win
       1.0.0-rc1-update1 coreclr x64          win
       1.0.0-rc1-update1 coreclr x86          win
  *    1.0.0-rc2-16357   clr     x64          win             default
       1.0.0-rc2-16357   clr     x86          win
       1.0.0-rc2-16357   coreclr x86          win
davezych commented 8 years ago

It looks like Microsoft.CSharp 4.0.1-beta-23516 is no longer on the aspnetvnext myget feed. I have it cached locally so I can still build.

I updated the dependencies to the latest versions on the vnext feed. Let me know if that fixes it for you.

MovGP0 commented 8 years ago

unfortunately it did not. however, removing the dnxcore50 section in the project.json helps. The dnx451 is working.

Also, I have to change the "shience": "" section in Shience.Test back to "Shience": "", such that it uses the compiled assembly directly instead of the NuGet version.

davezych commented 8 years ago

Oh, one more thing to try. It looks like your default runtime is the full clr instead of core. Update to use a coreclr runtime and try again.

dnvm use 1.0.0-rc2-16357 -r coreclr

I'm not sure if the 64bit runtime has anything to do with it either.

MovGP0 commented 8 years ago

I've tried all four combinations on two devices. the dnxcore50 target is not working, while the dnx451 target works without error.

davezych commented 8 years ago

Hmm. I'll have to investigate this more. I'll try trashing all my cached packages and see what happens when it tries to restore.

MovGP0 commented 8 years ago

Probably a good idea. I'd uninstall all versions you have with dnvm uninstall and install only latest.

davezych commented 8 years ago

I uninstalled all of my runtimes and removed all my cached packages, installed the 1.0.0-rc2-16357 runtime and tried restoring and was able to succesfully. I tried all flavors of that runtime and all completed. I'm not sure what's going on.

We could move up to the cidev nightlys (https://www.myget.org/gallery/aspnetcidev) and see if that has an effect.

MovGP0 commented 8 years ago

interesting. maybe my setup is somehow wrong.

have you tried it on another machine?

davezych commented 8 years ago

I fired up a fresh Windows 10 VM* and tested a few things. I cloned the repo and installed 1.0.0-rc2-16357 x86 clr. I was able to restore everything except the shience dep in the test project. Once I updated that dependency to be Shience it was able to restore successfully and I was able to build the main project using the clr runtime.

I then installed the coreclr runtime and was able to compile and run tests.

What windows version are you running, and what .NET frameworks do you have installed? Did you set up ASP.NET Core using the installer, or using straight command line utils?

*AFAIK Windows 10 comes with .NET 4.6 installed by default.

MovGP0 commented 8 years ago

Using Windows 10 on all devices. I've installed .NET core by installing Visual Studio 2015 first, then using the installer and the console (in that order).

Changing the reference from shience to Shience was my main issue, so at least that one is confirmed. Thanks for the effort!

davezych commented 8 years ago

My main machine is Windows 8.1, and like I said the VM is 10.

So scratch running the tests - I was writing that previous message as I fired off the tests and it looked like I was working, but it it never completed. It starts and then seems to hang, using either x86 or x64 runtimes. Using the same coreclr runtimes, either x64 or x86, run on my main machine. Odd.

I would like to not chalk this up to some-weird-bug-in-the-framework, but I'm not sure how else to explain it right now...

MovGP0 commented 8 years ago

had some issues with the tests too. switching to dnx451 instead of dnxcore50 solved it for me.

MovGP0 commented 8 years ago

i was able to fix it by setting the solution dependency on RC1 instead of the unstable RC2.