Gopal SA
Gopal SA

Reputation: 959

TFS build drop folder does not contain database scripts

This is probably a novice MS build query.

I have created an empty C# project called Database with only database sql scripts. The reason for doing this is to have the scripts output into the TFS build drop folder, since adding scripts as solution items were not output without changing templates/tweaking the XAML files.

enter image description here

However I noticed that the new project does not have a main entry point and hence compilation fails. So i went to Build Configuration manager and disabled both 'Build' and 'Deploy' which means I do not get the compilation error.

But the problem is that I am unable to find the scripts output anywhere in the TFS build drop folders. Please advise.

Upvotes: 0

Views: 321

Answers (1)

Mark Arnott
Mark Arnott

Reputation: 1994

To resolve your compilation error:

  1. Open the project properties.
  2. Select the 'Application' area on the left (if it is not already selected)
  3. Change the 'Output Type' from Console Application to Class Library

Once this is done you will be able to build and deploy without compilation errors even though you do not have a main() entry point.

This still will not resolve your concern about the 'Copy to Output Directory'. Visual Studio by default recognizes .sql files as having a build action of Content with an Output property of 'Do Not Copy'.

Upvotes: 1

Related Questions