Last post Aug 15, 2016 02:03 PM by JEREMER
Jul 31, 2016 05:32 AM|JEREMER|LINK
Ok, I have a project that I have been using on my desktop and have tried to use the same project file on my laptop. For some reason though, when I open an ASPX.cs file, says that all of the variables, etc. "do not exist in this context". Can someone help?
Is there a way that I can fix my Visual Studio setup?
Jul 31, 2016 02:23 PM|mgebhard|LINK
The error usually means the code behind page cannot see the markup page.
Ok, I have a project that I have been using on my desktop and have tried to use the same project file on my laptop.
You copied the project from one system to another? What does "tried to use the same project file on my laptop" mean? Are you opening a single file as opposed to opening the solution/project?
Jul 31, 2016 11:43 PM|JEREMER|LINK
I know that the error means that the code-behind page cannot see the ASPX page, but how do I fix this? I am syncing files using Google Drive, so the file structure matches exactly.
I tried to start over completely and did the following:
1. Removed any solution files that I was using
2. Selected [Open -> Website] to open the site project folder
3. Closed and saved the new Solution (.SLN) file
For some reason though, this did not resolve my issue. The synced files still show no errors on my desktop PC, but every file (ASPX.cs) that I open on my laptop PC shows errors on pretty much every line. The files show that they are linked (ASPX and ASPX.cs)
in the Solution browser, but I still get errors saying "the name does not exist in the current context"
Why is this happening???
Aug 01, 2016 09:52 AM|mgebhard|LINK
Why is this happening???
This is a Google drive support question not ASP. Just copy the files to the laptop's hard drive..
Aug 01, 2016 03:23 PM|JEREMER|LINK
This is NOT a Google Drive issue, because I can copy the files to my hard drive and the problem still happens.
This appears to be something with Visual Studio Community 2015, or something specific to the VS project. At this point I have completely recreated the Solution file and created new ASPX web-form files on both desktop and laptop following the instructions that
I listed above, and the issue still occurs. For some reason the ASPX.cs file does not see the instances of hyperlinks, labels, etc. in the associated ASPX file.
Is there a setting in Visual Studio that I am missing?
Anyone, please help!
Aug 02, 2016 08:16 AM|Angie xu - MSFT|LINK
At this point I have completely recreated the Solution file and created new ASPX web-form files on both desktop and laptop following the instructions that I listed above, and the issue still occurs.
If this is Visual Studio issue, I'd like to suggest you to repair your VS, and check whether it can fix it.
1.In Control Panel, on the Programs and Features page, choose the product edition that you want to repair, and then choose Uninstall/Change.
2.In the Setup wizard, choose Repair, choose Next, and then follow the remaining instructions.
Aug 02, 2016 06:00 PM|JEREMER|LINK
Thank you for the thought. I will try this and see if it resolves the issue.
Aug 04, 2016 04:40 AM|JEREMER|LINK
Ok... I have installed, re-installed, repaired and reconfigured everything that I can think of to fix this. I am still getting errors on every line of code. I just tried reinstalling Visual Studio Community 2015 and the installer said that "there were some
errors" when installing. I have already tried repairing the install and that did nothing... Please... Help!!! What I am I doing wrong here? I should just be able to install the software and it should pick up libraries. Why am I getting errors on EVERY LINE,
saying "the name 'label' does not exist in the current context" ?????
Aug 04, 2016 12:20 PM|Angie xu - MSFT|LINK
If this issue is related to your project, you can try the following items:
1. Clean your solution and rebuild again,
2. Set all references Set the Copy Local flag for each of these assemblies to true [
Copy Local = True]
3. Check that the required component is installed on new machine or not, you can just install any new component through Nuget Manager in visual studio.
If this is VS issue, some components are crashed or other reasons, you could also consider uninstall VS via control panel, and check whether it can fix it.
Aug 04, 2016 03:09 PM|JEREMER|LINK
Thank you for the thought. I will try this and see if it works. Unfortunately though, I don't think the issue is with the Solution file though. I tried creating a completely new .NET "web" project (just as I have on my desktop) and it still gives me the same
issue. When I tried repairing and reinstalling VS, I received quite a few "errors during install", which I promptly researched last night. I found quite a few threads saying to "delete DLL files", "repair the VS install" and quite a few other options but nothing
has worked yet. I am GUESSING that this has something to do with it, because it appears that the auto-complete function does not work well either. When I start typing "<asp: ..." it does not give me any sort of "label", "hyperlink" or any other options for
built-in tools. I have to type them manually. There is just something odd with this install and it does not work correctly in quite a few ways.
If anyone has ANY other ideas, please let me know... any input would be appreciated.
Thanks -- Jereme
Aug 08, 2016 07:39 AM|Angie xu - MSFT|LINK
When I start typing "<asp: ..." it does not give me any sort of "label", "hyperlink" or any other options for built-in tools. I have to type them manually.
Most IntelliSense options are in effect by default. You can turn off an IntelliSense option by default and invoke it through a menu command or keystroke combination.
On the Tools menu, click Options.
Select the Text Editor folder.
Select the folder for the language you want to customize IntelliSense.
In the General property page, click check boxes for IntelliSense features that you want:
Auto list members applies to
Parameter information applies to
Aug 15, 2016 02:03 PM|JEREMER|LINK
Thank you for the help, but it looks like this is an issue with the install. I was able to reinstall Visual Studio again after uninstalling and removing certain registry keys, and it seems to have "mostly" fixed the issue. There are still a few namespace
items that VS cannot find but other than this, it seems to be working now.