将Power BI Embedded nuget软件包从beta升级到1.0时出现异常(Exception when upgrading Power BI Embedded nuget package

编程入门 行业动态 更新时间:2024-10-28 05:20:53
将Power BI Embedded nuget软件包从beta升级到1.0时出现异常(Exception when upgrading Power BI Embedded nuget packages from beta to 1.0)

随着Power BI Embedded发布到正式版1.0,我尝试将我的应用程序中的PowerBI nuget软件包从版本beta升级到1.0,一切都在localhost上完美运行。

但是当我部署到Web服务器(Windows Server 2012 R2上的IIS)时,我得到了异常:

c:\ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \ Temporary ASP.NET Files \ root \ ada706e8 \ d6adc8aa \ App_Web_index.cshtml.1c5a15dd.b_ofojaq.0.cs(77):error CS0012:类型'System。 Object'在未引用的程序集中定义。 您必须添加对程序集'System.Runtime,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a'的引用。

我不知道如何解决它,我在.NET 4.6.1上的应用程序。 我不得不回到测试版进行生产,直到找到解决方法。

As Power BI Embedded release to official version 1.0, I tried to upgrade PowerBI nuget packages in my application from version beta to 1.0, everything works perfectly on localhost.

But when I deploy to the web server (IIS on Windows Server 2012 R2), I got exception:

c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\ada706e8\d6adc8aa\App_Web_index.cshtml.1c5a15dd.b_ofojaq.0.cs(77): error CS0012: The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

I am not sure how to fix it, my application on .NET 4.6.1. I had to go back beta version for production until finding the way to fix it.

最满意答案

它通过添加以下行来修复:

<add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

到web.config:

<compilation debug="true" targetFramework="4.6.1"> <assemblies> <add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </assemblies> .... </compilation>

It fixed by adding the line:

<add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

into web.config:

<compilation debug="true" targetFramework="4.6.1"> <assemblies> <add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </assemblies> .... </compilation>

更多推荐

NET,'System,程序,电脑培训,计算机培训,IT培训"/> <meta name="descripti

本文发布于:2023-08-03 05:53:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1383914.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:软件包   升级到   异常   BI   Power

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!