Telerik MVC Extensions deployment problem - asp.net-mvc-2

I am writing a website which uses Telerik MVC Extensions, and am getting an error on my test server when I get no such error on my development PC.
The error is ...
Web.config(101): error CS0246: The type
or namespace name 'Telerik' could not
be found (are you missing a using
directive or an assembly reference?)
Here is the relevant line from the web.config file ...
<add namespace="Telerik.Web.Mvc.UI"/>
I have checked the bin folder on my test server and it does contain the Telerik.Web.Mvc.dll file. The test server is 2008R2.
Have I missed something really obvious here?

Do you have multiple applications in your website? In other words, do you have multiple web.config and bin folders?

Related

EF suddenly cannot be found

While working on my MVC 5 project, the main db reference seems to have been broken.
CS0246 The type or namespace 'IntranetEntities' could not be found
(are you missing a using directive or assembly reference?)
When I am in the Model.edmx, it will link to the SQL server and update.
What would cause my "IntranetEntities" db reference to be broken?
How can I re-establish it?

asp.net MVC 4 deploy on azure Could not load file or assembly 'DotNetOpenAuth.Core'

Hello I am trying to deploy asp.net MVC 4 project on azure
but I get this problem. I searched a lot about the solution but it looks like none
suit my case, this is the Error message I get :
Could not load file or assembly 'DotNetOpenAuth.Core, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=2780ccd10d57b246' or one of its
dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)
Before the dotnetopenAuth have no reference in my project I downloaded
but still get the same error .
Anyone have an idea?
I know this is old, but I came across a similar problem and this question popped up as the closest case. This was my issue:
http://developers.de/blogs/damir_dobric/archive/2013/09/26/windows-azure-websites-error-could-not-load-file-or-assembly-dotnetopenauth-core.aspx
Being, a previous MVC project had been deployed, which contained these references. I deleted them by downloading the publish profile, and, with the "Remove additional files at destination" option checked, I published to Azure.
While publishing, you can select "Remove additional files at destination" and then publish again.
I ran into this issue with continuous deploy between visual studio online and azure.
I modified my build file and changed the "Do Not Delete" setting under "Deployment" in the "Process" Tab to False.
Good to go.
This is a case of version mismatch. The error itself says that manifest definition does not match.
Look carefully at the version of the referenced assembly and the version shown in error message.
In case you are not using openauth you can remove it's reference all together.

Building Autofac from sources

How to build Autofac from sources? I found only one deprecated wiki page.
I've tried to launch go.cmd (.NET Framework 4.0), but it failed with errors:
C:\Autofac\Autofac.csproj" (default target) (4) ->
(CoreCompile target) ->
Builder\MetadataConfiguration.cs(28,14): error CS0234: The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)
[C:\Autofac\Core\Source\Autofac\Autofac.csproj] Features\LazyDependencies\LazyWithMetadataRegistrationSource.cs(28,14): error CS0234: The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)
What I am doing wrong?
Autofac 3.0 has been updated so the core Autofac.dll is a Portable Class Library that targets multiple platforms. Portable Class Libraries don't have references to System assemblies so the missing System.Core reference is correct - it shouldn't be there. You should be able to use the Portable Class Library with .NET 4... or with Windows Store or Windows Phone 8 apps. I strongly recommend not modifying the references for the .csproj. You'll break that compatibility and inadvertently change the target profiles.
The wiki page on building from source has been deprecated because the instructions for building are in a readme right in the root of the source code. (That's mentioned on that deprecated wiki page - first line.) It explains all the prerequisite tools and commands required. If you follow the information in there, you should not have to modify anything to get the source to build.
If you aren't modifying the sources, I'm not sure why you'd need to rebuild the source to target .NET 4 specifically. It should just work. If you see something that isn't working, please file an issue about it on the Autofac site.
If you are modifying the source, the readme in there should get you building without messing with the project references.
It looks like the Autofac.csproj does not include a reference to system.core. See also this question and this bugreport. So can you try to add this to the Autofac.csproj file:
<ItemGroup>
<Reference Include="System.Core" />
</ItemGroup>
Possibly you also have to add other references, such as System.

Webconfig error with the site online

I'm trying to publish a web site.
The publication works perfectly, but when I try to access the address it returns me the following error:
Parser Error Message: Could not load
file or assembly
'Microsoft.Web.Helpers' or one of its
dependencies. This assembly is built
by a runtime newer than the currently
loaded runtime and cannot be loaded.
Source Error:
Line 293:
Line 294:
Line 295: Line 296:
Line
297:
Source File:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config
Line: 295
Assembly Load Trace: The following
information can be helpful to
determine why the assembly
'Microsoft.Web.Helpers' could not be
loaded.
WRN: Assembly binding logging is
turned OFF. To enable assembly bind
failure logging, set the registry
value
[HKLM\Software\Microsoft\Fusion!EnableLog]
(DWORD) to 1. Note: There is some
performance penalty associated with
assembly bind failure logging. To turn
this feature off, remove the registry
value
[HKLM\Software\Microsoft\Fusion!EnableLog].
This does not happen when I'm running on the local site.
The application was developed and Sql Server WebMatrix Compac 4
If you read the error message it says "Could not load file or assembly 'Microsoft.Web.Helpers' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded." If you then look at the version of the ASP.NET that this site is attempting to run under, it is ASP.NET Version:2.0.50727.4209.
Web Pages and the Web Helpers library need Version 4.0. Make sure the site targets the correct version of ASP.NET.
For missing assemblies a simple solution is to just bundle them with your project.
Go to your project -> references -> find this microsoft web helpers ref -> open the properties panel and set Copy Local to True
Edit: Also try setting assembly binding logging.
I suspect that your web.config is fine and that there is an assembly missing from your deployment.
You probably have to include microsoft.web.helpers in your deployment package or simply copy it to the bin folder.
You might find that there are other assemblies missing but you should be able to pick them off one by one.
There is a previous question Hosting WebMatrix Page
that lists all of the dlls you have to deploy and also suggests using Webdeploy

Error compiling pre-generated view in VS 2008

I am created pre-generated views for my EDMX using VS 2008, .NET 3.5 and Entity framework.
I have generated using the t4 templates mentioned here and got my mymodel.views.cs file. It's around 40 mb is size.
Added the views.cs file to my web application and my web service. When i build the apps, the webservice would build without any error and i can get the WS to work. But, the build fails in the website with the error
error CS0234: The type or namespace
name 'Mapping' does not exist in the
namespace 'System.Data' (are you
missing an assembly reference?)
The System.Data assembly is referenced in both the projects and the version denotes .NET 2.0. Suspect something trivial i am missing here, but still clueless.
Any pointers would help!
Add a reference to System.Data.Entity.dll, which contains the System.Data.Mapping namespace.