views:

34

answers:

1

I'm working with a co-worker on this, will try on my own machine shortly, but wanted to get the question posted quickly. I've also been Googling for step-by-step "how to setup for WCF service" and not finding anything on target. I've done it before at a prior company, but forgetting the details now.

Are .SVC files automatically included in the "Primary Output" of another project?
We did a "Add" "project output" then pointed to WCF web service project. The .dlls all show up, but not the .SVC files.

  1. Should the SVC files be included with the primary output? Or does "primary output" just refers to the Debug/Bin output?
  2. Can we deploy without the SVC files? I'm thinking we need the SVC not the C#, show I don't want to include "all source files".
  3. Do we have to add the SVC files manually?
  4. Likewise, do we have to add the web.config manually?

Using VS2010

After a few minutes of experimenting, I think it is "Content Files" that includes the .svcs and the .configs.

So is that the best practice, to include the following: 1) Primary output 2) Content files?

A: 

Primary output is pretty much the debug (or release)/bin. So if yo use a web deployment project you can tell it to put your target's primary output in the bin and then one level up add the .svc, web.config, and global.asax by hand.

On possible issue though is that if you do this in source control using TFS, it will try to put you output dlls into source control, which can cause all sorts 'o' fun.

Good Luck.

edgaralgernon
only thing I would recommend is to use the Web Setup Project instead, as it will mimic the target enviroment a bit better.
edgaralgernon
Seems like "Content Files" will add all the .svcs, web.config, and asax in one fell swoop - that was the point of my question. Is there any benefit to adding them one at a time, or am I seeing the purpose of "Content Files" in the wrong way.
NealWalters

related questions