When I want to use button to write code in C# it doesn't go to the ".cs" file to write C# code. When I check the project source, I found this error:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
Severity Code Description Project File Line Error CS0234 The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?) Golestani C:\Users\javad\Documents\Golestani\Login.aspx.cs 3
I had an issue with System.Linq not being recognized. The way I solved it was to change the targeted framework of my website from 4.0 to to 3.5 and then switch back to the original targeted framework (in my case 4.0)
Hope this helps
Try to Unload and then reload the concerned project. That will do it.
Put this piece of code in the Configuration file (Web.config) and test it.
<compilation debug="false">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With