I have an error when I load Visual Studio 2012: "An exception has been encountered. This may be caused by an extension."
And here is the message from the xml file:
System.ComponentModel.Composition.CompositionException: The composition produced a single composition error, with 2 root causes.
The root causes are provided below.
Review the CompositionException.Errors property for more detailed information.
) The export Microsoft.VisualStudio.Shell.SVsServiceProvider is not assignable to type System.Boolean.
Resulting in: Cannot set import 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager.IsKnockoutEnabled (ContractName="Microsoft.VisualStudio.Shell.SVsServiceProvider")' on part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager.IsKnockoutEnabled (ContractName="Microsoft.VisualStudio.Shell.SVsServiceProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager
Resulting in: Cannot get export 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager")' from part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager
Resulting in: Cannot set import 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider.teBufferFeatureManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager")' on part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider.teBufferFeatureManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider
Resulting in: Cannot get export 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider")' from part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider
Resulting in: Cannot set import 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider")' on part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider
Resulting in: Cannot get export 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider")' from part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider
2) The export 'Microsoft.VisualStudio.Web.Extensions.HTML.TagNameProvider (ContractName="Microsoft.VisualStudio.Web.Extensions.HTML.ITagNameProvider")' is not assignable to type 'System.Collections.Generic.ISet`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]'.
Resulting in: Cannot set import 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider.SupportedTagNames (ContractName="Microsoft.VisualStudio.Web.Extensions.HTML.ITagNameProvider")' on part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider.SupportedTagNames (ContractName="Microsoft.VisualStudio.Web.Extensions.HTML.ITagNameProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet
Resulting in: Cannot get export 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider")' from part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet
Resulting in: Cannot set import 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.TagNameProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider")' on part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.TagNameProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider
Resulting in: Cannot get export 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider")' from part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider
at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(CatalogPart part, ExportDefinition export, Boolean isSharedPart)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()
at System.ComponentModel.Composition.Primitives.Export.get_Value()
at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export)
at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass4`2.<CreateStronglyTypedLazyOfTM>b__1()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)</description>
Does anybody know I can fix it?
Regards,
Benjamin
Cool, this is what worked for me, update the assemblies tag in the web.config file. During the load of the project the IDE is not able to load those assemblies. So here is my below...
<add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Services.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Related
I have inherited a web app which reports the following assembly conflict when I try to build it under Visual Studio 2013;
There was a conflict between "System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35".
"System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was chosen because it was primary and "System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was not.
References which depend on "System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" [C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies\System.Web.Mvc.dll].
C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies\System.Web.Mvc.dll
Project file item includes which caused reference "C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies\System.Web.Mvc.dll".
System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL
References which depend on "System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35" [].
C:\Users\Administrator\Source\Repos\eRTQ\Software\web\ThirdPartyDll\MIM.Framework.Unity.dll
Project file item includes which caused reference "C:\Users\Administrator\Source\Repos\eRTQ\Software\web\ThirdPartyDll\MIM.Framework.Unity.dll".
MIM.Framework.Unity, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL
MIM.Core.ServiceHosts, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL
C:\Users\Administrator\Source\Repos\eRTQ\Software\web\ThirdPartyDll\Microsoft.Web.Mvc.FixedDisplayModes.dll
Project file item includes which caused reference "C:\Users\Administrator\Source\Repos\eRTQ\Software\web\ThirdPartyDll\Microsoft.Web.Mvc.FixedDisplayModes.dll".
Microsoft.Web.Mvc.FixedDisplayModes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL
The Web.config contains this with respect to that assembly;
<compilation debug="true" targetFramework="4.5">
<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=4.0.0.1, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>
and
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.1"/>
</dependentAssembly>
I've tried removing and re-adding the assembly reference. That doesn't seem to change anything.
I can change the version in Web.config from '4.0.0.1' to '4.0.0.0', and that eliminates the warning, but is it the right thing to do?
Ideas?
I got error on my view page so I updated my visual studio to mvc4, though I am working on mvc3. I 1st updated using NuGet but it don't works so, I updated through standalone MVC4. so it worked. But when I tried to run MVC3 project it gives me following Error:
CS1705: Assembly 'MVC3Project, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' uses 'System.Web.Mvc, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher
version than referenced assembly 'System.Web.Mvc, Version=3.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35'
Can anyone help me with this?
Inside the web.config file in the Views folder there is the host element under system.web.webPages.razor
This should be as follows for an MVC3 project:
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
While for MVC4 it is:
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
You also need to check the pages element is as follows for MVC3
<pages
validateRequest="false"
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<controls>
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
</controls>
</pages>
and the sectionGroup element:
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
In the main web.config in the root directory of the project you need to make sure that the assemblies element is as follows:
<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" />
</assemblies>
There are more changes to make - best bet is to look at the web.config files for an MVC3 project and an MVC4 project and remove the stuff that shouldn't be there in yours.
I had the exact same problem with a later version of MVC. After I updated all my packages through Nugget, the problem is resolved.
The following worked for me
Install-Package Microsoft.AspNet.Web.Optimization
The worked solution for me i deleted the reference in project which gives error.
Reinstall that again with right click project -> add references --> search the name of Assembly then add that again.
for this question you have to delete System.Web.Mvc under first project references and click project -> add references --> Search System.Web.Mvc (you will see that is 4.0.0.0 now) install it.
you can download System.Web.Mvc.dll with version that you are looking for then :
Reference -> add ->browse and select ur file.
this solution worked for me !!
Good luck
Every time I download some open source or paid MVC3 app I get some assembly conflicts, ie: missing assemblies, wrong versions etc. So I figure I should ask a more general question:
In a typical project you have a folder called References and all assemblies seem to be in that folder, with their version numbers and Copy To Local options etc.
However out of the 10-20 references in that folder I often find just a few in the web.config.
I the latest case of this annoying mixup I have in web.config:
<compilation debug="false" targetFramework="4.0">
<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" />
</assemblies>
</compilation>
I get an error that project trying to load System.Web.Helpers, Version=1.0.0.0 - it's not found.
In the References folder the System.Web.Helpers referenced is version 2.0.0 and it's not possible to change this version number as it's greyed out. Changing to Specific Version doesn't change anything.
Question:
Why are there the 4 references in Web.config? Why not just the references folder?
Why do i often find a partial number of assembly tags in web.config instead of none or alternatively all the references seen under the References project folder?
Thanks,
Maybe try to re-install MVC3? Those references in the Web.config are ok, as they should be...
Here is my Web.config, in that part....
<add assembly="System.Web.Abstractions, Version=4.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.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
I am trying to host my website in godaddy its MVC3 .net website after copying deployed version in the server i get the following error:
CS0234: The type or namespace name 'Helpers' does not exist in the namespace 'System.Web'
Source Error:
Line 33: <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
Line 34: <namespaces>
Line 35: <add namespace="System.Web.Helpers"/>
Line 36: <add namespace="System.Web.Mvc"/>
Line 37: <add namespace="System.Web.Mvc.Ajax"/>
Any suggestions?
Make sure that the System.Web.Helpers assembly is registered in the <assemblies> section:
<compilation debug="true" targetFramework="4.0">
<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" />
</assemblies>
</compilation>
Also contact your hosting provider to ensure that he has ASP.NET MVC 3 installed and that those assemblies are available in the GAC. If this is not the case you may try to bin deploy your ASP.NET MVC 3 application.
I recently upgraded my solution from .net framework 3.5 to 4.0. All good except it gives me some errors in my website project.
The type or namespace name 'Linq' does not exist in the namespace 'System'
(are you missing an assembly reference?)
The type or namespace name 'Linq' does not exist in the namespace 'System.Xml'
(are you missing an assembly reference?)
The type or namespace name 'Script' does not exist in the namespace 'System.Web'
(are you missing an assembly reference?)
Here is what my web.config looks like:
<add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<!--vjslib is needed for Google Transit-related code-->
<add assembly="vjslib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Infragistics35.WebUI.Shared.v10.2, Version=10.2.20102.1011, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<add assembly="Infragistics35.WebUI.UltraWebGrid.v10.2, Version=10.2.20102.1011, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<add assembly="Infragistics35.WebUI.UltraWebTab.v10.2, Version=10.2.20102.1011, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB"/>
<add assembly="Infragistics35.Web.v10.2, Version=10.2.20102.1011, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB"/>
<add assembly="System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<add assembly="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Why is it not able to find LINQ reference when i say using System.Linq or System.Xml.Linq? What am i missing here?
--Edit--
This happens only in website project. Other class libraries work fine.
I have a ASP.NET 3.5 WebSite project which I've tried to upgrade to .NET v4. Got the error.
My solution:
Go to WebSite project property pages and set it back to . NET v3.5
Compile and see all is OK
Switch it back to .NET v4
Compile and see all is OK
Have you chose the right framework. I think in your project file on the first tab ".NET Framework 4 Client Profile" is chosen. Take ".NET Framework 4"