how to make azure function use the latest code published from VS2022 - azure

I have a netcoreapp3.1 project with few functions.
I made changes to one function and deployed using VS 2022 but when I test in Azure, I can clearly see it is using the older code.
I tried removing then adding the function from the project.
Restarting the function app in azure and other refresh methods.
Will I only be able to get the new code if I delete and recreate the function app?
Is there another way to refresh the running code?

Once you have published your function to a FunctionApp throughout VisualStudio 2022 or VisualStudio Code, you can deploy updates to that function app. E.g. if you have added a new HttpTrigger, you can publish all the code including the added HttpTrigger from Visual Studio itself.
Visual Studio 2022, just a black Azure Function App for testing purposes:
Doubleclick on "Connected Services"
Then in the left pane, click "Publish"
Visual Studio Code (Azure Tools plugin):

Related

Durable Functions Orchestration missing in Visual Studio 2017

Was trying to create a new Azure Durable Function in Visual Studio 2017, but couldnt find the "Durable Functions Orchestration" listed in the below popup:
My visual studio is up to date, and not sure what I am missing!!
Ok, Found the problem. It seems like we need to select "Azure Functions v2 (.NET Core)" as the framework when creating the Project.
Note: After the project is created, do a build/rebuild of the project before trying to add a new function. For some reason, when I tried to add new Item, it still wasnt listed until I built the project
After the project is built successfully, you should now be able to see "Durable Functions Orchestration"

Publish to azure option not visible in visual studio 2017

I have an instance of visual studio 2017 in which azure functions are developing, strangely i stopped seeing, publish to azure option in the publish targets window and also in create new profile window.
If i open any of my other azure functions project in vs 2017, the window is seen correctly.
What could be different only for this case?
(Copying comment into an actual answer for the community to see)
well ,strangely my function app was missing functions sdk!! hence i was not seeing right publish outputs. after i installed Microsoft.Net.Sdk.Functions it all worked

Publishing Azure Function from VS 2017 does not create csx file

I created a simple Azure Function using VS 2017 to test the tooling.
This is the project:
Here is the publish screen:
Clicking on Publish button does not show any progress but I can see the new Function at the Portal.
However the published Function has only the function.json and no csx file.
What am I doing wrong?
Thanks in advance.
Regards.
This is by design. VS2017 (15.3) won't create csx script, but instead will deploy your code as precompiled function. You can tell that precompiled function is used by looking at scriptFile and entryPoint attributes in your function.json.
By the way, Publish result can be seen in Output tab of Visual Studio.

Where is Visual Studio Online Monaco?

I've recently been using Visual Studio Online 'Monaco' to edit an AngularJS application that I have hosted as an Azure website. I want to use Monaco as it has in-browser typescript support.
As far as I can tell the only place to get to Visual Studio Online 'Monaco' is via a well hidden link on an associated Azure Website's Dashboard, down the bottom of the page on the right hand side.
E.g. the final access url ends up being:
https://your-website-dev.scm.azurewebsites.net/dev/wwwroot/app/scripts/services/sampleService.ts
Is this the only place to get to Monaco?
It appears to be a good alternative to Cloud 9 and Nitrous.io for development of Typescript and .Net solutions but I'd like a more Nitrous.io style way of setting up dev environments. e.g. log in, clone from github, start coding.
Edit: From replies over time to this question...
As of Dec 2015 Visual Studio Code is an excellent locally hosted version similar to Atom but with a Visual Studio vibe, and cross platform:
https://code.visualstudio.com/
As of July 2015 an option in the Azure Web App Dashboard has appeared.
To enable Visual Studio Online for a web app:
Go to the 'configure' tab of the web app
Switch the 'EDIT IN VISUAL STUDIO ONLINE' on, click Save
An 'Edit in Visual Studio' option appears on the dashboard tab under the 'quick glance' area
Clicking on this takes you to the VSO pointing at your web app
Note: If you deploy via git etc your vso changes may be overwritten
As of July 2016 in the new portal
This has been renamed to App Service Editor.
App Services => Your App => Tools => App Service Editor (Preview)
Click go in the panel that opens up to navigate to
https://yourapp.scm.azurewebsites.net/dev/wwwroot/
Update to add pic (by Luke)
At this point in time, the only way you can edit code online is via the link in the Azure portal (or by using the url directly as you've done).
I presume that Monaco will show up on other Microsoft properties at some point in time, but that's just a guess.
UPDATE: A lot has changed since this answer was given. The summary added to the the question provides a good overview of Monaco's usage, though you should also add to the Typescript Playground. The VSCode team is even looking to make Monaco available as a standalone tool you can use in your own apps (see GH issue)
P.S. VSCode is built on top of Electron and, being open source, you can look at the code of the Monaco editor today.
As of today, it is accessed by adding the Visual Studio Online extension to your website and then clicking "Browse" at the top when the extension is selected. It is unclear why Monoco is so hidden, perhaps they want to wait until it is "done" before doing a big push?
UPDATE 11/23/2015: The Monaco editor was open sourced last week (as part of vscode). The vscode repository is also the repository for Monaco.
Visual Studio Code is Microsoft's new desktop editor that is built on web technologies and the editor component is Monaco.
See: What is the Visual Studio Code editor built on
As of January 2016 in the new portal
App Services => Your App => Tools => Extensions => Add + => Visual Studio Online
Going back through that chain and selecting "Browse" will navigate you to
https://yourapp.scm.azurewebsites.net/dev/wwwroot/

Application Insight stopped sending data to portal

We already use Application Insight for diagnostics our cloud service project.
Today I added AppInsight Telemetry to project from Visual studio.
It added some lines to web config and nuget packages.
But after deployed it stopped sending data to Visual Studio Portal. No telemetry data and diagnostic data.
Now I rollback changes.
How can I add AppInsight Telemetry to out project?
In Visual Studio 2013 open Tools, Extensions and Updates,
Select Installed on the left and look for Application Insight Tools for Visual Studio and check its version. If it is version 2, uninstall it. This one sends the telemetry data to Azure instead of VS Online (portal that you mentioned above).
Now select Online and search for Application Insight Tools for Visual Studio, you will see 1.3.2 version. Install it, restart the Visual Studio and Add Application Insights Telemetry to the project..., it will show you VS Online account that it will use and the Application Insight component under which data will be captured. Run the app and after few minutes data will appear in the VS Online portal.
You can add Application Insight in Visual Studio 2012 as well. However, it is a manual process and involves below steps:
Create Application Insight application in VS Online portal
Add Nuget package to the project in VS
Finally, add few lines of code in Global.asax.cs

Resources