Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Dependency or problem in the nuget definition? #108

Closed
djcparker opened this issue Jan 5, 2015 · 4 comments
Closed

Missing Dependency or problem in the nuget definition? #108

djcparker opened this issue Jan 5, 2015 · 4 comments
Labels

Comments

@djcparker
Copy link

Not sure if it is something I am doing or something missing in the nuspec .

Create a console app (4.5.1 is fine or an iOS app if you prefer). Use nuget to add refit. Compile the app.

Error: The type or namespace name 'Http' does not exist in the namespace 'System.Net' (are you missing an assembly reference?) in RefitStubs.cs

This seems to happen for everything except winphone.
Note: it seems to go away if I add a reference to System.Net.Http...

Thoughts?

@anaisbetts
Copy link
Member

@djcparker System.Net.Http is a Framework reference. You can add them to the spec file, but I've been too lazy to because I have to look up for 402x platforms whether System.Net.Http is supported

@djcparker
Copy link
Author

@paulcbetts hmmm... I understand.. I've just had some fun behaviour with a PCL that is using refit. It causes winphone to fail with "could not load assembly version 4.0.0" - tracked it down to the PCL profile NOT including sl-winphone 8.0 so it had access to a v4.0.0 assembly.

Changing the profile to include sl-winphone 8 meant I could add the nuget version as refit does). Then the errors go away. Not clever...

Interestingly I created a new console app today and it did NOT get the error above. I'm going to compare them and see whats different.

thanks for the feedback!

@omares
Copy link

omares commented Jan 8, 2015

Btw System.Net.Http is outdated, you should use Microsoft.Net.Http as package dependency

@djcparker
Copy link
Author

Yep, aware of that. It's the same namespace, the package changed and the targeting is different per profile. Thanks 😊

@flagbug flagbug closed this as completed May 11, 2016
@lock lock bot added the outdated label Jun 24, 2019
@lock lock bot locked and limited conversation to collaborators Jun 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants