As shown in the figure:
Some assemblies I don’t reference, such as System.Drawing , but it appears in the reference and is locked. It can’t be deleted. What’s the matter?
I know the answer. These lock references are in the
Microsoft.NET.Sdk.BeforeCommon.targetsThis file is defined in the file. This file belongs to the dotnet core SDK. If there are multiple versions of DONet core SDK installed on the developer, there are also multiple versions of the file. The location is not important. Use everything to search.
The solution is not to modify the above file, just in the project. Csproj file, in the
DisableImplicitFrameworkReferencesAttribute, as follows:
<PropertyGroup> <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences> <PropertyGroup>