Xamarin project won't build after moving folder path - xamarin

I have created a new Xamarin Forms application using the latest Xamarin Studio for OSX and I have build errors caused by the following:
1. Moving the project on my local machine
2. Putting the project in source control and restoring to another machine
If I type xbuild in the terminal I can see that my project is referencing a file path from my other computer (now on the 2nd computer after restoring from source control).
I cannot find the file path information in any of the files inside of the Xamarin Forms solution so I can't tell where it is picking up this file path from!!
/Users/x/Documents/Work/Wire%20Mobile/src/Wire.sln: error : Could not
find a part of the path "/Users/x/Documents/Work/Wire
Mobile/src/Wire.sln".
Can anyone advise how i can store a project in source control without having hard links to the file path that it used to reside on in the old machine please? Also I've tried this on two projects now, could it be a bug in Xamarin?

the xbuild doesn't support file paths with %20 in them. Visual Studio Team Services is quite fond of these types of file paths however!
removed %20 from the path and now it works fine.
also affects Unity projects and Visual Studio for Mac projects.

Related

error when adding existing project in solution

I am configuring a new computer for programming, and have this strange problem.
In my solution I have currently 2 projects, and I want to add a third.
This is the same as on my current development computer.
So I do right mouse on the solution and choose add existing project and then I browse to the project file.
Now I get this error
--------------------------- Microsoft Visual Studio
--------------------------- The project file 'C:\Development\Palm\gttDXControls\gttDXControls\gttDXControls\gttDXControls.csproj'
has been moved, renamed or is not on your computer.
The project I am trying to add is located at C:\Development\gttDXControls\gttDXControls\gttDXControls
So why do I get this error ?
I have searched the whole folder development using NotePad++ for the string C:\Development\Palm\gttDXControls\gttDXControls\gttDXControls\gttDXControls.csproj but could not find any file having that string.
How to tell VS to not go searching in that folder when adding the project ?
I should note that on the current computer the project is under source control using TFS. I already added the connection for TFS on the new computer and it seems to be working.
On the current computer the project is on EXACT the same location.
EDIT
To clarify, as requested in comments.
The project I am adding is located at
C:\Development\gttDXControls\gttDXControls\gttDXControls\gttDXControls.csproj
But when adding it to the solution, VS is looking for this project
C:\Development\Palm\gttDXControls\gttDXControls\gttDXControls\gttDXControls.csproj
So I searched if there is a file somewhere on my disk that has the text C:\Development\Palm\gttDXControls\gttDXControls\gttDXControls\gttDXControls.csproj in it, but could not find any
So why does VS looks for my project there ? How can I make VS forget this folder ?

Deployed SFML Game not finding resources?

I am using SFML 2.0 and Visual Studio 2010 professional to create a game. When I test my game from within Visual Studio, it works perfectly fine, loads up all the resources. It has no problem finding all of the resources. However, when I build my setup.exe file and install my game, the deployed version cannot find the resources.
I feel like this has to do with where it is looking for the resources within Visual Studio compared to when it is installed on the system. Within Visual Studio, the program accesses a "res" folder that is in the default directory with the project file. Shown here.
When I install the game, I package the "res" folder to be installed next to the .exe like-so.
However, when I run the deployed game, it cannot find any of the resources, and thus, crashes. I feel like this is a real simple fix, just a matter of me placing the "res" folder in a different location, but I have been messing with it for a while and cannot get this to work. Where do I place the "res" folder in the installer?
Given you have not provided any code, I'll assume you're loading your resources with relative paths. This means that your application will be looking for the files relative to the working directory. Now the working directory can be changed and Visual Studio does so and sets it to where the project file is located in (by default). When you now run your application by double clicking on it, the working directory is where you application itself is located. As such your setup should work.
However if you have a conjunction or you start the application from within your setup, you need to make sure the working directory is set correctly.
Additionally you could also change the working directory within your application, but this will require some platform specific code (or the use of for example Boost's Filesystem).

Can I exclude/ignore files from Multi-Device Hybrid App build? (In order to prevent EBUSY error when building)

I'm getting this error when building my Multi-Device Hybrid App.
EXEC : error : EBUSY, resource busy or locked 'C:\path\to\project\bld\Debug\www\.svn\wc.db'
Suspected cause:
From what I can gather, when the Multi-Device Hybrid Apps Visual Studio extension builds the app it seems to grab all files in the project directory (except for some specific files/folders e.g. bld/bin directories and the .jsproj file) and add them to the package. That's ok, but not ideal, it really should only be grabbing the files in the VS project. The problem I'm experiencing is becuase it's grabbing my SVN .db file and adding it to the package, TortoiseSVN status cache then picks up this file and locks it - resulting in my error.
This is my specific issue, but I believe others could experience similar issues if they have any other files in the directory that they don't want included in the app bundle. I'd suggest it could be fixed by somehow setting excluded files/folders from the build or by the build script not grabbing everything, only those files included in the visual studio project. I'm not sure how to request that, so hopefully the developers will see this post...
So, my question is: Does anyone know of any way to tell the Multi-Device Hybrid Apps Visual Studio extension build process (or vs-mda\vs-cli) to ignore certain files or folders?
Or, does anyone have any suggestions as to how to make SVN and this VS extension play nice?
Unfortunately Visual Studio includes all the files under project directory except bin\bld folder. Currently only simple workaround would be to keep the files which you want to be excluded from package outside project directory. You can add the file to solution explorer by using Add --> Existing Item --> Add as link in case you want the file to appear in solution explorer but not included for build or packaging.
it seems folder with test as its name will be considered differently, and it will be excluded from package.

Copy/Move Visual Studio Projects/Solutions To Another Computer

So I have a handful of Visual Studio projects that I need to move to another computer. Is it as simple as a copy and paste or will that mess something up? Both machines will have the same version of Visual Studio installed, so that shouldn't be an issue.
Is there an export function that I've overlooked?
If the Visual Studio version is the same, you can just copy the project folder.
Till the time you are moving your solution file and associated files you should be good.
In case you are using any source control update your solution from there.
Hope you have the same VS version and any addon frameworks you have
You can directly copy the project to the projects folder. This worked perfectly for Visual C++ projects for me (and also some other projects). But when I copied my Cordova App from one PC to the other (Both had Visual Studio 2015), I wasn't able to open the project. Whenever I tried to open the project, trying both the ways - directly from the Project file and the open option in Visual Studio, it at first opened but when I tried to open a file, it just got hung and didn't respond.
This problem may occur because Cordova apps have some configuration files that might be different for different PCs. I am not sure that this is the reason for the problem.
A solution that I used was that I created a new Project and copied the files to the project folders (excluding the configuration files).
Can you save the file to cloud? if so then you could potentially upload the file to cloud and download the file to the new

Why is my project unloaded after being successfully converted?

In order to use the latest version of resharper on the much-maligend (by me) project I'm currently maintaining, I copied all the source to a separate folder and opened the project in VS 2010.
It converted successfully, so said the conversion report (after informing me it seemed to be under version control but would be unbound since it was missing needed info for that, which I accepted). Yet, although the conversion was nominally successful, in the Solution explorer, beneath the project name, it says "Project Unloaded"
Now for the nitty-gritty: The project has two related solutions, a "regular" (.exe) and a library (.dll) project; they both display in Solution Explorer, but both say "Project Unloaded."
Now for the strange part: When I realized that I had not even copied over the files from the .dll project, I started over and created two separate folders for them (as they have in the development setup), and copied each one's file into each folder.
But now, when I attempt to open the .exe project (the one which had previously claimed it had been converted successfully) from this new location, by selecting File | Open Project and selecting the .sln file, I get, "\.csdproj' cannot be opened because its project type (.csdproj) is not supported by this version of the application.
To open it, please use a version that supports this type of project.*
The dev environment is VS2003 in a XP Mode virtual machine; I'm trying to open the projects now in VS2010 in Windows 7.
Is there a way I can get this project to open and compile in VS2010, so that I can resharperize it (and carry over some of those fixes, albeit manually, one at a time) to the "real live" version of the project?
The best way would be to create a new project in Visual Studio 2010, like you've done. That will create the project folder and any necessary settings.
Next, copy files from your old project to this new folder. As you copy a file into the new folder, also "Drag-N-Drop" that file into your Visual Studio Solution.
The Visual Studio conversion wizard is good from going from the last version to the next version up, but going from VS2003 to VS2010 could be too big of a jump for it.
If I had to guess, this conversion is bombing because your old project targets the .NET Framework 1.0 and VS2010 doesn't do 1.0.
You will likely have to rebuild your project and fix numerous little bugs due to changes in the Framework, but none should be major.

Resources