This exception is thrown in the method

public Stream GetFileData(AppFileInfo fileInfo) { var path = Path.Combine(TestConfigPath, fileInfo.RelativePath, fileInfo.FileName); return File.OpenRead(path); } 

And in the exception is the path:

D: \ CS \ BCDemo.sln

I need a way

D: \ TestRemoteConfigsCS \ BCDemo \ CS \ BCDemo.sln path = CS \ BCDemo.sln

and should be

D: \ TestRemoteConfigsCS \ BCDemo \ CS \ BCDemo.sln

 private string TestConfigPath { get { return Path.Combine(@"D:\TestRemoteConfigs", _configInfo.Url); } } } 
  • Could you describe the essence of the question in more detail? And he writes the way "D: \ CS \ BCDemo.sln" - where and who writes, where do you see it? And I need a way - where is it necessary? - Denis Bubnov
  • I apologize for the stupid description. I need to read a certain file, the path of which is combined, and transfer it to Stream. When you try to do this, an exception appears. When you run the debugger separately for all variables, everything is fine, but as a result, File.OpenRead takes the path parameter not in the correct form, not taking into account the TestConfigPath property - Rise Against
  • If you just look before writing the path variable TestConfigPath - what TestConfigPath it return? - Denis Bubnov
  • returns D: \ TestRemoteConfigsCS \ BCDemo \ - Rise Against
  • replaced as you suggested, the result is the same - Rise Against

0