I have an xml file in a WCF application that describes dependencies. It is loaded when the service facade constructor runs and works great when testing the app alone. The way our separate web testing application is setup is an endpoint in a different (mvc) project – So the relative paths are different to the xml file that we need to load. The question is what would be the best way to load that file from both projects (so that when you run the first project alone it loads the file, but then when that dll is loaded in the second project it can still find the xml file)?
Share
I tried the “Copy To Output” with no luck – for some reason my root path was not where the output path was (which i previously thought)… So to abstract away any headaches from other developers setting up this project I did this:
Which of course requires the file to be an embedded resource.