Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute from assembly mscorlib....
Hi Guys.
I've recently went through a longer line of upgrades to get an old site up to date. I also updated contour to latest version.
However, the site throws an error when it tries to render forms on the frontend:
Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from
assembly 'mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'.
I googled around and found out that the attribute was moved from System.Core.dll to mscorlib.dll in .NET 4.5..
But does Contour now require that I install .net 4.5 on my server/hotel?
OR could something else be messing this up for me?
Hope for a speedy resolvment, this is my last speedbump in the update row.
Now it turns out that its actually running fine on my local machine, but once I push the website to my dev server it doesn't..
I know that the licens is valid to localhost also, so running boths sites as localhost, but still same. Not working on dev server, working fine locally.. Very strange indeed.
I'm beginning to suspect some kind of server misconfig..
I moved the site to the test-server. Now, on the test-server I get the same error ONCE on the login, but it dissapeared on refresh. Then the same error happened in the content-tree when I tried to open a node... But only ONCE. Then I can open everything...
I haven't setup permissions on all the folders needed yet, only on web.config at app_data.. (I was just iin the middle of doing the folder permissions through plesk desktop since I don't have server access)..
This leeds me to the idea that maybe this is permission-related? I'm going to do some more setup and testing on the test-site and try to illiminate this error and figure out what causes it..
And once more on the "publish entire site" dialogue.. out of the blue, since It worked just minutes ago..
Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Source Error:
Line 28:
Line 29: <form id="form1" runat="server">
Line 30: <asp:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" runat="server"></asp:ScriptManager> Line 31: <asp:ContentPlaceHolder ID="body" runat="server">
Line 32: </asp:ContentPlaceHolder>
I'm afraid that I still get the same YSOD after upgrade to 3.0.14..
As these links suggests, I think this *may* happen sometimes when code is compiled on a machine that has .net 4.5, even though the project explicitly uses 4.0.. Give it a read if you havent allready:
I'm still getting this error on a fresh Umbraco 6.1.6 install with Contour 3.0.18, on a server that only has .NET 4.0 (and no trace of 4.5).
I have installed 3.0.12 which works, but can't the problem be fixed in 3.0.18 as well? Is the build still targeting 4.5 to be compatible with Umbraco 7, and thus breaking compatibility with Umbraco 6?
Hmm 3.0.18 might be different since that has a 4.5 project in there, if it's on umbraco v6 try removing the v7 providers assembly and see if that fixes it
Just found this post...I'm running into the same problem with countour 3.0.18. Please CHANGE the 4.5 project to 4.0 or change it on the download page: http://our.umbraco.org/projects/umbraco-pro/contour. For 3.0.18 it says it works with .NET 4.0 and it does not, please change it to 4.5 so people know what they are getting into. I've got a big mess on my hands now because of this :(
The problem is actually not umbraco, but the .NET 4.5 framework. If you build a 4.0 project on a machine with 4.5 installed and them move that build to a server that does NOT have 4.5 installed > it will (depending on the resources used) crash. This is due to a change in 4.5. Some items were moved from System.Core.dll in 4.0 to mscorlib.dll in .NET 4.5 (one of them is System.Runtime.CompilerServices.ExtensionAttribute) which causes these problems...
EDIT: Removing the v7 (and v6) core dll's makes no diffrence.
Just tried installing 3.0.19 (on Umbraco 6.1.6) hoping that this had been fixed, but no dice. Even though it is listed as working on 6.1.x and requiring .NET 4.0 here: http://our.umbraco.org/projects/umbraco-pro/contour.
Can we please get a recent version of this (paid!) product that works correctly on the latest 6.x on .NET 4.0?
I'm trying using Contour for a project we're developing, to check if it's allright with our needs.
I've tried on Umbraco v6.1.2 (and v.6.2.1 on other machine) not having .net framework 4.5 installing Contour versions 3.0.21, 3.0.20, 3.0.19, 3.0.14 and all of them fails. And everytime I installed a version, I had to restore a previous backup, because uninstall doesn't work :''(
At last, it works with v.3.0.12...
Reading all this topic, and suffering this issue to get it installed, I can't believe that this paid product is listed as working with NET 4.0, and it's fails if you don't install an old version... If thisdoes not fix, I thinkwe will notacquireContour.
... or recompiling on a server without .NET 4.5 installed
We are unable to upgrade the server in the short term. In the meantime, we would like to offer customers the best products available but it is hard to explain to them why the package fails in 4.0 when the spec says otherwise.
Best regards,
P.S:
This problem has been reported multiple times here, here and here.
HI - I am having this issue as well, still with Umbraco v6.2.5 and Umbraco Contour version 3.0.26. Using the latest version of Contour to fix other issues (specifically file upload in IE)
I get the ysod when attempting to access Umbraco only (not on the content). Usually only the first time after hours/ next day of not being in the UI. Generally a page reload will make the error go away. Sometimes that doesn't work and need to restart the app by touching the web.config.
I tried to build on a server with only 4.0 and get the error still.
full error (just happened after probably session timeout)
Server Error in '/' Application.
Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Source Error:
Line 38: <body id="umbracoMainPageBody">
Line 39: <form id="Form1" method="post" runat="server" style="margin: 0px; padding: 0px">
Line 40: <asp:ScriptManager runat="server" ID="umbracoScriptManager" ScriptMode="Release"> Line 41: <CompositeScript ScriptMode="Release">
Line 42: <Scripts>
It's a bit of a long read this topic. But this is the gist of it: This error cannot be helped by not uploading the Umb 7 contour dll's.
The point is the entire contour project has been compiled on a server running .net 4.5. in .net 4.5 some namespaces have moved to different places, including a few in mscorlib. You'll probably keep getting this error now and then when the application restarts.
To circumvent the error you'll either have to downgrade contour to 3.0.17 (which is last version that doesn't have this problem) or you will have to switch to a .net 4.5 server.
Is there any chance to have a version of Contour that is compiled on .net 4 ?
I cannot upgrade the server to 4.5, that is completely out of my control, and in a large company, such things take forever.
I cannot downgrade to Contour 3.0.17 because I need the fix that is in place to allow file uploads to work correctly when using IE (which I believe is in latest contour version).
Some of us in this topic asked the umbraco HQ to do that for us, but unfortunately they never did. Maybe it's impossible for them to do, as the projects are probably mixed together, and the v7 version cannot be compiled against 4.5.
Anyway, there is no version that I know of that you can use.
You can maybe try a way around. Revert to 3.0.17 and create your own Control/FieldType for contour. It's not that hard to do.
For example, the code below is the standard FileUpload FieldType (don't know from which contour version, probably an older one) that receives the posted file and saves it. If you create your own control file (which works on IE) and refer to that instead of Core.Fileupload all you need to do is include the two files in an assembly and you're good to go.
FileUpload Type:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web; using System.Text.RegularExpressions;
namespace Umbraco.Forms.Core.Providers.FieldTypes { public class FileUpload : FieldType {
private Core.Controls.Fileupload fu; private List<Object> _value = new List<object>();
public FileUpload() { this.Id = new Guid("84A17CF8-B711-46a6-9840-0E4A072AD000"); this.Name = "File upload"; this.Description = "Renders an upload field";
if (!System.IO.Directory.Exists(HttpContext.Current.Server.MapPath(dir))) System.IO.Directory.CreateDirectory(HttpContext.Current.Server.MapPath(dir));
public override System.Web.UI.WebControls.WebControl Editor { get { fu = new Umbraco.Forms.Core.Controls.Fileupload(); fu.ID = "fu" + this.Id;
if (_value.Count() > 0) fu.FileName = _value[0].ToString();
return fu; } set { base.Editor = value; } }
public override string RenderPreview() { return "<input type='file'/>"; }
public override string RenderPreviewWithPrevalues(List<object> prevalues) { return RenderPreview(); }
public override List<object> ProcessValue(HttpContextBase httpContext) { List<Object> vals = new List<object>();
//files bool filesaved = false;
var files = httpContext.Request.Files; if (files.Count > 0 && files.AllKeys.Contains(this.AssociatedField.Id.ToString())) { HttpPostedFileBase file = null; file = files[this.AssociatedField.Id.ToString()]; if (file.ContentLength > 0) { string dir = Configuration.Path + "/files/" + Guid.NewGuid().ToString() + "/"; if (!System.IO.Directory.Exists(httpContext.Server.MapPath(dir))) System.IO.Directory.CreateDirectory(httpContext.Server.MapPath(dir)); file.SaveAs(httpContext.Server.MapPath(dir + file.FileName)); vals.Add(dir + file.FileName); filesaved = true; }
}
if (!filesaved) { vals.Add(httpContext.Request[this.AssociatedField.Id.ToString() + "_file"] ?? ""); }
return vals; } } }
Instead of Core.Controls.Fileupload fu you would have to refer to a control class you yourself created.
a control class might look like this (though this is just an alternative textbox control class that I created, one that has maxLength implemented. In the same way you could create a FileUpload class.
using System; using System.Web.UI; using System.Web.UI.WebControls;
namespace Contour.Addons.Controls { public class TextBoxAdvanced : TextBox { public string iMaxLength { get; set; } public override void RenderControl(HtmlTextWriter writer) {
Some of us in this topic asked the umbraco HQ to do that for us, but unfortunately they never did. Maybe it's impossible for them to do, as the projects are probably mixed together, and the v7 version cannot be compiled against 4.5.
Anyway, there is no version that I know of that you can use.
You can maybe try a way around. Revert to 3.0.17 and create your own FileUpload Control/FieldType for contour. It's not that hard to do.
For example, the code below is the standard FileUpload FieldType (don't know from which contour version, probably an older one) that receives the posted file and saves it. If you create your own control file (which works on IE) and refer to that instead of Core.Fileupload all you need to do is include the two files in an assembly and you're good to go.
FileUpload Type:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web; using System.Text.RegularExpressions;
namespace Umbraco.Forms.Core.Providers.FieldTypes { public class FileUpload : FieldType {
private Core.Controls.Fileupload fu; private List<Object> _value = new List<object>();
public FileUpload() { this.Id = new Guid("84A17CF8-B711-46a6-9840-0E4A072AD000"); this.Name = "File upload"; this.Description = "Renders an upload field";
if (!System.IO.Directory.Exists(HttpContext.Current.Server.MapPath(dir))) System.IO.Directory.CreateDirectory(HttpContext.Current.Server.MapPath(dir));
public override System.Web.UI.WebControls.WebControl Editor { get { fu = new Umbraco.Forms.Core.Controls.Fileupload(); fu.ID = "fu" + this.Id;
if (_value.Count() > 0) fu.FileName = _value[0].ToString();
return fu; } set { base.Editor = value; } }
public override string RenderPreview() { return "<input type='file'/>"; }
public override string RenderPreviewWithPrevalues(List<object> prevalues) { return RenderPreview(); }
public override List<object> ProcessValue(HttpContextBase httpContext) { List<Object> vals = new List<object>();
//files bool filesaved = false;
var files = httpContext.Request.Files; if (files.Count > 0 && files.AllKeys.Contains(this.AssociatedField.Id.ToString())) { HttpPostedFileBase file = null; file = files[this.AssociatedField.Id.ToString()]; if (file.ContentLength > 0) { string dir = Configuration.Path + "/files/" + Guid.NewGuid().ToString() + "/"; if (!System.IO.Directory.Exists(httpContext.Server.MapPath(dir))) System.IO.Directory.CreateDirectory(httpContext.Server.MapPath(dir)); file.SaveAs(httpContext.Server.MapPath(dir + file.FileName)); vals.Add(dir + file.FileName); filesaved = true; }
}
if (!filesaved) { vals.Add(httpContext.Request[this.AssociatedField.Id.ToString() + "_file"] ?? ""); }
return vals; } } }
Instead of Core.Controls.Fileupload fu you would have to refer to a control class you yourself created.
a control class might look like this (though this is just an alternative textbox control class that I created, one that has maxLength implemented. In the same way you could create a FileUpload class.
using System; using System.Web.UI; using System.Web.UI.WebControls;
namespace Contour.Addons.Controls { public class TextBoxAdvanced : TextBox { public string iMaxLength { get; set; } public override void RenderControl(HtmlTextWriter writer) {
Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute from assembly mscorlib....
Hi Guys.
I've recently went through a longer line of upgrades to get an old site up to date. I also updated contour to latest version.
However, the site throws an error when it tries to render forms on the frontend:
Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
I googled around and found out that the attribute was moved from System.Core.dll to mscorlib.dll in .NET 4.5..
But does Contour now require that I install .net 4.5 on my server/hotel?
OR could something else be messing this up for me?
Hope for a speedy resolvment, this is my last speedbump in the update row.
Thanx!
/Niels
Still pondering and wondering ..
Now it turns out that its actually running fine on my local machine, but once I push the website to my dev server it doesn't..
I know that the licens is valid to localhost also, so running boths sites as localhost, but still same. Not working on dev server, working fine locally.. Very strange indeed.
I'm beginning to suspect some kind of server misconfig..
Comment author was deleted
Hey Niels,
No Contour should run fine on asp.net 4 might be that mvc 4 isn't installed
Can you tell me the Umbraco version you are running?
Hi Tim
I'm running Umbraco 6.1.1
Its quite possible that MVC 4 isn't installed on my dev box.. I'll look into that :)
Cheers,
Niels
Comment author was deleted
Ok but then Umbraco should also be having issues (are you using mvc as the render engine or webforms ?)
I'm using good oldfasioned webforms :) And Umbraco is running fine in every other respect..
Wierd thing is that it runs ok locally, so I thing there's some misconfiguration on the server..
But I'm installing MVC 4 now, so fingers crossed.
So far no luck..
Here's a little stack-trace if that gives you any further hints?
Comment author was deleted
Yeah not sure doesn't seem to be from something contour or umbraco specific
Hey
got nearly the same error when trying to install Contour under Umbraco 6.1.2.2
Comment author was deleted
Hmm can't reproduce, @david is this also on a specific machine?
This gets stranger.
I moved the site to the test-server. Now, on the test-server I get the same error ONCE on the login, but it dissapeared on refresh. Then the same error happened in the content-tree when I tried to open a node... But only ONCE. Then I can open everything...
I haven't setup permissions on all the folders needed yet, only on web.config at app_data.. (I was just iin the middle of doing the folder permissions through plesk desktop since I don't have server access)..
This leeds me to the idea that maybe this is permission-related? I'm going to do some more setup and testing on the test-site and try to illiminate this error and figure out what causes it..
And once more on the "publish entire site" dialogue.. out of the blue, since It worked just minutes ago..
Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Source Error:
Line 28: Line 29: <form id="form1" runat="server"> Line 30: <asp:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" runat="server"></asp:ScriptManager> Line 31: <asp:ContentPlaceHolder ID="body" runat="server"> Line 32: </asp:ContentPlaceHolder>
More info, this time from when it popped up in the "Create New" dialogue in the content-tree..(domain-name removed for client-protection...)
Sorry for spamming.. Heres a bit of an update.
My pages with forms on the test-server also throws this error.. dammit. So no error locally, but on both my available servers I get this error..
Hmm.. Maybe the fact that I build the site on a machine that HAS .net 4.5 makes the difference..
Reading material on that kind of thing: http://marcgravell.blogspot.co.nz/2012/09/iterator-blocks-missing-methods-and-net.html
Comment author was deleted
Keep up the spamming would like to know what is causing it :)
@Tim, it's on my local machine. So no server or anything involved yet.
Comment author was deleted
Ok and is the .net 4.5 framework installed? on the machines having the issue
Comment author was deleted
Hmm might be an issue on our build server, will take a look
Comment author was deleted
Any chance you guys can try to install the previous version of Contour and see if it also happens with that one (3.0.12)
You can get it here http://nightly.umbraco.org/Umbraco%20Contour/3.0.12/
Comment author was deleted
Hmm it isn't the build server, thought it might have been this but it isn't http://marcgravell.blogspot.co.nz/2012/09/iterator-blocks-missing-methods-and-net.html (since the reference assembies are available)
Comment author was deleted
So if someone could try the previous Contour release that would be really helpfull :) You can get it here http://nightly.umbraco.org/Umbraco%20Contour/3.0.12/
Comment author was deleted
Hmm or maybe those reference assemblies are missing on the machines having the issue
Do you have the following folder available
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0 ?
Yeah, that was the next thing I was going to try.. I'll give it a go and see if it works ok.. Hopefully that will solve it.
I'll give it a go and let you know.
Comment author was deleted
@Niels could you first try to install Contour 3.0.12, please :) think I found the code change that might be causing it
Comment author was deleted
And if that version works on your machine I can fix it from my end :)
Ok, I'll do that.. When you say install, is it then ok if I just overwrite the umbraco dll's and other files?
If you found the change and I can fix my site I OWE you beer!
Comment author was deleted
Yeah you can just downgrade following the same instructions
http://our.umbraco.org/projects/umbraco-pro/contour/documentation/Installation/Upgrade
ANd you'll need the update archive
http://nightly.umbraco.org/Umbraco%20Contour/3.0.12/UmbracoContour_3.0.12_update.zip
Comment author was deleted
Fingers crossed :)
PURE GENIUS, IT WORKS!!!
I owe you beer! Big time!! #H5YR!
Comment author was deleted
So 3.0.12 works, ok thanks for confirming, I'll do a new release today 3.0.14 (removing the code change that is acting up)
Comment author was deleted
3.0.14 release is on it's way :)
Comment author was deleted
OK 3.0.14 is out would be great if you could also test that version :) http://nightly.umbraco.org/Umbraco%20Contour/3.0.14/
Comment author was deleted
It's out http://our.umbraco.org/forum/umbraco-pro/contour/43082-Contour-3014-changes
I'm afraid that I still get the same YSOD after upgrade to 3.0.14..
As these links suggests, I think this *may* happen sometimes when code is compiled on a machine that has .net 4.5, even though the project explicitly uses 4.0.. Give it a read if you havent allready:
http://www.mattwrock.com/post/2012/02/29/What-you-should-know-about-running-ILMerge-on-Net-45-Beta-assemblies-targeting-Net-40.aspx
http://stackoverflow.com/questions/13748055/could-not-load-type-system-runtime-compilerservices-extensionattribute-from-as
https://connect.microsoft.com/VisualStudio/feedback/details/726702/moving-system-runtime-compilerservices-extensionattribute-to-mscorlib-breaks-structuremap-scans-of-namespaces-containing-extensionmethods-and-possibly-other-ioc-scenarios
For now I'll just put 3.0.12 on the site and be happy...
Heres a stacktrace from v. 3.0.14
[TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.] System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) +0 System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) +525 System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) +19 System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) +315 System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg) +208 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +1171 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) +146 System.Web.UI.AssemblyCache.GetAjaxFrameworkAssemblyAttribute(Assembly assembly) +103 System.Web.UI.ScriptManager.get_DefaultAjaxFrameworkAssembly() +592 System.Web.UI.ScriptManager..ctor() +30 Umbraco.Forms.UI.Usercontrols.RenderForm.OnInit(EventArgs e) +256 System.Web.UI.Control.InitRecursive(Control namingContainer) +133 System.Web.UI.Control.AddedControl(Control control, Int32 index) +277 umbraco.presentation.templateControls.Macro.CreateChildControls() +1844 System.Web.UI.Control.EnsureChildControls() +182 System.Web.UI.Control.InitRecursive(Control namingContainer) +133 System.Web.UI.Control.AddedControl(Control control, Int32 index) +277 umbraco.presentation.templateControls.<>c__DisplayClass6.<ParseMacros>b__2(String macroAlias, Dictionary`2 attributes) +516 Umbraco.Core.Macros.MacroTagParser.ParseMacros(String text, Action`1 textFoundCallback, Action`2 macroFoundCallback) +819 umbraco.presentation.templateControls.ItemRenderer.ParseMacros(Item item) +225 umbraco.presentation.templateControls.ItemRenderer.Load(Item item) +170 umbraco.presentation.templateControls.Item.OnLoad(EventArgs e) +33 System.Web.UI.Control.LoadRecursive() +71 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064
As you asked previously, just to clarify; This happens on machines that doesn't have ,net 4.5 framework, my local machine that does is fine..
I say, blame this one on Microsoft ;)
Comment author was deleted
Dammit well I'm just removing one more thing but then I'm out of ideas :)
Comment author was deleted
Ok can I ask you one final thing, try this version (it's newer than the latest) http://nightly.umbraco.org/Umbraco%20Contour/3.0.14/
And let me know if it still happens with that one
Im getting the same issue as the OP with umbraco v4.11.
So install 3.0.12 instead? Are there any features that would be missing or is the differnce in versions just big fixes?
Ric
Comment author was deleted
Hey Ric,
Could you try this version http://nightly.umbraco.org/Umbraco%20Contour/3.0.14/
Hi Tim,
Its hit the same runtime error, im afraid.
Comment author was deleted
Hey Ric the one on the build server is newer (just out a couple of minutes) is that the one you tried?
Sure, I'll give the newer v. 3.0.14 a spinn :) *fingers crossed*
I downloaded and then install local package: http://nightly.umbraco.org/Umbraco Contour/3.0.14/UmbracoContour_3.0.14.zip
Same error on a fresh upgrade zip from nightly, I'm afraid :/
Happy to help, Tim, I'll test anything you want :)
/Niels
Comment author was deleted
ok thanks for confirming guys
Comment author was deleted
Yeah stick to 3.0.12 then for the time being, will update when I find out more
Comment author was deleted
Ok seems to be due to installing .net framework 4.5 on our build server, trying to fix it now
Yep, I think that must be it, as the links I posted also suggests this..
Wouldn't this possibly concern a bunch of other packages that gets built on the build-server then?
I hope you nail it like a BOSS and I STILL owe you beer :)
/Niels
Comment author was deleted
Ok can I bother you guys to do 1 more test
http://nightly.umbraco.org/Umbraco%20Contour/3.0.14/
and let me know if this one works?
Thanks for al the help :)
Confirmed kill!
I updated on my box that doesn't have .net 4.5 installed and whoila! It works, the error is gone!
Thanx!
Comment author was deleted
Woot, thanks again for the help :)
That installed for me fine, Nice one Tim.
Comment author was deleted
Great thanks for confirming @Ric :)
Hi Tim,
Was this issue to do with ILMerge and .net 4.5? I Think we have a similar issue with Workflow.
Comment author was deleted
@Darren, nope our build server was targetting .net 4.5 after that was installed on in, nothing to do with ILMerge in our case
I'm still getting this error on a fresh Umbraco 6.1.6 install with Contour 3.0.18, on a server that only has .NET 4.0 (and no trace of 4.5).
I have installed 3.0.12 which works, but can't the problem be fixed in 3.0.18 as well? Is the build still targeting 4.5 to be compatible with Umbraco 7, and thus breaking compatibility with Umbraco 6?
Comment author was deleted
Hmm 3.0.18 might be different since that has a 4.5 project in there, if it's on umbraco v6 try removing the v7 providers assembly and see if that fixes it
Ok so Im having the same problem on 6.1.6.
I had to uninstall the 3.0.18 and install the 3.0.12.
Any idea?
Thanks
Moshe
I get the same error on umbraco 6.1.6 and contour 3.0.18.
Comment author was deleted
Yeah due to not having .net framework 4.5 so consider upgrading or remove the v7 assembly
Just found this post...I'm running into the same problem with countour 3.0.18. Please CHANGE the 4.5 project to 4.0 or change it on the download page: http://our.umbraco.org/projects/umbraco-pro/contour. For 3.0.18 it says it works with .NET 4.0 and it does not, please change it to 4.5 so people know what they are getting into. I've got a big mess on my hands now because of this :(
The problem is actually not umbraco, but the .NET 4.5 framework. If you build a 4.0 project on a machine with 4.5 installed and them move that build to a server that does NOT have 4.5 installed > it will (depending on the resources used) crash. This is due to a change in 4.5. Some items were moved from System.Core.dll in 4.0 to mscorlib.dll in .NET 4.5 (one of them is System.Runtime.CompilerServices.ExtensionAttribute) which causes these problems...
EDIT:
Removing the v7 (and v6) core dll's makes no diffrence.
Same problem here guys. Contour 3.0.19 and umbraco 6.1.6
I can't upgrade the server, deleting the v7 dll's does not work.
What to do?
Tim, which version is best to downgrade to?
Martin
Just tried installing 3.0.19 (on Umbraco 6.1.6) hoping that this had been fixed, but no dice. Even though it is listed as working on 6.1.x and requiring .NET 4.0 here: http://our.umbraco.org/projects/umbraco-pro/contour.
Can we please get a recent version of this (paid!) product that works correctly on the latest 6.x on .NET 4.0?
This is kinda a problem if you've got a XP and can't upgrade to NET 4.5.
Peace out! Laurence
Hi all,
I'm trying using Contour for a project we're developing, to check if it's allright with our needs.
I've tried on Umbraco v6.1.2 (and v.6.2.1 on other machine) not having .net framework 4.5 installing Contour versions 3.0.21, 3.0.20, 3.0.19, 3.0.14 and all of them fails. And everytime I installed a version, I had to restore a previous backup, because uninstall doesn't work :''(
At last, it works with v.3.0.12...
Reading all this topic, and suffering this issue to get it installed, I can't believe that this paid product is listed as working with NET 4.0, and it's fails if you don't install an old version... If this does not fix, I think we will not acquire Contour.
Please, answer with a "real" solution. Thank's
Hi guys,
Any chance this will be fixed ?
It seems to be a matter of doing some tuning to ILMerge
http://www.hurryupandwait.io/blog/what-you-should-know-about-running-ilmerge-on-net-4-5-assemblies-targeting-net-4-0
http://stackoverflow.com/questions/13748055/could-not-load-type-system-runtime-compilerservices-extensionattribute-from-as#13750130
... or recompiling on a server without .NET 4.5 installed
We are unable to upgrade the server in the short term. In the meantime,
we would like to offer customers the best products available but it is
hard to explain to them why the package fails in 4.0 when the spec
says otherwise.
Best regards,
P.S:
This problem has been reported multiple times here, here and here.
Furthermore, issue CON-159 3.0 fails on install (need .net 4.5?)
was marked as "fixed" due in v.3.0.1 but it reappeared in v.3.0.13 up to v.3.0.25
HI - I am having this issue as well, still with Umbraco v6.2.5 and Umbraco Contour version 3.0.26. Using the latest version of Contour to fix other issues (specifically file upload in IE)
I get the ysod when attempting to access Umbraco only (not on the content). Usually only the first time after hours/ next day of not being in the UI. Generally a page reload will make the error go away. Sometimes that doesn't work and need to restart the app by touching the web.config.
I tried to build on a server with only 4.0 and get the error still.
The v7 dlls are not in the bin folder.
full error (just happened after probably session timeout)
Server Error in '/' Application.
Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Source Error:
Line 38: <body id="umbracoMainPageBody"> Line 39: <form id="Form1" method="post" runat="server" style="margin: 0px; padding: 0px"> Line 40: <asp:ScriptManager runat="server" ID="umbracoScriptManager" ScriptMode="Release"> Line 41: <CompositeScript ScriptMode="Release"> Line 42: <Scripts>
Source File: e:\Web\Umbraco-WholeHealthRx\Umbraco\umbraco.aspx Line: 40
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1031
Hi Karen,
It's a bit of a long read this topic. But this is the gist of it: This error cannot be helped by not uploading the Umb 7 contour dll's.
The point is the entire contour project has been compiled on a server running .net 4.5. in .net 4.5 some namespaces have moved to different places, including a few in mscorlib. You'll probably keep getting this error now and then when the application restarts.
To circumvent the error you'll either have to downgrade contour to 3.0.17 (which is last version that doesn't have this problem) or you will have to switch to a .net 4.5 server.
Good luck!
Martin
HI Martin,
Is there any chance to have a version of Contour that is compiled on .net 4 ?
I cannot upgrade the server to 4.5, that is completely out of my control, and in a large company, such things take forever.
I cannot downgrade to Contour 3.0.17 because I need the fix that is in place to allow file uploads to work correctly when using IE (which I believe is in latest contour version).
Thanks,
Karen
Hi Karen,
Some of us in this topic asked the umbraco HQ to do that for us, but unfortunately they never did. Maybe it's impossible for them to do, as the projects are probably mixed together, and the v7 version cannot be compiled against 4.5.
Anyway, there is no version that I know of that you can use.
You can maybe try a way around. Revert to 3.0.17 and create your own Control/FieldType for contour. It's not that hard to do.
For example, the code below is the standard FileUpload FieldType (don't know from which contour version, probably an older one) that receives the posted file and saves it. If you create your own control file (which works on IE) and refer to that instead of Core.Fileupload all you need to do is include the two files in an assembly and you're good to go.
FileUpload Type:
Instead of Core.Controls.Fileupload fu you would have to refer to a control class you yourself created.
a control class might look like this (though this is just an alternative textbox control class that I created, one that has maxLength implemented. In the same way you could create a FileUpload class.
Hi Karen,
Some of us in this topic asked the umbraco HQ to do that for us, but unfortunately they never did. Maybe it's impossible for them to do, as the projects are probably mixed together, and the v7 version cannot be compiled against 4.5.
Anyway, there is no version that I know of that you can use.
You can maybe try a way around. Revert to 3.0.17 and create your own FileUpload Control/FieldType for contour. It's not that hard to do.
For example, the code below is the standard FileUpload FieldType (don't know from which contour version, probably an older one) that receives the posted file and saves it. If you create your own control file (which works on IE) and refer to that instead of Core.Fileupload all you need to do is include the two files in an assembly and you're good to go.
FileUpload Type:
Instead of Core.Controls.Fileupload fu you would have to refer to a control class you yourself created.
a control class might look like this (though this is just an alternative textbox control class that I created, one that has maxLength implemented. In the same way you could create a FileUpload class.
HI Martin,
Thanks for the help - I will try that - creating a new field type for Contour was next on my list of things to do/learn (when I get the time).
I really appreciate your help!
Thanks!
Karen
is working on a reply...