locked
New Visual Studio RRS feed

  • Question

  • User362646341 posted

    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?

    Thank you,
    Jereme

    Sunday, July 31, 2016 5:32 AM

Answers

  • User362646341 posted

    Angie,

    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.

    Thank you

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 15, 2016 2:03 PM

All replies

  • User475983607 posted

    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?

    Sunday, July 31, 2016 2:23 PM
  • User362646341 posted

    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???

    Sunday, July 31, 2016 11:43 PM
  • User475983607 posted

    Why is this happening???

    This is a Google drive support question not ASP.  Just copy the files to the laptop's hard drive..

    Monday, August 1, 2016 9:52 AM
  • User362646341 posted

    Mgebhard,

    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!

    Jereme

    Monday, August 1, 2016 3:23 PM
  • User-166373564 posted

    Hi,

    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.

    Regards,

    Angie

    Tuesday, August 2, 2016 8:16 AM
  • User362646341 posted

    Thank you for the thought. I will try this and see if it resolves the issue.

    Tuesday, August 2, 2016 6:00 PM
  • User362646341 posted

    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" ?????

    Thursday, August 4, 2016 4:40 AM
  • User-166373564 posted

    Hi,

    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.

    Regards,

    Angie

    Thursday, August 4, 2016 12:20 PM
  • User362646341 posted

    Angie,

    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

    Thursday, August 4, 2016 3:09 PM
  • User-166373564 posted

    JEREMER

    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.

    To turn IntelliSense options On

    1. On the Tools menu, click Options.

    2. Select the Text Editor folder.

    3. Select the folder for the language you want to customize IntelliSense.

    4. In the General property page, click check boxes for IntelliSense features that you want:

    Regards,

    Angie

    Monday, August 8, 2016 7:39 AM
  • User362646341 posted

    Angie,

    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.

    Thank you

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 15, 2016 2:03 PM