NuGet Packages claiming to not be correctly installed

user9530048

I have a project that references

WindowsAzure.ServiceBus

However, when I rebuild the project, I get the error:

1>C:\Users\xyz\documents\visual studio 2017\Projects\MyProject\Class.cs(1,17,1,27): error CS0234: The type or namespace name 'ServiceBus' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

1>C:\Users\xyz\documents\visual studio 2017\Projects\MyProject\Class.cs(12,24,12,38): error CS0246: The type or namespace name 'EventHubClient' could not be found (are you missing a using directive or an assembly reference?)

I've removed and restored the packages directory for the solution, but to no avail. I've tried re-installing the NuGet packages:

Update-Package -reinstall

Which claimed to successfully restore the package. I can Build the project successfully, but a Rebuild fails. Issuing an MSBuild in the command prompt also fails.

Just to alay any theories that there's no using statement, Class.cs:

using Microsoft.ServiceBus.Messaging;

I'm at a loss to how to progress with this; can anyone offer any ideas where to go next?

Prateek Shrivastava

Posting for the points :) (I love them)

Other thing that comes to my mind is to Upgrade your .NET Framework version. If nuget dll was build for higher .NET runtime, there is just a Warning message printed in Output window and Error window stays clear. But Build fails.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related