How to exclude ASP.NET web site code-behind files from compile?
Asked Answered
G

3

6

I am refactoring a stack of ASP.NET pages. I'd like to compile and test the ones I've completed. However, Visual Studio won't let me run the Web Site with compile errors on the non-refactored pages. How can I temporarily exclude them without removing them from the project itself? Can you do so through configuration of some sort?

Ganges answered 20/10, 2008 at 18:37 Comment(1)
Your checked the wrong answer. Look @notytony's oneGranulation
A
4

On Visual studio 2010 or later, you can achieve the functionality in two ways.

1)Right click the file, select 'Exclude From Project'

2)Right click the file, select 'Properties' --> select 'Configuration Properties' --> select 'General' --> choose 'Yes' from drop down menu for option 'Excluded From Build'

Armor answered 2/8, 2013 at 1:10 Comment(1)
Any shortcuts for exclude from build?Burrstone
K
2

Right-click on the file(s) and select "Exclude from project".

Kermitkermy answered 20/10, 2008 at 18:54 Comment(1)
Doing this the files are removed from the project, I don't know why @Ganges marked this as answer.Granulation
M
0

I would create two projects and copy over the completed ones to the new project as they are refactored, then build the new project.

Marcimarcia answered 20/10, 2008 at 18:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.