I'm porting a .NET 4.6.1 console app to .NET Core.
I have NETStandard.Library 1.6 installed, and it's not letting me pass a file path string into a StreamReader constructor. Viewing the definition confirms that it's not available:
Where's it gone?
I'm porting a .NET 4.6.1 console app to .NET Core.
I have NETStandard.Library 1.6 installed, and it's not letting me pass a file path string into a StreamReader constructor. Viewing the definition confirms that it's not available:
Where's it gone?
Copyright © 2021 Jogjafile Inc.

This is correct. .Net Core 1.0/.Net Standard 1.x refactored the base libraries, so that basic stream types like
StreamReaderare in theSystem.IOpackage andFileStreamis in theSystem.IO.FileSystempackage. Since the constructor you're looking for would requireStreamReaderto depend onFileStream, it was removed.Note that a large part of this refactoring was reversed for the upcoming .Net Core 2.0/.Net Standard 2.0, so you will be able to use this constructor on .Net Core in the future.