locked
edit web application project on 2 computers RRS feed

  • Question

  • User2146470223 posted

    Hi,

    How can I edit my project on another computer (pc at home and laptop while traveling)? Copying files to the other PC does not work as I then get plenty of errors/warnings that many files/references could not be found.

    I cannot find the right information when looking up this question online. I only get instructions on how to create/debug/deploy a project.

    I use VS Community 2017 latest version on both PCs.

    regards,

    Pascal

    Friday, December 14, 2018 2:25 PM

Answers

  • User2146470223 posted

    Seems I got rid of the Nuget errors. I went to options unselected all nuget options, saved, closed VS, started VS again, went to options selected all the nuget restore options and now whenever I get to a project with missing files they are automatically restored. Seems there was a bug in VS stating the options were enabled but they were not.

    I now have some more errors, I'm trying to go through one by one. Will keep you updated if there is one error I cannot get solved and we can then hopefully close this thread. ;)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 14, 2019 12:55 PM

All replies

  • User475983607 posted

    Use source control like GIT and a repository like GitHub.  It's free.

    There's also Visual Studio Team Services

    https://azure.microsoft.com/en-us/services/devops/?&OCID=AID736750_SEM_ovGvtInx

    Friday, December 14, 2018 2:32 PM
  • User2146470223 posted

    I'm not sure I'm getting the point with these links. I want to use my code on another PC not to upload it to some servers.

    Friday, December 14, 2018 2:45 PM
  • User475983607 posted

    Translating-it

    I'm not sure I'm getting the point with these links. I want to use my code on another PC not to upload it to some servers.

    Centralizing the code on a code repository is how sharing code is done in the industry. 

    Basically, one computer connected to to the repo checkouts files, updates, then check the files when done.  The other computer gets that latest code from the repo and now the projects are in sync between the two computers.

    Please take a few minutes to read the linked docs.

    Friday, December 14, 2018 2:49 PM
  • User2146470223 posted

    did you forget to add links to the docs or do you mean the sites you linked in first reply?

    I already started reading there before answering your previous post and I cannot see how it can help me as I'm not looking for an online solution but simply want to have a way to copy my project from PC 1 to PC 2 (maybe even with a synching tool) and then just edit my code on the PC I have at hand at that moment.

    Friday, December 14, 2018 3:22 PM
  • User753101303 posted

    It's a central repository to which you can push code and get your code. This is used to synchronize the development effort accross team members but you can use that for your own projects to keep your PC and sync (and avoid loosing all your work if your PC crashes, also you get the full history of all your changes).

    Else if your manual synchronization fails, we would need to know which kind of errors you have so that we can suggest how to fix this. For example it's best to add references using "nuget" that can then automatically download missing libraries on the other PC etc...

    Friday, December 14, 2018 4:04 PM
  • User2146470223 posted

    Hi Patrice,

    Well the problem was that nuget is only part of the problem as for some reasons it did not automatically download missing libraries, but there were many more issues. So I'm looking for some kind of tutorial on how to get my project from a to b an vice versa.

    Friday, December 14, 2018 4:12 PM
  • User475983607 posted

    did you forget to add links to the docs or do you mean the sites you linked in first reply?

    I did not forget, the links are in my first post.

    I already started reading there before answering your previous post and I cannot see how it can help me as I'm not looking for an online solution but simply want to have a way to copy my project from PC 1 to PC 2 (maybe even with a synching tool) and then just edit my code on the PC I have at hand at that moment.

    Source control specifically solves this problem.  I'm confident if you try source control then you will quickly see the benefits.  At the very least, you be able to track code changes.  I can't image coding without source control.

    Anyway, that's all I have for you...

    Friday, December 14, 2018 4:16 PM
  • User753101303 posted

    It's unlikely you'll find something useful. In short it should work and you'll likely find just general stuff such as :
    https://support.microsoft.com/en-us/help/326495/how-to-move-your-visual-studio-net-web-project-to-another-computer
    - https://stackoverflow.com/questions/19868364/copy-move-visual-studio-projects-solutions-to-another-computer
    etc...

    You are really doing a full "carbon copy" ? A common reason is to have hardcoded path or maybe you are missing some tools or they were left at a much lower version ? IMO just tell which problems you have one at a time...

    Friday, December 14, 2018 5:54 PM
  • User2146470223 posted

    @mgebhard

    I'm checking with these links. Is there a possibility to use such a solution like git without using a third party server but by saving the solution on my own server?

    @PatriceSc

    Well I did exactly the same thing as stated as solution in your second link but to no avail. I get plenty of nuget and dll errors. For some reason the solution cannot download missing/faulty files from nuget on the target pc. VS version is the very same. Even downloading them manually does not work.

    Thursday, December 27, 2018 11:19 PM
  • User753101303 posted

    It was actually rather an attempt to explain that it should work and that instead you should really start from the error message you have. By the way, more likely a source control system - that does as well a copy of your project - may perhaps not solve your issue.

    If this is a really a download issue, nuget could be blocked by a proxy or a firewall. You should have an error message on the output window in VS.

    In short, it would be IMO much better to start from which error you have and then  trying to see if one could figure out how to fix THIS error rather than trying "random" things such as trying to follow a tutorial or using a source code control system hoping it will "magically" solve your current (and unknown to us) issue.

    Thursday, December 27, 2018 11:59 PM
  • User2146470223 posted

    Hi Patrice,

    Well I can download from nuget but it does not seem to have an impact on the errors that the dlls would be missing.

    I'll have to check when I get back to the office in about 10 days regarding the error messages. Up to now I tried to solve the problem with the help of the error messages I got in VS.

    Friday, December 28, 2018 9:45 AM
  • User753101303 posted

    Then maybe some packages were just not installed through nuget and are still missing ? This is a message about missing references ? Check the packages.config file to see if those packages are known to nuget.

    The better you describe the error (possibly just posting the error message) the easier it is to start right away with trying to solve your issue. Else we have first to guess about which wrong thing happened on your side.

    Friday, December 28, 2018 11:12 AM
  • User1120430333 posted


    How can I edit my project on another computer (pc at home and laptop while traveling)? Copying files to the other PC does not work as I then get plenty of errors/warnings that many files/references could not be found.

    You could just use OneDrive and put the project out there, which could be accessible by both machines keeping it simple. 

    Friday, December 28, 2018 5:09 PM
  • User2146470223 posted

    OneDrive is not activated in our company for security reasons (GDPR), so this option does not work. That's the same reason why I cannot use 3rd party websites to store repositories.

    Friday, December 28, 2018 11:20 PM
  • User1120430333 posted

    OneDrive is not activated in our company for security reasons (GDPR), so this option does not work. That's the same reason why I cannot use 3rd party websites to store repositories.

    Maybe your company allows you to use Remote Desktop Sharing where you can login to the domain via VPN from the laptop and access the computer at work that will have access to the project, which is at one location. 

    Saturday, December 29, 2018 2:15 PM
  • User475983607 posted

    Translating-it

    I'm checking with these links. Is there a possibility to use such a solution like git without using a third party server but by saving the solution on my own server?

    Yes...

    Git is basically client side version control with the option to sync to a central code repository. Every dev machine has a copy of the source and can build an unlimited number of branches.  This allows many developers to work on features without interrupting others.  These concepts are thoroughly covered in the docs and links provided above.

    Source code is usually very important to a Dev Shop.  Generally the Shop has a central code repository secured on a server.  A basic flow is a developer fetches the newest feature branch from the code repository.  The developers works on the code locally where many local check-in can happen.  Once the code is good to go, The developer will sync the local repo with the central repo.  Keep in mind the previous flow is simplified as there are various tools within Git that allow Shops to customize the SDLC.  

    Translating-it

    OneDrive is not activated in our company for security reasons (GDPR), so this option does not work. That's the same reason why I cannot use 3rd party websites to store repositories.

    IMHO, it does make sense that your company has strict General Data Protection Regulations but allows for manually copying the code base between machines.

    Anyway, as mentioned above.  If xcopy is the preferred method and doing so causes reference errors then I assume the project is not encapsulated within a folder and there are differences in the framework versions installed on the machines.  But that is just a guess as we cannot see your machines and you have not provided the errors.

    Saturday, December 29, 2018 3:03 PM
  • User2146470223 posted

    Seems I got rid of the Nuget errors. I went to options unselected all nuget options, saved, closed VS, started VS again, went to options selected all the nuget restore options and now whenever I get to a project with missing files they are automatically restored. Seems there was a bug in VS stating the options were enabled but they were not.

    I now have some more errors, I'm trying to go through one by one. Will keep you updated if there is one error I cannot get solved and we can then hopefully close this thread. ;)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 14, 2019 12:55 PM
  • User2146470223 posted

    Made another sync of the files and now everything works correctly.

    Tuesday, January 15, 2019 10:43 AM