我可以获取Google Analytics 4(GA4).NET客户端库在.NET Framework 4.7.2项目上工作

发布于 2025-02-14 00:37:57 字数 479 浏览 3 评论 0原文

尝试使用Nuget安装Google.analytics.data.v1beta时,软件包无法安装

安装失败。回头... 无法安装软件包'grpc.net.client 2.46.0'。您正在尝试将此软件包安装到一个针对的项目。NETFRAMEWORK,版本= v4.7.2'的项目中,但是该软件包不包含与该框架兼容的任何汇编引用或内容文件。有关更多信息,请联系包装作者。

看起来它的依赖项之一不支持.net框架

。 “ Nofollow noreferrer“> https://www.nuget.org/packages/google.analytics.data.v1beta#supportedframeworksworks-body-body-tab 它表明Google.analytics.data.v1beta支持Net462,更高的

人可以为.NET Framework 4.7.2项目安装.NET客户端库吗?

When trying to install Google.Analytics.Data.V1Beta using NuGet the package fails to install

Install failed. Rolling back...
Could not install package 'Grpc.Net.Client 2.46.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.2', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

It looks like one of its dependencies does not support .Net Framework

However looking at : https://www.nuget.org/packages/Google.Analytics.Data.V1Beta#supportedframeworks-body-tab
it shows that Google.Analytics.Data.V1Beta supports net462 and higher

Anyone was able to install the .Net client library for a .net Framework 4.7.2 project?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

深陷 2025-02-21 00:37:57

此页面讨论了HTTP2要求以及一些替代方案。

.NET Framework has limited support for gRPC over HTTP/2. To enable gRPC over HTTP/2 on .NET Framework, configure the channel to use WinHttpHandler. 

https://learn.microsoft.com/en-us/aspnet/core/core/grpc/supported-platforms?view= aspnetcore-7.0

https://learn.microsoft.com/en-us/aspnet/core/grpc/netstandard?view=ply= aspnetcore-7.0

This page talks about an http2 requirement, and some alternatives.

.NET Framework has limited support for gRPC over HTTP/2. To enable gRPC over HTTP/2 on .NET Framework, configure the channel to use WinHttpHandler. 

https://learn.microsoft.com/en-us/aspnet/core/grpc/supported-platforms?view=aspnetcore-7.0

https://learn.microsoft.com/en-us/aspnet/core/grpc/netstandard?view=aspnetcore-7.0

做个ˇ局外人 2025-02-21 00:37:57

在VS2015中使用Nuget安装Google.analytics.data.v1beta时,我也面临着同一问题,但是当我尝试在不同的VS版本中安装EG:2017,2019,2022时,它已成功安装。因此,我想问题与我们正在使用的框架版本无关,而与VS版本有关。
vs错误屏幕快照

I was also facing the same issue while installing Google.Analytics.Data.V1Beta using NuGet in VS2015, but when I tried to install in different VS version eg:2017,2019,2022, it got successfully installed. So, I guess the issue is not about the framework version that we are using but about VS version.
VS Error Screenshot

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文