Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AspNet precompile error for WebActivator.1.5.2 #5

Open
vicneanschi opened this issue Dec 19, 2012 · 9 comments
Open

AspNet precompile error for WebActivator.1.5.2 #5

vicneanschi opened this issue Dec 19, 2012 · 9 comments

Comments

@vicneanschi
Copy link

Hello!
I have a project on .NET 4.0 which uses combres which requires WebActivator.
I've updated WebActivator from 1.4.4 to 1.5.2 and started to get error on AspNet precompile:

error ASPRUNTIME : The pre-application start initialization method Run on type WebActivator.ActivationManager threw an exception with the following error message: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.. [D:\Work\src\trunk\EF\WM.EF.msbuild.xml]

@davidebbo
Copy link
Owner

Looks like the same as http://stackoverflow.com/questions/13748055/could-not-load-type-system-runtime-compilerservices-extensionattribute-from-as, which sounds like a pretty subtle issue. Do you have .NET 4.5 framework installed, or are you still running 4.0?

@vicneanschi
Copy link
Author

I'm on 4.0.
Will try to update framework.
Thank you.

@gdandy
Copy link

gdandy commented Dec 27, 2012

This is a real issue when you are building with a machine that has .NET 4.5 installed and deploying to a Windows 2003 server. Windows 2003 servers do not support .NET 4.5, in fact it won't even let you try to install .NET 4.5 on a Windows 2003 server.

@davidebbo
Copy link
Owner

I understand this is a problem. What I'm less clear on is whether WebActivator is doing anything it should do differently here, or whether the issue is in the ASP.NET precompilation process.

@damianog
Copy link

damianog commented Jan 9, 2013

@davidebbo
Copy link
Owner

I read all that, but I still don't see how WebActivator itself could be doing something wrong here. It doesn't itself use ILMerge in any way. Are you calling ILMerge as part of your build? Or maybe indirectly via aspnet_merge?

@damianog
Copy link

damianog commented Jan 9, 2013

OK WebActivator is not the problem, Quartznet was.

Today when I updated nuget packages:

WebActivator was updated from 1.5.2 to 1.5.3
Quartznet from 2.0.1 to 2.1.1 (you can see in https://github.com/quartznet/quartznet that It use ILMerge)

I use webactivator to start the a quartz static class scheduler in my asp.net web site by using
[assembly: WebActivator.PostApplicationStartMethod(typeof(Scheduler), "Start")]

so the exception has been fired immediatly as I placed the Quartznet dll in the bin folder

I roll-back Quartznet to 2.0.1 and now all is running with WebActivator 1.5.3

maybe vicneanschi had a similar issue.

@davidebbo
Copy link
Owner

@damianog can you give more details about how you are publishing from your 4.5 machine to your 4.0 machine? Are you using ILMerge or aspnet_merge in that process?

@damianog
Copy link

damianog commented Jan 9, 2013

The case where I happened to get the exception is in an old webform site updated to ASP.net 4.0
For publication I just use the Copy Web Site Tool to deploy into my Win2003 R2 web server.

Cause the update of the dlls by nuget update-package, after test that all run perfectly in my developing machine, (a Win7 with dotnet 4.5 installed, what I do was to sync my bin folder with the server destination and the newest Quartznet library started to hang the web server online compilation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants