Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MetadataFileReference is inaccessible

Tags:

c#

roslyn

I recently updated my project to Roslyn 1.0, and can't find MetadataFileReference class anywhere.

references: new[] { new MetadataFileReference(typeof(object).Assembly.Location) }

Error   CS0122  'MetadataFileReference' is inaccessible due to its protection level

What can I use instead?

like image 776
kavics Avatar asked Nov 16 '14 21:11

kavics


1 Answers

Sorry, found the answer in the source code:

references: new[] { MetadataReference.CreateFromAssembly(typeof(object).Assembly) }
like image 192
kavics Avatar answered Oct 05 '22 22:10

kavics