Microsoft 在这段关于 PackageReference 的文章中试图表达什么?
What does Microsoft attempt to say in this passage about PackageReference?
我在这里引用它:
Using PackageReference for a project with no PackageReferences
Advanced: If you have no packages installed in a project (no
PackageReferences in project file and no packages.config file), but
want the project to be restored as PackageReference style, you can set
a Project property RestoreProjectStyle to PackageReference in your
project file.
<PropertyGroup>
<!--- ... -->
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<!--- ... -->
</PropertyGroup>
This may be useful, if you reference projects which are
PackageReference styled (existing csproj or SDK-style projects). This
will enable packages that those projects refer to, to be
"transitively" referenced by your project.
谁能把它翻译成英文? (俄语或希伯来语也适用)
"PackageReference" 功能不仅仅是将对 NuGet 包的引用添加到单个项目。它还启用了构建工具中的一些功能,这些功能不适用于基于 packages.config 的项目。
为(尚未)引用任何 NuGet 包的项目设置此 属性 可完成两个主要任务:
启用引用的传递流:如果项目引用另一个引用 NuGet 包的项目(通过 ProjectReference),这些包将在当前项目和引用该项目的项目中可用
使用 Nuget 包管理器只会将 PackageReference
项添加到项目文件中。根据 Visual Studio 实例的配置方式,它可能会使用 packages.config
文件、PackageReference
项或在首次安装包时询问您。通过设置此 属性,您可以强制它创建 PackageReference
项。
我在这里引用它:
Using PackageReference for a project with no PackageReferences
Advanced: If you have no packages installed in a project (no PackageReferences in project file and no packages.config file), but want the project to be restored as PackageReference style, you can set a Project property RestoreProjectStyle to PackageReference in your project file.
<PropertyGroup> <!--- ... --> <RestoreProjectStyle>PackageReference</RestoreProjectStyle> <!--- ... --> </PropertyGroup>
This may be useful, if you reference projects which are PackageReference styled (existing csproj or SDK-style projects). This will enable packages that those projects refer to, to be "transitively" referenced by your project.
谁能把它翻译成英文? (俄语或希伯来语也适用)
"PackageReference" 功能不仅仅是将对 NuGet 包的引用添加到单个项目。它还启用了构建工具中的一些功能,这些功能不适用于基于 packages.config 的项目。
为(尚未)引用任何 NuGet 包的项目设置此 属性 可完成两个主要任务:
启用引用的传递流:如果项目引用另一个引用 NuGet 包的项目(通过 ProjectReference),这些包将在当前项目和引用该项目的项目中可用
使用 Nuget 包管理器只会将
PackageReference
项添加到项目文件中。根据 Visual Studio 实例的配置方式,它可能会使用packages.config
文件、PackageReference
项或在首次安装包时询问您。通过设置此 属性,您可以强制它创建PackageReference
项。