Using the content pipeline, how do I get the output path

Because I'm working with assemblies I can't use the xnb files (I have to load a file off disk by passing the filename to LoadAssembly)

Previously I required the pipeline DLL was placed in the output directory, and used its location where to stick my files but this isn't working for some complex assembly reason mentioned in another post.
What I really want is a way of finding the path of the xnb file that is normally produced and creating my file in the same place In a ideal world I could also inhibit the output of the xnb file and tell the dependency checker to use my file...

I haven't seen anything about changing the output file in the content pipeline but this could just be I haven't looked hard enough.


Re: XNA Game Studio Express Content Pipeline Output Path

Shawn Hargreaves - MSFT

I don't actually think there is any general way of finding the output path.

Typically this will be bin\platform\configuration, where platform is one of "Xbox 360" or "x86", and configuration is one of "Debug" or "Release", but the user could potentially change this to anything they like in their VS project settings.

You could try something like:

string output = "bin/";

if (processorContext.TargetPlatform == TargetPlatform.Windows)
output += "x86/";
output += "Xbox 360/";

output += processorContext.BuildConfiguration;

but be aware this could break if the user has done something crazy with their project settings.