I’m not sure if i’m doing this the right way so i’m reaching out for a little help...there are some new features in the trunk that I want to take advantage of in my current s#arp project.
I’ve downloaded the project from the trunk and run the go.bat file which succeeded, i then took the DLL files from the ‘build’ directory and overwritten the DLL files in my projects ‘lib’ folder.
My project compiled and ran fine until i get to a page which uses anything from Microsoft.Web.Mvc such as ActionLinkForAreas, I am getting this error:
Could not load file or assembly 'Microsoft.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
Here is the Stack Trace if it helps:
[FileLoadException: Could not load file or assembly 'Microsoft.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)]
SharpArch.Web.Areas.LinkForAreasExtensions.GetQueryStringArguments(HtmlHelper helper, Expression1 action, String linkText, String controllerUrlName, String actionName) in c:\dev\svn\sharp-jul16\codai-Sharp-Architecture-4d55899\src\SharpArch\SharpArch.Web\Areas\LinkForAreasExtensions.cs:76
SharpArch.Web.Areas.LinkForAreasExtensions.ActionLinkForAreas(HtmlHelper helper, Expression
1 action, String linkText) in c:\dev\svn\sharp-jul16\codai-Sharp-Architecture-4d55899\src\SharpArch\SharpArch.Web\Areas\LinkForAreasExtensions.cs:29
SharpArch.Web.Areas.LinkForAreasExtensions.BuildUrlFromExpressionForAreas(HtmlHelper helper, Expression`1 action) in c:\dev\svn\sharp-jul16\codai-Sharp-Architecture-4d55899\src\SharpArch\SharpArch.Web\Areas\LinkForAreasExtensions.cs:48
ASP.views_profile_index_aspx.__RenderContent1(HtmlTextWriter __w, Control parameterContainer) in c:\dev\HM\app\HM.Web\Views\Profile\Index.aspx:28
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +131
ASP.views_shared_profile_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\dev\HM\app\HM.Web\Views\Shared\Profile.Master:98
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +131
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +85
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5274
Thank you. Paul
Paul, please grab the latest of the master branch. I just made a change tot he SharpArch.Build that will solve the issue for you and others. The solution: comment out line 182. This is the argument that sets the key file for the ILMerge process.
If someone needs to have the assemblies strong named, and is not using Areas, then you can uncomment that line and all will be well.
User contributions licensed under CC BY-SA 3.0