1
votes

After creating a new WebApp (WebJob) in Visual Studio 2015, I recently ran into an error, when I tried to publish the WebApp as WebJob to Azure, using the WebJob Publisher in Visual Studio.

The output always displayed the Errors: CS0234: The type or namespace name 'WebJobs' does not exist in the namespace 'Microsoft.Azure' CS0246: The type or namespace name 'QueueTriggerAttribute' could not be found CS0246: The type or namespace name 'QueueTrigger' could not be found

I tried reinstalling and referencing the most current NuGet Packages which didn't result in success.

Finally, I found out, that my issues were solved using the Packages Version: Microsoft.Azure.WebJobs v2.0.0 And Microsoft.Azure.WebJobs.Core v2.0.0 instead of the most current versions 2.1.0 at this point.

Perhaps you have an Idea if there could be any other Issues with this? Anyway, if you run into the same problem, the solution above helped me, but didn't satisfy me.

1

1 Answers

1
votes

I tried reinstalling and referencing the most current NuGet Packages which didn't result in success.

Perhaps you have an Idea if there could be any other Issues with this?

I think your issue is more related with Visual Studio Version.

If I run the web job in VS 2015, I get the same result as you. We could see the default .NET Framework version just 4.5.1. The packages all old version. And this platform can not load the latest package correctly. It is not like VS 2017, it can not support the latest feature.

enter image description here

If I run the web job in VS 2017, every thing works fine. And we could load the latest package in VS 2017 correctly. If you really want to use the latest feature, you could download VS 2017 from this link.

enter image description here