docs
docs copied to clipboard
MetadataFileReference is internal
I'm trying to follow csharp-semantic.pdf under docs/samples. When I add this code:
var compilation = CSharpCompilation.Create("HelloWorld")
.AddReferences(
new MetadataFileReference(typeof(object).Assembly.Location))
.AddSyntaxTrees(tree);
I get a compilation error because MetadataFileReference is an internal type.
Got it to work using MetadataReference.CreateFromAssembly(typeof (object).Assembly), so I suppose the sample doc should be updated.
Yes, this is deliberately exposed through the factory methods now. There are (unfortunately) a lot of things that need to be updated in that document.
Reopening as the docs are still wrong.
Moving to docs team to decide future of doc'ing roslyn.