Last post Sep 26, 2017 02:57 AM by Jean Sun
Sep 21, 2017 04:24 PM|robbpat|LINK
I am having trouble publishing my website...sometime it will publish, sometimes it will not...even without changing anything.
After Debugging the compile, when the solution publishes, I do not get a TypeLoadException. When the publish doesn't go through, it is an error on a page that I built. The error is a TypeLoadException....Cound not load type "MySolutionNameSpace.WebPageClass"
from assembly. The .dll is being built during the publish.
If I rename the class in the application, it appears to load that assembly fine, and it gives an error on another assembly (on a page that I built).
cleaned my .dlls
my webconfig I set a different tempDirectory each time.
I close VS,
and even Reboot..and no luck.
During debugging the compile, and I get the error, I viewed the assembly during publish as soon as I get the error and everything in the .dll appears fine....meaing, what it is trying to load is in the .dll I am at a standstill.
I am using Visual Studio 2010 Professional Version 10.040219.1 SP1Rel Microsoft .Net Framework Version 4.5.50938 SP1 Rel. The application runs fine as expected.
Sep 21, 2017 06:02 PM|robbpat|LINK
An add-on, the Publish Error that I get is the "Object reference not set to an instance of an object", but I believe the underlying issue is the TypeLoadException.
Sep 22, 2017 02:48 AM|Jean Sun|LINK
The error is a TypeLoadException....Cound not load type "MySolutionNameSpace.WebPageClass" from assembly. The .dll is being built during the publish.
Some possible causes to this issue are:
Some solutions are:
Sep 25, 2017 12:31 PM|robbpat|LINK
Thanks for your response.
The .dll is being created during Pre-Compile time during publish in a temporary folder....I did redirect it to TempDirector in my webconfig. It don't believe it is related to an older versions of the .dll...since a new .dll with a different name is being
created during the Publish's Pre-Compile. I can publish, the Code fine, I turn around and try to Publish without any changes, and it will fail (based upon the TypeLoadExepton error). Sometime it will publish, more often than not it will not publish.
I don't think it has to do with Installing the assembly specified in the error, since the assembly that is in error, is an assembly being built during Pre-Compile (that is my code
Sep 26, 2017 02:57 AM|Jean Sun|LINK
Is there any errors when you build your project?
That's a strange error I have ever met before, could you please share the detailed error message here?