Use Azure CLI to generate function class library - azure

I've noticed I generate a different folder structure and file extensions for C# code depending on whether I use the the Azure CLI (folder with a .csx script library) or Visual studio (no folder with a .cs class library). Debugging from the CLI only exposes the .csx endpoints and visa-versa from Visual Studio.
Is it possible to configure the Azure CLI to generate functions using class libraries? Or so that the CLI and Visual Studio provide the same debugging endpoints?

It's not possible now. We have few asks for it and will add it at some point, issue to track:
https://github.com/Azure/azure-functions-core-tools/issues/382

Related

Azure function in Java, http layer generated based on openapi

I saw https://azure.microsoft.com/en-in/updates/generate-a-new-function-app-from-an-openapi-specification/
so in VSCode v1.63.2, azure functions plugin v1.6.0
but when I go to azure extension and then "Create new project" when I select Java I dont have any option to choose template ( http trigger ) but in Java I dont see this option ..
Anyone had maybe similar issue ?
thanks
To create a Java Azure Function with HTTP Trigger in VS CODE we need to configure as our environment as given here .
Java Development Kit, version 11 or 8.
Apache Maven, version 3.0 or above.
Visual Studio Code on one of the supported platforms.
The Java extension pack
The Azure Functions extension for Visual Studio Code.
As we have already configured the same in our environment, We have created One Azure Function using java which is using HTTP trigger.
In VS CODE for java when you will follow this Microsoft Documentation you can able to Create an Azure function using java with http trigger by providing the details.
SCREENSHOT FOR REFERENCE:-
For more information please refer this MICROSOFT DOCUMENTATION: Develop Azure Functions by using Visual Studio Code

Google Cloud Module disappeared

After updating to Android Studio 3.0.1 I see there is no option to add a Google Cloud module, as you would to add a backend module for building endpoints using Objectify. Any tutorial tells you to add this module. Do we have to create it manually now or is there a completely different way to communicate with Appengine?
You must use Cloud Tools for IntelliJ now:
https://cloud.google.com/tools/android-studio/docs/
https://cloud.google.com/tools/intellij/docs/
Note: Creating App Engine-based cloud backends is not supported in Android Studio 3.0; however, your existing projects with cloud backends will continue to work in Android Studio.
To create a new App Engine Java project, you can use either Cloud Tools for Intellij or Cloud Tools for Eclipse.

How do I transfer a Azure Function script to Visual Studio?

If I create an Azure Function in the Azure portal, how do I grab the script and edit it in Visual Studio? I know I can copy the C# code from the script window but that's only part of the Function. How do I grab everything - the code, triggers, outputs, etc. - and take that into Visual Studio?
There's a button right in the Function App blade in Azure that allows you to download the contents of the function app:
You can even choose to download the Content and the Visual Studio project so you can directly import it into VS. However, as Travis mentioned you should really be doing this the other way around and keeping your development in VS and then using one of the various deployment options to push your functions to Azure.
You can use FTP or Kudu(.scm.azurewebsites.net) to download the app contents.
Generally speaking though if you want to work in Visual Studio it's better to do your work there and then deploy to the app with one of the several deployment options.
Once your migrate the files (as noted in the other answers), you'll also note that Visual Studio encourages a different programming model than the portal:
Precompile *.cs instead of .csx
Instead of Function.json, you use the attributes (ala WebJobs SDK).
So to fully work in VS and leverage the VS build system (and unit tests, and other VS features), you'll need to migrate your code.
See https://blogs.msdn.microsoft.com/webdev/2017/05/10/azure-function-tools-for-visual-studio-2017/ for more detail on webjobs.

References from Precompiled DLL

I've successfully built a Precompiled Function (DLL) and but ran into some issues regarding Reference from my DLL to other .Net Framework libraries.
I first tried to promote only my DLL to Azure and that failed due to missing dependancies. Next I tried to use Reflector to list the actual dependancies of my DLL and include them with Nuget but ended up just copying every DLL from my project bin directory to Azure and it worked.
So what how do I tell what libraries are actually included by the Azure Function environment and which I need to Nuget or upload myself. I couldn't find any documentation on the subject.
With the pre-compiled model, you need to bring your dependencies with the assembly where your function is defined (much like deploying a console or standard Web Application).
The simplest approach is to deploy the files from your assembly's output folder. The Azure Functions Tools for Visual Studio 2017 will do exactly that for you, giving you the ability to publish directly from VS.

Azure Mobile Services and TypeScript?

How to use TypeScript for Mobile Services scripts (with node.js backend)?
Is there a definition file for Mobile Services? (on the server, not on the client!)
And how about the tooling?
Sure, I can open the scripts in Visual Studio 2013 via the Azure node in the Server Explorer, but than they are not part of a Visual Studio solution. How to add a definition file via NuGet in that case?
If you enable source control on your mobile service, you can upload your scripts via git. This would enable a workflow where you write your scripts in TS, run the compiler to output JS, and you commit the generated js files to your repository and push them to the server.
Unfortunately I do not have any advice regarding tooling support.
You can use the TypeScript definition here: https://www.nuget.org/packages/azure-mobile-services-client.TypeScript.DefinitelyTyped

Resources