The GetManifestResourceStream
function[
^] is used to read a resource embedded in your assembly. You are passing a relative path to a file on disk. That will never work, regardless of the project type.
If you want to read an embedded resource, you need to pass a valid resource name to the
GetManifestResourceStream
function:
using (var stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("Namespace.Of.Your.Resource.Sample.xsd"))
{
...
}
If you want to read the file from disk, then use the correct method:
using (var stream = System.IO.File.OpenRead(@"..\..\Sample.xsd"))
{
...
}