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!
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
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
AdditionalExplicitAssemblyReferences
that 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 addingto the
ItemGroup
that contains references (or a new one).You can now refer to a
System.Core
type using