随着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
发布评论