Using the latest beta (beta8) and only targeting dnx451 I thought that I would be able to make use of the full .net client framework. I am trying to create a plugin infrastructure in a vnext/dnx application where I can reload the plugins without restarting the app using MEF and have seen some examples but it doesn't look like I can use MEF with dnx451 (I am not targeting dnxcore).
Asked
Active
Viewed 172 times
1
-
I haven't seen that scenario running yet. If you do, keep us posted! – Maxime Rouiller Nov 10 '15 at 17:16
-
One more link for you: http://stackoverflow.com/questions/28801312/is-there-a-replacement-for-mef-in-net-core-or-asp-net-5 – Maxime Rouiller Nov 10 '15 at 17:18
-
Reading the other stackoverflow you point to @MaximeRouiller it looks like I should be able to reference MEF without any issues as I am not targeting .Net Core. I wonder if I have to change from dnx451 to dnx46 or something. – runxc1 Bret Ferrier Nov 10 '15 at 18:26
-
Mainly the target. You would need to rebuild the NuGet package to include the target platform `dnxcore50` (add `+dnxcore50` at the end of the folder name). nupkg are just zip file so renaming the proper folder and serving the file locally would work. – Maxime Rouiller Nov 10 '15 at 18:39
1 Answers
0
So just in case anyone else runs across this the main Issue that I ran into was the Visual Studio tooling was not updating the project.json correctly. Below is an example of how the framework assemblies references should be added (Such as MEF)
{
"version": "1.0.0-*",
"description": "AutoSpark.Runner Class Library",
"authors": [ "bferr" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"frameworks": {
"net451": {
"frameworkAssemblies": {
"System.ComponentModel.Composition": "4.0.0.0",
"System.Reflection.Context": "4.0.0.0",
"System.ComponentModel.Composition.Registration": "4.0.0.0"
}
}
}
}

runxc1 Bret Ferrier
- 8,096
- 14
- 61
- 100