sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Reference found at dotnet build, not found at dotnet run

Open Rvhappen opened this issue 9 years ago • 4 comments

Steps to reproduce

  1. Add a reference with hintpath to the xxx.csproj file
  2. Restore and build the new files
  3. Run the application

Expected behavior

The application would load the reference as it did before.

Actual behavior

"Could not load file or assembly ''Sifteo, Version=0.1.4266.33212, Culture=neutral, PublicKeyToken=0e958af9dbfb2cb7'. The system can't find the specified file". It is weird, I tried to compile with different runtimes as well just to check if that's not the problem. But it just doesn't work. I find it pretty weird that the file does load at the build, but not at the run.

Environment data

dotnet --info output: image

Rvhappen avatar Feb 27 '17 10:02 Rvhappen

Why are you using the CLI from 2.0.0? Does this work with a 1.0.0 CLI? Also, any chance you can share your projects or a repro of the issue? This is something that we do very frequently, so it should work.

livarcocc avatar Feb 27 '17 17:02 livarcocc

Hmm I must admit I have no reason for it. I am working on a project as an intern for an ict company. So I'm not really experienced, but eager to learn.

My goal is to make Sifteo cubes (which are out of the running for 2 years) working on a Raspberry Pi with GroveKit and Windows IoT core. The sifteo cubes do have a DLL called Sifteo.dll. This dll is compatible with .NET 3.5 - recent .NET framework.

So I'm finding a way to make it work with the ARM architecture of the Pi. After some googling I came on the coreclr github. I followed all the steps recently and within these steps I had to download CLI 2.0.0. Thats the reason and the background. Now I know after working more on this (learning every day), the problem was that my 'Targetframework' was set on .netcoreapp2.0. When I changed this to net45 it compiled well. Still now I dont have the possibility to run it on the ARM Pi, because I don't have the necessary dependencies on the Pi. (So it still doesnt work) And ofcourse when I publish I get all the files, except for the fact that net45 doesnt give any dependencies when compiling by default.

But I know it works because when I set the runtime with win10-x64 i can run it.

Rvhappen avatar Feb 27 '17 17:02 Rvhappen

It seems like it should be possible to close this issue now. Please, re-activate if I misunderstood.

livarcocc avatar May 04 '17 05:05 livarcocc

I actually just had this happen to me and a dotnet restore of the project that added the new reference was all it took to clear it up.. Odd that the build works fine however with only the actual reference lookup failing on a run.

crysyn avatar May 05 '17 19:05 crysyn