Fix #433 - Excel Interop, Could not load file or assembly #435
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #433 - Excel Interop, Could not load file or assembly
When we use Microsoft.Office.Interop.Excel.dll (or Word, PowerPoint, Outlook) with .Net Core, we get this error:
"Could not load file or assembly 'office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'. "
To resolve this error in a console application targeting .Net Core, we need:
On the LinqPad side, the MS Office Interop DLLs work with .NET Core with LinqPad 6.5 and above
On our side, we only need:
This is possible with the
MetadataReferenceProperties struct
that I added as a parameter to IRoslynHost (previously we used the default value)