I absolutely need an extern alias for System.Core in my project. Unfortunately, in a .Net 4.0 project, you cannot even add a reference to System.Core because, apparently, the build system includes it by default. Does anyone have any idea on how I can coerce the system to let me specify an extern alias for this lib? Thanks!
I absolutely need an extern alias for System.Core in my project. Unfortunately, in a
Share
This question is old but I ran into the same problem. As far as I understood, this is due to Visual Studio implicitly adding a reference to System.Core.
You can override this by editing your csproj msbuild file and adding:
at the end.
This disables any
AdditionalExplicitAssemblyReferencesthat I assume Visual Studio has passed to MSBuild using the /p[roperty] switch.Of course, we now still have to add the System.Core reference as it is no longer referenced. Do so by adding
to the
ItemGroupthat contains references (or a new one).You can now refer to a
System.Coretype using