3

Forgive my ignorance, though I am new to this. I've search a lot but can't seem to come to a definite conclusion, so any information is appreciated.

So to the question: Is there a built-in configuration for web site publishing in MS Visual Studio called "Release"? The reason I'm asking is that some have told me it is, but I can only find the "Debug" configuration in Visual Studio.

So, if there's supposed to be a "Release" as well, how can I get it or can I manually add a new equivalent?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
guitarzero
  • 545
  • 9
  • 18
  • maybe this could help you http://stackoverflow.com/questions/4043821/performance-differences-between-debug-and-release-builds – Nacho Dec 03 '13 at 17:38
  • Is this a Web Site "project" (File->New Web Site), or a Web Application Project (File->New Project)? – John Saunders Dec 03 '13 at 17:47
  • @JohnSaunders, it's the first alternative - Web Site project. I read something about debug not being applicable anyway on web site project. Might that be the reason or is it still strange that "Release" options isn't showing? – guitarzero Dec 03 '13 at 17:49
  • I don't know. Web Site "projects" aren't projects. They are very strange things, and should be avoided as strangeness is to be avoided. The handling of namespaces is also different in these "projects". – John Saunders Dec 03 '13 at 17:53

2 Answers2

1

Go to the Solution Explorer (CTRL+W+S), then find your project. Right click on it and go to its properties. Find the Build tab. The top of the window will contain the active build configuration for your project. You can then change from debug (the default) to release.

By default, projects have two configurations: release and debug. You can make more, but first learn more about those two. The most important differences are explained in the question linked by Nacho in the comments. Good luck and happy codding.

edit: Web Site projects don't have the Release configuration available, but it makes no difference since they are not compiled. Web Application projects, on the other hand, do get compiled and have both configurations available.

Community
  • 1
  • 1
Geeky Guy
  • 9,229
  • 4
  • 42
  • 62
  • Although I thank you for your reply @Renan, it doesn't solve my problem, since the "Release" is missing for me. I can only select the debug, for some reason. – guitarzero Dec 03 '13 at 17:48
  • @user2989484 edited the question now that I've taken a closer look at the tags in the question. – Geeky Guy Dec 03 '13 at 17:58
  • All right @Renan. I had a feeling it was something like that. Thanks! – guitarzero Dec 03 '13 at 18:07
  • The answer is half right. Web site projects do only have "Debug" configuration available. But, web site projects are compiled. The publish pipeline shipped by microsoft runs aspnet_compiler over it and then optionally aspnet_merge. – gregpakes Dec 03 '13 at 20:57
1

It's been a long time (~4,5 years), but I think I might have used a Web Deployment Project for a Web Site Project once, for changing config files (replacing by copying from another directory) (xml node: WebConfigReplacementFiles)

I used Web Deployment Projects before web.config transforms where invented. (If you are interested in web.config transforms, check out my tutorial for VS 2010: http://www.tomot.de/en-us/article/5/asp.net/how-to-use-web.config-transforms-to-replace-appsettings-and-connectionstrings)

Another useful link might be: http://msdn.microsoft.com/en-us/library/377y0s6t(v=vs.100).aspx

citronas
  • 19,035
  • 27
  • 96
  • 164