Service Fabric 2.1.150 在没有 AutoGenerateBindingRedirects 的情况下导致 MSBuild 警告
Service Fabric 2.1.150 causes MSBuild warning without AutoGenerateBindingRedirects
我刚刚更新到 Azure Service Fabric 2.1.150 SDK 并注意到我在编译清单 (.sfproj
) 项目时开始收到构建警告:
C:\Program File (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5):
warning MSB3276: Found conflicts between different versions of the same dependent
assembly.
Please set the "AutoGenerateBindingRedirects" property to true in the project file.
For more information, see http://go.microsoft.com/fwlink/?inkId=294190.
我可以很容易地按照说明进行操作,并通过编辑 .sfproj
:
来防止出现警告
<PropertyGroup Label="Globals">
<ProjectGuid>12dbad9d-346c-xxxx-xxxx-04ab65fb4cac</ProjectGuid>
<ProjectVersion>1.1</ProjectVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
问题:为什么这在 2.1.150 中开始发生,我应该担心什么吗?
由于此新版本中的 .sfproj 使用的某些 MSBuild 文件的逻辑发生了变化,因此在这种情况下会出现此警告。一旦下一个版本发布,它应该会解决这个问题,这样警告就不会再出现了。您的缓解措施很好,无需担心警告。
我刚刚更新到 Azure Service Fabric 2.1.150 SDK 并注意到我在编译清单 (.sfproj
) 项目时开始收到构建警告:
C:\Program File (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5):
warning MSB3276: Found conflicts between different versions of the same dependent
assembly.
Please set the "AutoGenerateBindingRedirects" property to true in the project file.
For more information, see http://go.microsoft.com/fwlink/?inkId=294190.
我可以很容易地按照说明进行操作,并通过编辑 .sfproj
:
<PropertyGroup Label="Globals">
<ProjectGuid>12dbad9d-346c-xxxx-xxxx-04ab65fb4cac</ProjectGuid>
<ProjectVersion>1.1</ProjectVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
问题:为什么这在 2.1.150 中开始发生,我应该担心什么吗?
由于此新版本中的 .sfproj 使用的某些 MSBuild 文件的逻辑发生了变化,因此在这种情况下会出现此警告。一旦下一个版本发布,它应该会解决这个问题,这样警告就不会再出现了。您的缓解措施很好,无需担心警告。