I have a problem making a copy of an Xamarin project

JohnnySJohnnyS Member

I need help with what should be a very simple problem. I am new to both xaml and Xamarin but have been writing code in various languages since 1968 and have used windows visual studio extensively since the mid 90s. I use a simple, but until now, reliable backup method for developing new projects. I store the complete project in a dated folder. When the project is running and I wish to make a change I simply copy the entire contents of the folder into a new one and work from that. That way if I really mess things up I can get back to a working version.
I have used vs 2019 to create an out of the box Xamarin project in folder "A" and modified the mainpage.xaml "Welcome to Xamarin" message to read "This is project A" and ran it successfully on an Android emulator. So far so good. Now I copied, using windows explorer, the entire contents of folder "A", which also includes the .sln file into a new folder "B". I open "B" with visual studio and change the "This is project A" label in mainpage.xaml to read ""This is project B", rebuilt and executed the program. In the emulator I expected to see "This is project "B" but instead "This is project A" appeared. I suddenly have two versions of mainpage.xaml and don't understand why? I am obviously missing something but don't know what it is.

Best Answers

  • JohnnySJohnnyS
    Accepted Answer

    Thanks for the assistance. Since it worked correctly for you on VS 2017 I decided to give it a try there myself, and it worked correctly. I went back to VS 2018 and tried it again with new folders and the problem repeated!

    It appears that the issue is not the emulator but something in VS 2019 itself. There must be some file references that don't get updated when the project is copied to a new folder. I have always liked VS and have nothing against VS 2017 other than trying to keep up with the newest code. Apparently VS 2019 is "too new" for me.

Answers

  • JohnnySJohnnyS Member
    Accepted Answer

    Thanks for the assistance. Since it worked correctly for you on VS 2017 I decided to give it a try there myself, and it worked correctly. I went back to VS 2018 and tried it again with new folders and the problem repeated!

    It appears that the issue is not the emulator but something in VS 2019 itself. There must be some file references that don't get updated when the project is copied to a new folder. I have always liked VS and have nothing against VS 2017 other than trying to keep up with the newest code. Apparently VS 2019 is "too new" for me.

Sign In or Register to comment.