compile code in Visual Studios

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sevak316
    New Member
    • Sep 2008
    • 73

    compile code in Visual Studios

    I wasn't sure how what subject to put for this, but what I really want to know is how to compile code which is located outside of my Visual Studio project folder.

    For example if my project is located in C:\my project\...
    But the source files are located X:\source files\....

    May I add the point that I cannot move the source files and nor the project files together. They have to remain seperate. How can I tell my Visual Studio 2008 to compile the code located in that folder?

    Does anyone know?

    Thank you.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    You *might* be able to open the project file in a text editor and input pathnames for the files.
    You run the risk of corrupting the project file though, so be sure to make a backup copy of it

    Comment

    • tlhintoq
      Recognized Expert Specialist
      • Mar 2008
      • 3532

      #3
      Right click
      Add existing item
      browse
      Use the triangle on the 'add' button to select "add link" instead of the normal add that makes a copy.

      Comment

      • sevak316
        New Member
        • Sep 2008
        • 73

        #4
        tlhintoq: I am having trouble finding the triangle you are talkin about. This is in Visual Studio 2008 right?

        Comment

        • tlhintoq
          Recognized Expert Specialist
          • Mar 2008
          • 3532

          #5
          A picture is worth a thousand words

          Comment

          • sevak316
            New Member
            • Sep 2008
            • 73

            #6
            mine doesnt have the triangle thing. :(

            Comment

            • tlhintoq
              Recognized Expert Specialist
              • Mar 2008
              • 3532

              #7
              Visual Studio 2008 professional?
              Done all the updates etc.?

              Comment

              • sevak316
                New Member
                • Sep 2008
                • 73

                #8
                Yes.
                Havent done updates.

                Microsoft Visual Studio 2008
                Version 9.0.21022.8 RTM
                Microsoft .NET Framework
                Version 3.5

                Installed Edition: Professional

                Comment

                • tlhintoq
                  Recognized Expert Specialist
                  • Mar 2008
                  • 3532

                  #9
                  Is there anyone else out there you can NOT do "Add as link" as shown in the image above? I can't think of any reason the OP wouldn't have this feature aside from a bad Visual Studio installation.

                  Comment

                  • sevak316
                    New Member
                    • Sep 2008
                    • 73

                    #10
                    well,

                    i ran into another problem. let me explain:

                    1. My visual studio project is located on my local drive.
                    2. I added the source code (which is located on a network drive) by right clicking and going to "add exisiting item".
                    3. yesterday i compiled the code and it compiled with no errors/warnings.
                    4. Today, I came in and there were changes made to the code and I tried compiling it again, and ended up getting all these errors. The errors did not make sense as to why they were appearing, because the code looked ok. I even created a new project and added the same code and it compiled fine. However, my old project did not want to compile (not sure why this is happening).

                    So, I found out today that there is a Service Pack 1 for VS2008. I am not sure if this is going to fix the problem or not.

                    Any suggestions?

                    Comment

                    • tlhintoq
                      Recognized Expert Specialist
                      • Mar 2008
                      • 3532

                      #11
                      This is why I asked if you had done all the updates.

                      Comment

                      • sevak316
                        New Member
                        • Sep 2008
                        • 73

                        #12
                        so do you think the updates might fix the problem?

                        Comment

                        • Plater
                          Recognized Expert Expert
                          • Apr 2007
                          • 7872

                          #13
                          I think the issue of sometimes having to start a new project and copy/paste things in, was one of the issues they tried to address in SP1 for vs2008?

                          Comment

                          • tlhintoq
                            Recognized Expert Specialist
                            • Mar 2008
                            • 3532

                            #14
                            I think updates are created for a reason beyond keeping the coders employed.
                            I won't hazard a guess about your specific issues.
                            But you do the updates for your operating system, right?
                            You issue updates to the software you write when you find bugs, right?

                            Comment

                            • tlhintoq
                              Recognized Expert Specialist
                              • Mar 2008
                              • 3532

                              #15
                              2. I added the source code (which is located on a network drive) by right clicking and going to "add exisiting item".
                              Was that as a link? If not, then the files were copied into your project. From this point forward your files are a copy of the originals.

                              4. Today, I came in and there were changes made to the code
                              Someone else made changes to the code you are working on?
                              Did they make changes to the files copied into your project, or on the original files? This is why it is important to have those files as links, not copies.

                              Maybe the errors are because still other files that you don't have links to were changed. Maybe methods were changed so they don't take the same arguments or don't return the same value types.

                              Comment

                              Working...