简体   繁体   中英

Publishing from visual studio to windows server 2012

i have a Mvc 4 project i would like to publish on a windows server 2012. On the windows server 2012 i have setup IIS 8 and Sql express. Do you know of a good guide to set this up? My issue is that i can't get the database working. I would like to make it so i can easily publish changes to the website. Any ideas how to do this?

is it possible to setup Visual studios on the server for the nuget package console? the only way i have got this working was to copy the entire database to sql express but if i change anything i have to do it agian. Not a very stable solution. Best regards John,

It's not exactly clear what the problem is, but I'll try to give a couple of pointers.

First, nuget shouldn't be involved in the deployment per se; it's involved when building the project, but once you get a deployment package it should contain everything the project needs - look at setting up the deployment using the visual studio built in tools, ie see this MSDN link .

The database is a separate side of this. You say you can't 'get it working' which I can't really help with since there's no details - you need to be familiar with connection strings and change your connection string during the deployment so your app can connect to the right database. The publishing wizard linked above can help with this as well, or you can use config transforms, or any number of other mechanisms.

Documentation here has details about what you can do on the database side. The publishing wizard (when using web deploy) can read the database schema and even make schema comparisons so you can deploy schema updates, but I've never actually used that solution - I usually need more control over what happens so I manage my schema upgrade and downgrade scripts myself.

Since there are many problems compounded in this question I suggest you ask a separate, more focused, question about each one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM