Is there a way to default to using the relative path (to the workspace or project file) when creating workspace/project files and when sublime updates them when files are added or removed?
Related
I have set up a hosted mac os preview build for a Xamarin app. All the steps complete except for 'deploy ipa' The publish artifact says nothing will be added. Here is are the settings from the copy files to as well as the output
Seems you set the incorrect Source Folder or Contents pattern in Copy Files step. That caused no files were copied to target folder for publishing.
Please check the logs of Copy Files step to see if the *.ipa files are really copied to $(build.artifactstagingdirectory).
If no files copied, then just check the build logs to get the real working directory (Source Folder in copy step) and make sure the *.ipa files are generated in the directory. (By default it's $(system.defaultworkingdirectory) on my side.)
If the real working directory is just the Source Folder $(Build.SourcesDirectory) you specified in Copy step, then the problem should be the contents pattern.
Contents specify minimatch pattern filters (one on each line) that you
want to apply to the list of files to be copied. For example:
** copies all files in the root folder.
**\ * copies all files in the root folder and all files in all sub-folders.
**\ bin copies files in any sub-folder named bin.
I am trying to use a target at a relative location from the project in the source control using the following entry in the .csproj
<Import Project="..\..\Shared\Build\Tools\Targets\config.transform.targets" Condition="Exists('..\..\Shared\Build\Tools\Targets\config.transform.targets')" />
the Shared folder mentioned in the below path is two levels above the .csproj file location as in
Dashboard\Shared\Build\Tools\Targets
Dashboard\Admin\ConfigurationConsole\ConfigurationConsole.csproj
Locally the project & the solution build fine, but when queued on the build server it fails with the following error.
TransformWebConfig does not exist in the project.
So after trying many things when i finally changed the relative path to the below it worked.
<Import Project="..\Shared\Build\Tools\Targets\config.transform.targets" Condition="Exists('..\Shared\Build\Tools\Targets\config.transform.targets')" />
Would like to know whats happening here and what could be an apt solution that runs everywhere.
actually the better way to point to a relative path was to force the current path to be current project directory using the $(MSBuildProjectDirectory) environment variable
Relative paths with MSBuild project vs solution
MSBuild: convert relative path in imported project to absolute path
Given a working copy that contains multiple Visual Studio solutions in different directories, how can I configure the working copy so that restoring packages in any solution will result in the packages being downloaded to one and the same directory?
The setting in NuGet.config that controls where packages are downloaded and expanded, is called packageRepository (reference).
Here's the places where I added a NuGet.config file (or added the setting to an existing file) and it did not have any effect:
the same directory as the solution file
a parent or ancestor directory of the solution file
the .nuget directory that is in the same directory as the solution file
I am looking at two ways of restoring packages:
Using Visual Studio (the magic 'restore' button in the Package Manager COnsole)
Using MSBuild (where .csproj files are altered to include the $(SolutionDir).nuget\nuget.targets file)
Is it possible to configure NuGet package restore (either or both methods) to download and expand packages to the same location?
What is the difference of the working directory vs the output path in visual studio?
Is it bad to set both setting to the same directory like '....\bin\'
By default they are the same. Assuming you're debugging some application it will be bin\debug.
Output Directory is where your output files goes. By default, Visual Studio builds each project in a solution in its own folder inside the solution. You can change the build output paths of your projects to force all outputs to be placed in the same folder
Working Directory is the location which Specifies the working directory of the program being debugged. It is the default place in which a program is looking up it's files. Normally the working directory is the directory the application is launched from \bin\debug by default.
So every opened file will be opened relative to the working folder.Let's say if you have an application installed in c:\myapp with all lib files in the same directory then you will set your working directory to myapp folder and you can do so from project properties.
By default, working directory is the output directory. Both can be changed, you can set another directory or common directory for all projects for output directory that determines a relative path for the output file that might be an executable or a static library.
Working directory also provides a relative path to put files that are used by the program. You can put a log file into a place that you can use its directory as a relative path in the code instead of absolute path. If your working directory is myproject\src and your log file is in myproject\src\log\log.txt then you can open or write the log file with log\log.txt in the code rather than c:\blabla\myproject\src\log\log.txt.
When you add a folder that contain subfolders and files to the Xcode project, the Xcode ask you about the folder option:
Create groups for any added folders.
Create folder references for any added folders.
I want to download the folder from a server. When the download is complete, the folder option will be 1 or 2? How can I set the folder option to option 2?
When Xcode references a folder, it uses whatever files are stored at that location on your local disk. If you download a new file to that folder or copy a file into that folder, it will show up in your Xcode project. If you change a file in that folder (by overwriting it in the Finder, or by using another app to download another copy of the file over the existing one), Xcode will use the new one.