Reputation: 2019
I am trying to use aspnet_compiler.exe to compile a webapp project. While doing that I am getting error in windows 2019 server (has .net framework 4.8.03761) but it compiles fine on windows 10 pro ( .net framework 4.8.04084).
In aspx file I have:
<asp:HtmlIframe name="docViewFrame" id="docViewFrame" runat="server"
sandbox="allow-forms allow-popups allow-pointer-lock allow-scripts allow-same-origin allow-top-navigation">
</asp:HtmlIframe>
In .cs file it is defined as:
protected global::System.Web.UI.HtmlControls.HtmlIframe docViewFrame;
I am getting this error when I run it in windows 2019 server:
The type or namespace name 'HtmlIframe' does not exist in the namespace 'System.Web.UI.HtmlControls' (are you missing an assembly reference?)
It looks like this is happening because of the version different of .net 4.8 framework in both the machines (so the version of aspnet_compiler.exe is also slightly different). The same code works on windows 10 pro, with the same .net framework 4.8. I cannot upgrade the .net framework version in windows 2019 server.
Upvotes: 0
Views: 354