5

I have been sent a web app by someone to see if I can give them a hand with re-hosting it. I haven't worked with database projects in Visual Studio and it looks as if this app uses a database project in Visual Studio, I am looking at how to export it as SQL script so I can add create it in SQL server management studio. I have read that I can do this by going to the properties for the database project and clicking the 'deploy' tab however I don't appear to have a deploy tab! I'm guessing its down to the version of Visual Studio. I'm using 2010. How do I export the project as a SQL script file?

enter image description here

2
  • That looks quite different. Did you try settings? Commented Jan 2, 2013 at 20:21
  • What you see is different based on what Type of project you have open (or what type VS thinks it is). The above looks like a normal Application project. Thomas Steven's post looks like a Data-tier Application project. Commented Jan 2, 2013 at 21:37

1 Answer 1

6

The following steps could be helpful:

You can try the settings tab. The environment depends on the database project type. In one of my projects I have a tab called Project Setting where it gives me the option to create a SQL script (see image below)enter image description here

Or in other editions of Visual Studios
1. Open the project / solution and right-click the project and select Properties or double-click on the Properties folder
2. A new window appears in your environment, showing all project properties. Now Click the Deploy tab
3. Under Deploy Action select "Create a deployment script (.sql)" from the drop-down list
4. Hit the save button and close this window
5. From the Build menu select Build Solution and then select "Deploy [solution name]"
6. Once your script is deployed it should be available under the SQL-debug folder,
for example: [path to my project]\sql\debug\script.sql

Sign up to request clarification or add additional context in comments.

2 Comments

What version and edition of Visual Studio is this? I think that's at least part of the difference.
@RBarryYoung, This option definitely exists in Visual Studio 2013. This could possibly be 2012, also.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.