Open michaeljdresser opened 4 years ago
Having the same issue.
Had the same issue. Resolved it by installing the dependent packages mention above manually. It is really stupid.
have the same issue, the default template for time trigger with azure isolated mode doesn't work
Facing the same issue following this documented guide.
Received the following error when running func start
/Users/amroczek/Dev/Projects/Personal/AzureFunctions/AF_Docker_Container/HttpExample.cs(18,10): error CS0246: The type or namespace name 'FunctionAttribute' could not be found (are you missing a using directive or an assembly reference?) [/Users/amroczek/Dev/Projects/Personal/AzureFunctions/AF_Docker_Container/AF_Docker_Container.csproj]
/Users/amroczek/Dev/Projects/Personal/AzureFunctions/AF_Docker_Container/HttpExample.cs(18,10): error CS0246: The type or namespace name 'Function' could not be found (are you missing a using directive or an assembly reference?) [/Users/amroczek/Dev/Projects/Personal/AzureFunctions/AF_Docker_Container/AF_Docker_Container.csproj]
/Users/amroczek/Dev/Projects/Personal/AzureFunctions/AF_Docker_Container/HttpExample.cs(19,38): error CS0246: The type or namespace name 'HttpTriggerAttribute' could not be found (are you missing a using directive or an assembly reference?) [/Users/amroczek/Dev/Projects/Personal/AzureFunctions/AF_Docker_Container/AF_Docker_Container.csproj]
/Users/amroczek/Dev/Projects/Personal/AzureFunctions/AF_Docker_Container/HttpExample.cs(19,38): error CS0246: The type or namespace name 'HttpTrigger' could not be found (are you missing a using directive or an assembly reference?) [/Users/amroczek/Dev/Projects/Personal/AzureFunctions/AF_Docker_Container/AF_Docker_Container.csproj]
/Users/amroczek/Dev/Projects/Personal/AzureFunctions/AF_Docker_Container/HttpExample.cs(19,50): error CS0103: The name 'AuthorizationLevel' does not exist in the current context [/Users/amroczek/Dev/Projects/Personal/AzureFunctions/AF_Docker_Container/AF_Docker_Container.csproj]
0 Warning(s)
5 Error(s)
Resolved the error by adding the following to my .csproj
within ItemGroup:
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.0.13" />
I was probably on the January 2022 release of VS 2022 when I created a Storage-trigger project in isolated mode. The project was missing the Microsoft.Azure.Functions.Worker.Extensions.Storage
package and the FunctionAttribute
was not working. I updated to v17.1 and now when I create the same kind of project, the reference is there and the attribute is working.
the solution above works. we had the same issue after migrating a 7.0 to a 8.0 function
Updating the package to at 3.0.1 breaks the dependencies.
Severity Code Description Project File Line Suppression State Error CS0234 The type or namespace name 'Azure' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) FunctionApp1 C:\Visual Studio Projects\FunctionApp1\FunctionApp1\Function1.cs 2 Active Error CS0234 The type or namespace name 'Azure' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) FunctionApp1 C:\Visual Studio Projects\FunctionApp1\FunctionApp1\Function1.cs 3 Active Error CS0234 The type or namespace name 'Extensions' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) FunctionApp1 C:\Visual Studio Projects\FunctionApp1\FunctionApp1\Function1.cs 4 Active Error CS0246 The type or namespace name 'FunctionNameAttribute' could not be found (are you missing a using directive or an assembly reference?)
Replicate with Vs2019
Package Dependencies pre-update:
Package Dependencies post-update:
Are we now supposed to install these dependencies, or is this a bug?