I notice (beginner) that when I generate a new .net web app in Visual Studio, it collects required packages from the web. I believe I need to connected to the web in order to create an app. Is there an offline mode where it stores the files needed?
When you create a new project, Visual studio will download the require NuGet packages (=dependencies) from the internet.
Technically you can add a local NuGet repository (=on your hard drive) but do you really want to do that?!
I found this article describing how to achieve that src
Related
So, I feel like I don't have all of the Visual Studio components that I need on my personal computer. For example, when I create a new ASP.NET application on the school computer, it generates files with it (program.cs, startup.cs, and appsettings.json), but those don't exist when I try to create a project on my laptop.
I just had a huge issue trying to get Scaffold-DbContext to work (and after about an hour of digging, finally found the commands to run in Package Manager Console that would allow that much to work). I'm sure there are other things I'm completely missing and don't realize it yet.
What do I need to do to get these files to be generated when I create a new project? Are there other things that I haven't installed for Visual Studio yet that I probably should? I'm really at a complete loss here.
Bring up Visual Studio. Click on Tools. Click Get Tools and Features...
Compare whats installed with what you have at school.
These three will do most of what your looking for:
.Net desktop development
ASP.NET and web development
Data storage and processing
Also look at the versions Help About Microsoft Visual Studio
I really like working with Azure functions in the portal but am starting to need some more tooling that I'm used to for committing to my git repo, easily adding assemblies, and just plain working in a more familiar environment.
Is it possible to create your Azure function app and possibly the functions themselves in the portal and then move over to Visual Studio and import that function app as a project? Or am I approaching this wrong? I understand we can create straight from Visual Studio and then publish up to Azure and maybe that is the way we should be doing it in the first place.
A few pieces you could do. You can start development in the portal and then download the app settings (connection strings, etc.) via the azure-function-core-tools with a CLI command like func azure functionapp fetch-app-settings <appName> - but that will just pull the settings into an existing local project.
You could also go to the Platform Settings tab and open the App Service Editor which would let you download the workspace as pictured below. That will download the function project into a folder you could check into source control and use with CI/CD.
However one important note is the portal for C# projects use C# script files (.csx), and the Visual Studio tools for Functions create .NET assemblies (.dll), so if using C# you wouldn't be able to download the workspace and open it up in Visual Studio - you'd likely be better off just copy/pasting the code into a Visual Studio project.
Personally since the latest v3 update of VS 2017 I find starting in Visual Studio is even more convenient than the portal was for Function apps.
I primarily use Visual Studio, C#, and WebApi for my projects. We're looking to utilizing Ember, Ember relies heavily on Node Package Manager. Which Visual Studio does support, but is there a way to integrate Ember and their Command Line better into Visual Studio?
Currently, we would use Node and Ember for our frontend, then we would open Visual Studio and our backend code. They're currently separated, was hoping to avoid having to switch a better integration.
I have also tried myself and at the current time there are no usable plugins that help integrate ember into VS. You may use VS editor to modify the source but you wont get a lot of the build tools and extra features of VS.
I'm in the same scenario, WebApi backend + Ember client. Currently I add de ember app folder in the visual studio solution as "Existing Web Site", hide node_modules and temp windows folders and run all commands from external command line.
Thanks for looking.
I have a need to be able to create new Azure website and database instances from a Windows forms application I have created as an internal-use tool.
I am not sure if there is a C# API for this or if I need to use Powershell or some other CLI, but I would appreciate any advice.
All of the searching I have done on the subject has not turned up a simple, direct explanation as to how to do this or if it is even possible.
Using Azure Resource Manager (ARM) API's is the way to go these days - especially with your scenario. You've probably seen documentation that uses the old Service Management API's to do this. You could still do this, but I would strongly discourage it. ARM is where the investment in automation is landing going forward.
For your particular scenario, there is actually a tutorial here.
If you are using Visual Studio 2013 or 2015, then you can also use the ARM templates that it provides. For example, from Visual Studio, select File > New > Project and choose the Azure Resource Group project template.
The next window in the new project dialog is where you can select from some common deployment templates, such as what you are looking for, which is a Web App + SQL Database.
This project will contain the ARM template that describes your environment and a script that you can use to invoke ARM to deploy it.
To deploy the environment, right-click on the project in Visual Studio and select Deploy. Fill in the parameters that the template provides and you are on your way. If you look in the script that is generated (Deploy-AzureResourceGroup.ps1), you will see at the bottom of the script a call to New-AzureResourceGroup. What this does is basically merge your ARM template and parameters together and then sends them to Azure Resource Manager to provision the environment. In other words, you have everything here to automate this without having to do it from Visual Studio.
I have a highly complicated web site that is under source control and has a long history. I would like to migrate this website into a web application project but I do not want to lose the source control history. We use Visual Studio 2010 and Team Foundation Server (Currently 2005 tfs but we are in the process of upgrading to 2010).
How can we create a webapplication project and migrate the files from the web application into it without losing the source control connections?
Is there a need to "migrate" the files to a new directory structure?
Seems to me that if you left all the files where they were, created a new WebApplication project, and just use "Add Existing Items" to add the files to it, that everything would be fine. All the files would stay in the same place, you'd have a brand new project file, and your history would be preserved on everything.