Unable to Resolve References to Contour Assemblies
When I compile, I get the error "The type or namespace name 'Forms' does not exist in the namespace 'Umbraco' (are you missing an assembly reference?)". The offending line of code is (I am trying a code first approach to creating Contour forms):
Yes, I have a reference to Umbraco.Forms.CodeFirst, Umbraco.Forms.Core, and Umbraco.Core.Providers. And Visual Studio intellisense showed me that the class "FormBase" is in the namespace "CodeFirst".
The problem seems to be related to the fact that, even though I have referenced the Contour assemblies, the references cannot be resolved, as indicated by this compile warning:
The primary reference "Umbraco.Forms.CodeFirst, Version=3.0.15.0, Culture=neutral, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the framework assembly "System.Web.Extensions, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.5". To resolve this problem, either remove the reference "Umbraco.Forms.CodeFirst, Version=3.0.15.0, Culture=neutral, processorArchitecture=MSIL" or retarget your application to a framework version which contains "System.Web.Extensions, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35".
There are a total of 6 warnings, each of which look very similar to this one. I added emphasis above to point out what the main problem seems to be (i.e., something is referencing System.Web.Extensions 1.1.0.0). Note that I have binding redirects in my web.config for the old versions of this and the related assemblies:
I tried to use dotPeek to find out where the assembly reference was coming from, but dotPeek seems to have a bug that made inspecting the reference hierarchy impossible (infinite hang). I also set MSBuild project build output verbosity to detailed, and it didn't provide any useful information.
I am using Umbraco 6.1.3 in an MVC4 project targeted against the .Net Framework 4.5. I installed Contour 3.0.14.0 from the repository in Umbraco, then noticed a new version, so I downloaded the upgrade package for Contour 3.0.15.0 and updated the DLL's in my project (note that I have experienced the same error/warnings before and after this Contour upgrade).
Any ideas to help troubleshoot this would be much appreciated.
I'm still looking into this myself. The only thing that sticks out to me so far is that Umbraco.Licensing has references to the 2.0 versions of mscorlib, System, System.Web, System.Web.Services, and System.Xml. It also has a reference to the 3.5 version of System.Core.
I may have found the problem. Umbraco.Forms.References has references to version 1.0.61025.0 of System.Web.Extensions and System.Web.Extensions.Design. Though, I'm not sure why my binding redirects wouldn't work for that. And I'm not sure how to fix it.
I got it working (the compile errors are gone, anyway... I will have to work on some runtime issues later). Not sure exactly what I did that got it working, but here are the steps I took:
Modified the "oldVersion" attribute of the bindingRedirect to go all the way up to 4.0.0.0 rather than just to 1.1.0.0.
Added xmlns to the dependentAssembly tags rather than just the assemblyBinding tag.
Unable to Resolve References to Contour Assemblies
When I compile, I get the error "The type or namespace name 'Forms' does not exist in the namespace 'Umbraco' (are you missing an assembly reference?)". The offending line of code is (I am trying a code first approach to creating Contour forms):
Yes, I have a reference to Umbraco.Forms.CodeFirst, Umbraco.Forms.Core, and Umbraco.Core.Providers. And Visual Studio intellisense showed me that the class "FormBase" is in the namespace "CodeFirst".
The problem seems to be related to the fact that, even though I have referenced the Contour assemblies, the references cannot be resolved, as indicated by this compile warning:
There are a total of 6 warnings, each of which look very similar to this one. I added emphasis above to point out what the main problem seems to be (i.e., something is referencing System.Web.Extensions 1.1.0.0). Note that I have binding redirects in my web.config for the old versions of this and the related assemblies:
I tried to use dotPeek to find out where the assembly reference was coming from, but dotPeek seems to have a bug that made inspecting the reference hierarchy impossible (infinite hang). I also set MSBuild project build output verbosity to detailed, and it didn't provide any useful information.
I am using Umbraco 6.1.3 in an MVC4 project targeted against the .Net Framework 4.5. I installed Contour 3.0.14.0 from the repository in Umbraco, then noticed a new version, so I downloaded the upgrade package for Contour 3.0.15.0 and updated the DLL's in my project (note that I have experienced the same error/warnings before and after this Contour upgrade).
Any ideas to help troubleshoot this would be much appreciated.
Comment author was deleted
Will see what I can do about that, just looking at the project it's targeted at .net framework 4
I'm still looking into this myself. The only thing that sticks out to me so far is that Umbraco.Licensing has references to the 2.0 versions of mscorlib, System, System.Web, System.Web.Services, and System.Xml. It also has a reference to the 3.5 version of System.Core.
I may have found the problem. Umbraco.Forms.References has references to version 1.0.61025.0 of System.Web.Extensions and System.Web.Extensions.Design. Though, I'm not sure why my binding redirects wouldn't work for that. And I'm not sure how to fix it.
Comment author was deleted
Hmm that's strange never seen that issue before, binding redirect should do the trick , references is basicly an ilmerge of some third party stuff
I got it working (the compile errors are gone, anyway... I will have to work on some runtime issues later). Not sure exactly what I did that got it working, but here are the steps I took:
Here are what my binding redirects look like now:
is working on a reply...