when i used Omu.AwesomeMvc include in the project at that time i face the error? - asp.net-mvc-awesome

Assembly 'Omu.AwesomeMvc, Version=4.7.3.1, Culture=neutral, PublicKeyToken=9c6fbba722ea1caf' uses 'System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' d:\MVC Projects\Shipping Management System\trunk\RefDll\Omu.AwesomeMvc.dll SMS.Controls

it looks like you're building an asp.net mvc 4 project, but you've referenced the mvc 5 version of the library, you need to reference the mvc 4 version of Omu.AwesomeMvc or build/upgrade your project to mvc5

Related

Could not load file or assembly 'System.Web.Http, Version=5.0.0.0 after installing core

After installing ASP.NET web API 2.2 core I'm getting this problem. I'm using visual Studio 2013. I've seen a similar problem in stack but as my problem I can't solve it. If there is any way to solve it please let know.
Could not load file or assembly 'System.Web.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Screenshot here.

Upgrading VS2010 to 2013 introduced compile error with SendGrid

I installed the ultimate trial of Visual Studio 2013 yesterday to see if it had any negative impact on our current 2010 based projects. When trying to compile a project that previously had no problems and still compiles on my colleagues computers I encountered this error:
The type or namespace name 'SendGridMail' could not be found (are you missing a using directive or an assembly reference?)
The error is the same when run from Visual Studio 2010 or 2013
Looking at similar questions on here suggests that this happens when using the .net 4 Client Profile instead of standard .net 4, but this project has always used standard .net 4.
Another question was using the latest version of sendgrid (4.x) with .net 4 which I understand doesn't work, but we are using an older version (1.2.1).
Personally I have tried:
Removing and Readding the reference (originally it was referenced inside the project, I also tried referencing it externally)
Running Visual Studio with no addons
Recreating the project in another solution
The only luck I have had so far has been to use nuget to install the sendgrid package instead but this seems to add a lot of additional files and at the moment I'm more interested in why a previously working build has stopped working with no changes to the project other than installing another version of Visual Studio.
Edit:
This is the output when trying to build with the SendGridMail dll (succeeds since it's not used in code):
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3268: The primary reference "SendGridMail, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the framework assembly "System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0". To resolve this problem, either remove the reference "SendGridMail, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL" or retarget your application to a framework version which contains "System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3268: The primary reference "SendGridMail, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the framework assembly "System.Threading.Tasks, Version=2.5.19.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0". To resolve this problem, either remove the reference "SendGridMail, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL" or retarget your application to a framework version which contains "System.Threading.Tasks, Version=2.5.19.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3268: The primary reference "SendGridMail, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime, Version=2.5.19.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0". To resolve this problem, either remove the reference "SendGridMail, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL" or retarget your application to a framework version which contains "System.Runtime, Version=2.5.19.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
I was able to resolve this by removing the .NET 4.5 SDK (but not the framework itself). I assume it was looking at the latest framework for the dlls despite the project being set to .NET 4

Strange error in using ErikEJ's SQL CE Membership provider

I've been trying to implement the wonderful SqlCe 4.0 Membership Provider by ErikEJ but I'm having trouble. I got it working via the documentation mr EJ provides. But....
I want to abstract the source into an external DAL. But I'm having issues getting there. The first problem I'm getting is trying to add the reference to SqlCe via the .csproj file rather than the web.config. (I need to do this so I can add the same reference in my DAL project) (I also need to be able to set copy local to true so want it in the csproj references). So I do this....
<assemblies>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<!--<add assembly="System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>-->
</assemblies>
And then add it in my project...
But when I browse to the website I get this error message:
Unable to load the native components of SQL Server Compact
corresponding to the ADO.NET provider of version 8482. Install the
correct version of SQL Server Compact. Refer to KB article 974247 for
more details.
When I refer to the KB article it says:
FIX: You receive an error message when you run a SQL Server Compact
3.5-based application after you install the 32-bit version of SQL Server Compact Edition 3.5 Service Pack 2 on an x64 computer
And yeah that's whats throwing me. Why is it talking about 3.5? I have added a reference to the 4.0 dll which Eric's provider is designed to work with.
I really hope someone can help. Perhaps Erik will read this post :-)
p.s. I'm also wondering what the difference between adding a reference in the web.config and adding it it via the csproj actually is. I thought it was because the web.config looks in the GAC. But when I try to add a reference in visual studio (to the csproj) i cant see the option to add System.Data.SqlServerCe at all!
I can also say that when I copy the dlls directly from
C:\Program Files\Microsoft SQL Server Compact Edition\v4.0\Private
Into my DAL bin and website bin and reference them directly in the CSproj I still get the same issue.
You are using the Private assembly version (4.0.0.1) - sounds like the required unmanaged DLL files are missing from your deployed site. Could you have a look in file explorer and show what you see.
Also, see this SO answer: Can't get sql server compact 3.5 / 4 to work with ASP .NET MVC 2

Having errors running JigLibX 0.3.1 on XNA 4.0

Warning 1:
The referenced assembly "Microsoft.Xna.Framework.Content.Pipeline,
Version=4.0.0.0,Culture=neutral, PublicKeyToken=842cf8be1de50553"
could not be resolved because it has a dependency on
"Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently
targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please
remove references to assemblies not in the targeted framework or
consider retargeting your project. JigLibX
Warning 2:
The referenced assembly "Microsoft.Xna.Framework.Content.Pipeline,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553"
could not be resolved because it has a dependency on
"Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently
targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please
remove references to assemblies not in the targeted framework or
consider retargeting your project. JigLibX
Error 3:
Error loading pipeline assembly "HeightmapProcessor, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null". JigLibGame
How can I solve this?
Your assembly (you didn't give details - is it an application? a game? a library? a content pipeline extension?) is depending on the XNA content pipeline assemblies, which themselves require the full .NET 4 framework -- currently you are targeting the .NET 4 Client Profile framework.
You need to do exactly what the exception says:
You could remove the assembly references to the content pipeline assemblies, if that is possible.
Or you could change the target framework. To do this, right click your project in the Solution Explorer, select Properties, on the Application tab find the Target framework drop-down and change from ".NET Framework 4 Client Profile" to ".NET Framework 4"
It is worth pointing out that the XNA content pipeline assemblies are not redistributable: you cannot include them with your game.

MSBUILD 4.0 Fails on AJAX Extensions

We have a .Net 2.0 web app and are converting the solution and projects to Visual Studio 2010 (they were Visual Studio 2005). We are leaving the project targeting Framework 2.0. The app includes Ajax extensions. We did the conversion and can build the project successfully on the server using Visual Studio. However, when we attempt to build the project through MSBUILD 4.0, we get errors on pages where ajax controls are used, such as the following:
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9):
warning MSB3267: The primary reference
"System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35,
processorArchitecture=MSIL", which is
a framework assembly, could not be
resolved in the currently targeted
framework.
".NETFramework,Version=v2.0". To
resolve this problem, either remove
the reference "System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35,
processorArchitecture=MSIL" or
retarget your application to a
framework version which contains
"System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35,
processorArchitecture=MSIL".
[C:\Inetpub\wwwroot\gmrcwebsite\GMRCWebsite.vbproj]
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9):
warning MSB3268: The primary reference
"System.Web.Extensions.Design,
Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35,
processorArchitecture=MSIL" could not
be resolved because it has an indirect
dependency on the framework assembly
"System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" which
could not be resolved in the currently
targeted framework.
".NETFramework,Version=v2.0". To
resolve this problem, either remove
the reference
"System.Web.Extensions.Design,
Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35,
processorArchitecture=MSIL" or
retarget your application to a
framework version which contains
"System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35".
[C:\Inetpub\wwwroot\gmrcwebsite\GMRCWebsite.vbproj]
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9):
warning MSB3268: The primary reference
"AjaxControlToolkit,
Version=1.0.10618.0, Culture=neutral,
PublicKeyToken=28f01b0e84b6d53e,
processorArchitecture=MSIL" could not
be resolved because it has an indirect
dependency on the framework assembly
"System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" which
could not be resolved in the currently
targeted framework.
".NETFramework,Version=v2.0". To
resolve this problem, either remove
the reference "AjaxControlToolkit,
Version=1.0.10618.0, Culture=neutral,
PublicKeyToken=28f01b0e84b6d53e,
processorArchitecture=MSIL" or
retarget your application to a
framework version which contains
"System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35".
[C:\Inetpub\wwwroot\gmrcwebsite\GMRCWebsite.vbproj]
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9):
warning MSB3267: The primary reference
"System.Web.Extensions.Design,
Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35,
processorArchitecture=MSIL", which is
a framework assembly, could not be
resolved in the currently targeted
framework.
".NETFramework,Version=v2.0". To
resolve this problem, either remove
the reference
"System.Web.Extensions.Design,
Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35,
processorArchitecture=MSIL" or
retarget your application to a
framework version which contains
"System.Web.Extensions.Design,
Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35,
processorArchitecture=MSIL".
[C:\Inetpub\wwwroot\gmrcwebsite\GMRCWebsite.vbproj]
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9):
warning MSB3268: The primary reference
"AjaxControlToolkit,
Version=1.0.10618.0, Culture=neutral,
PublicKeyToken=28f01b0e84b6d53e,
processorArchitecture=MSIL" could not
be resolved because it has an indirect
dependency on the framework assembly
"System.Web.Extensions.Design,
Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" which
could not be resolved in the currently
targeted framework.
".NETFramework,Version=v2.0". To
resolve this problem, either remove
the reference "AjaxControlToolkit,
Version=1.0.10618.0, Culture=neutral,
PublicKeyToken=28f01b0e84b6d53e,
processorArchitecture=MSIL" or
retarget your application to a
framework version which contains
"System.Web.Extensions.Design,
Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35".
[C:\Inetpub\wwwroot\gmrcwebsite\GMRCWebsite.vbproj]
...
error BC30451: 'ScriptManager' is not
declared. It may be inaccessible due
to its protection level. error
BC30002: Type
'System.Web.UI.ScriptManager' is not
defined. error BC30002: Type
'System.Web.UI.UpdatePanel' is not
defined. error BC30002: Type
'System.Web.UI.UpdateProgress' is not
defined.
This stuff worked fine before and builds and works fine when built through Visual Studio. What do we need to do to fix these errors?
I just had the same problem myself after configuring TFS Build service 2008 to use MSBuild 4.0. Everything worked before converting the projects, after then conversion to 2010 format and the switch to MSBuild 4 suddenly it couldn't find the 1.0.61025.0 AJAX libraries.
It turned out there was a registry key missing that pointed to the install location of MS Ajax extensions.
On my dev box the key that should be located at (64-bit OS)
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\ASP.NET AJAX Extensions
was instead placed in HKEY_CURRENT_USER. (32-bit OS: remove the Wow6432Node part)
On the build server the key was missing completely (none of the locally present user profiles had it in its registry hive).
The default value of this key should point to the MS Ajax Extensions installation directory, which in my case is
C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025
After recreating the key on the build server, our solution builds successfully under MSBuild 4.
It remains a mystery to me why it built successfully until now (under MSBuild 3.5). Perhaps the assembly search algorithm changed slightly and is now more restrictive.
Hope that helps.
Hello here you'll find the solution: http://www.developerit.com/2010/04/19/ms-ajax-libraries-and-configured-assemblies

Resources