C# 加入“;mscorlib.dll“;引起错误
我在VS2017项目中添加了“mscorlib.dll”引用以修复一个问题。 我在.csproj文件中添加了以下行以引用mscorlibC# 加入“;mscorlib.dll“;引起错误,c#,asp.net,visual-studio,assemblies,C#,Asp.net,Visual Studio,Assemblies,我在VS2017项目中添加了“mscorlib.dll”引用以修复一个问题。 我在.csproj文件中添加了以下行以引用mscorlib <ItemGroup> <Reference Include="mscorlib"> <!-- Replace with whatever your path to mscorlib is --> <HintPath>C:\Program Files (x86)\Reference A
<ItemGroup>
<Reference Include="mscorlib">
<!-- Replace with whatever your path to mscorlib is -->
<HintPath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
C:\Program Files(x86)\Reference Assembly\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll
真的
在我添加了引用之后,我开始出现错误,我缺少了预定义的类型,如下所示,有人能告诉我这是什么原因吗。
那可能是错误的解决方案。您试图解决的原始问题是什么?@Rup,我的.cs文件中的一个函数无法在名称空间“System.Security”中识别“Cryptography”,因此,我在.csproj文件中显式添加了“mscorlib.dll”,这导致了前面提到的问题