Is there a way to publish an app from Visual Studio Code to Azure App service directly i.e. without going through Git or some other source control?
No, there is no native way of doing so. You can créate a Task in Visual Studio code that does the git push or ftp push or something. But no native way yet.
Actually, now it is possible: see this.
But for now I would discourage you from using VS Code to deploy on Azure through the official extension, I'm facing plenty of errors and wasting tons of hours, even trying to publish a default basic MVC template: errors 404, 403, 500 ("Cannot find compilation library location for package 'Microsoft.NETCore.App'")... it's a nightmare. It's even more unpleasant since they're all made by Microsoft, and they just don't work together.
Using the classical Visual Studio should work well.
Related
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.
After I updated VS2015 yesterday and I cannot run my project (singla page app) anymore... Visual Studio says: Unable to connect to IIS express
I am using Solution DNX SDK version: 1.0.0-beta5
And my project.json is:
My references:
So everything should be ok ??
What am I doing wrong ?
BR
You have to understand that direct IIS hosting is no longer supported (and probably never will be again)! This is a decision by the ASP.Net team at Microsoft to completely concentrate on the kestrel server which is anyway required for Mac/Linux/Docker. By concentrating on one server the quality rises for everyone. Like Node, Kestrel recommends to use a reverse proxy in front of it. For that you can use your IIS/nginx/Apache.
I would urgently recommend you setup your project with RC1 and change to kestrel with HTTPPlatformHandler (in VS2015 Update 1 that works transparently with IIS Express for you). Beta5 is very outdated for many things.
It might be possible that your project could take a few hours before being able to run again.
First, you skipped beta6, beta7, beta8 and we are now at RC1.
Check which runtime you can use in Visual Studio and make sure you run with the latest one.
Once this is done, ensure that all your dependencies branded beta5 are renamed to the proper version that is in your Visual Studio. Some packages may have been removed, classes moved and many other things.
Check here for breaking changes:
Changes in beta6
Changes in beta7
Changes in beta8
Changes in rc1
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
Ok, so I'm using Visual Studio 2012, with web essentials 2012, and I just created a new ASP.NET Empty Web Application. I added a LESS file to my styles folder and referenced it accordingly. Now, as it seems, this new ASP.NET Empty Web Application doesn't support LESS compilation right out of the box.
What I wanted to know is if that assumption is correct, and, if so, which is the best option to bring in support for LESS compilation on the server? Less.js? dotLess.js?
I'm still kinda confused when it comes to LESS compilation on the server, because I don't want to compile it on the client, like just adding the less.js script to the HTML file.
Mindscape have a vs plugin which allows support of less files. It's called web workbench
http://www.mindscapehq.com/products/web-workbench
They offer a free version. I've used it in a few projects to good effect.
I developed a web-site on ASP.NET 3.5 SP1 platform. And additional I have 2 win services. My task is to build install package. I decided that Visual Studio install projects are not met my requirements. I design my own installer for this project, because I need to resolve many question and problem in install process. My problem: I need to deploy web-site into IIS, but I don't know how to do it easy. I found Microsoft tool as Web Deployment Tool, but I didn't find any documentation. And must I include this tool into my installer for deployment at destination customer? Another side I found SDC Tasks Library and it looks like a solution for me. But I saw many topics where people had problems and because the project was dead anybody couldn't help them. I know it is a long story... My question: how can I deploy the web-site from another program (I know that IIS versions have some differences and it is another headache), set a virtual directory, application pool (very important), a type of authentification and so forth ???
Thanks.
Use Wix for installers.
This article seems to cover what you want:
Automating Web deployment on IIS with WIX.