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?
1 Answers
I know the answer. These lock references are in theMicrosoft.NET.Sdk.BeforeCommon.targets
This 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 thePropertyGroup
Add belowDisableImplicitFrameworkReferences
Attribute, as follows:
<PropertyGroup>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<PropertyGroup>