-
After upgrading from DNN 9.7.2 to DNN 9.8 (without issues) I get errors like this:
I tried changed the code that caused the error, but realized that variations of the error occurs in a number of different situations like "The type 'Enum' (...)" etc. When I manually add this reference to the web.config everything works fine. But I don't think that adding it manually is the right solution.
Any idea what could be causing this? I have verified that .NET Framework 4.7.2 is installed. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 6 replies
-
I assume there's a |
Beta Was this translation helpful? Give feedback.
-
I don't think I've seen that issue before. It should be safe to add that To track down the ultimate issue, it would be worth comparing the assemblies included in the install package when you're compiling against DNN 9.7.x and DNN 9.8.x, and 1️⃣ make sure you're not including assemblies that DNN provides, and 2️⃣ make sure there aren't any surprises about new or changed assemblies (in theory, only your custom assemblies would change). |
Beta Was this translation helpful? Give feedback.
-
Okay: I have spend a lot of time now doing code cleanup followed by step by step upgrading an comparing changes (as suggested). I found nothing odd at all. As a sanity check - which I probably should have done as a first step :) - I created a simple module in a fresh DNN 9.8 installation. It only adds a log entry to the DNN event log and nothing else. It's basically just a ASCX file registered as a module. It doesn't work either. This is the source code.
The same code worked in DNN9.7 and works when I manually add a reference to netstandard in web.config. I realized that this might only to be an issue in webforms module. The same code works in my webservices (DnnApiController). Do you think this is an DNN98 issue or am I missing something here? PS: I know that the EventLogController is deprecated in 9.7. |
Beta Was this translation helpful? Give feedback.
-
Sure thing. Thanks for helping me out. There no install package, but it can be registered manually:
|
Beta Was this translation helpful? Give feedback.
-
Thank you for looking into this. Do you see installing the Microsoft CodeDom .NET Compiler as a solution or as a temporary workaround? In other words: Can I install it and upgrade my production site to 9.8? And yes, I use this setup with (fairly simple) uncompiled modules (including .ascx.cs) in combination with a more complex (compiled) WebAPI. |
Beta Was this translation helpful? Give feedback.
-
Ah, I see that you added another reply after I started writing mine. Seems that it's not a solid, final solution :) |
Beta Was this translation helpful? Give feedback.
-
Using the CodeDOM provider will allow you to use newer compiler features but isn't a complete fix. I think you will need to go ahead and add the <configuration>
<nodes configfile="Web.config">
<node path="/configuration/system.web/compilation/assemblies"
action="update"
key="assembly"
collision="ignore">
<add assembly="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
</node>
</nodes>
</configuration> You can also run this manually in the Config Manager page in the Persona Bar. |
Beta Was this translation helpful? Give feedback.
Using the CodeDOM provider will allow you to use newer compiler features but isn't a complete fix. I think you will need to go ahead and add the
netstandard
reference if you're not going to compile your codebehind classes. You can add a config component to your manifest using the following XML Merge document:You can also run this manually in the Config …