Specify markdown description in csproj file - msbuild

When using dotnet pack, I can use properties like RepositoryUrl to use as the resulting .nuspec file's repository URL etc.
But what property do I set to specify markdown content? Is it even possible to specify via .csproj files?
If not, how do I do it in a .nuspec file? The documentation is very lacking. According to this link, some interns have apparently published the feature - but how do I use it?

Update: You can use NuspecProperties as a Semicolon separated list of key=value pairs.
Here the complete command reference for csproj, in particular you have to set the documentation property as below reference:
According to this Nuspec documentation
You can specify the property documentation
<documentation src="documentation.md" />
in your .nuspec file.
target defaults to package root
Supported formats - md
On pack, strip source value, append the target value with the source file name - <documentation target="documentation.md"/>. (this is to help the gallery and the client know the path to the documentation file in the package and the file name.extension. Allows for extension validation, etc.)
nuget spec will add
<!-- e.g. <documentation src="documentation.md"/>. Learn more at https://aka.ms/nugetPackageDocumentation-->
<documentation src=""/>
package submitted to NuGet.org - target should not be null
Sidenote: this answer comes with a documentation resource published later than when the question was asked.

Related

How to properly specify DocumentationFile in MsBuild 15 .csproj with multitargeting

I am using the latest preview of MsBuild 15 and I have a multitarget project file targeting both net40 and netstandard1.6.
I am struggling with specifying <DocumentationFile> correctly.
For any path I would specify, the resultant xml file after the build will be both in that path and two target output directories.
For instance, if I specify
<DocumentationFile>doc.xml</DocumentationFile>
Then the xml file will be generated both in my project dir and bin\net40 and bin\netstandard1.6.
I need those xml documentation files only in my bin\net40 and bin\netstandard1.6 directories. How can I achieve that?
Also, with the current behavior, it is not clear which documentation file is copied to my project dir, because those xml documents can differ for two targets.
In earlier project versions I used to specify documentation xml path separately for Debug and Release build configurations with paths like bin\Debug\doc.xml, but with the newest MsBuild 15 it is possible to do multitargeting and the number of such paths double if I specify the dir for all possible combinations of target and build configuration.
Is there any generic good way to specify documentation file path once and get it to the right output places only?
From my testing if you specify
<DocumentationFile>bin\Debug\netstandard1.0\MyProjectName.xml</DocumentationFile>
it will create doc file in each multi-targeted folder so it'll create
netstandard1.0\MyProjectName.xml
net45\MyProjectName.xml
netcoreapp1.0\MyProjectName.xml
netstandard2.0\MyProjectName.xml
etc.

How are Libraries named in xcode? How do I navigate to a specific library?

I am getting an error which says - "ld: - library not found for -lpods-AppName-DZNWebViewController"
My question is NOT how to fix this error but rather to understand where xcode is looking for this library? Is there a directory where this library needs to be? Below are snapshots of my project workspace.
image of my project files
Using CocoaPods to Maintain Library Dependencies
A library that supports CocoaPods will provide you with the command required to install the library. In this case, it is
pod 'DZNWebViewController'
If this doesn't work, you can always edit the project settings manually.
Manually Maintaining Library Dependencies
Even when using CocoaPods, you can still edit the locations yourself. You can provide Xcode with three types of paths for where to search for files, using project settings in the Search Paths section:
Framework Search Paths refers to frameworks that are pre-compiled
Library Search Paths refer to any library that you include in your project, for access from your code. These are usually the pre-compiled files that have the '.a' extension.
Header Search Paths are usually used in conjunction with Library Search Paths, to tell Xcode where the headers are located for a given library.
The error that Xcode provides will tell you which search path setting and the path it had a problem with:
ld: refers to library Search Paths
fd: refers to Framework Search Paths
hd: refers to Header Search Paths
To provide a fully-qualified search path, you can can begin the path using pre-set placeholders that Xcode provides for convenience.
The following two placeholders often refer to the same location and are therefore synonymous, by default:
$(PROJECT_DIR) - this refers to the project root directory, where the source code is located
$(SRCROOT) - this refers to the source root directory
To complete a path specification, you would follow with a '/', providing the full path to a directory, as in:
$(SRCROOT)/some_dir/some_other_dir
To provide a recursive search path, simply add two asterisks at the end of the path, as in:
$(SRCROOT)/some_dir/some_other_dir/**
To add multiple paths in one of the Searh Paths settings, you simply separate them with spaces:
$(SRCROOT)/some_dir/some_other_dir $(SRCROOT)/some_dir2/some_other_dir3
This brings up the obvious question: what if a path contains spaces?
If your path contains spaces, then wrap your path in double quotes, as in:
"$(SRCROOT)/some dir/some other dir/" "$(SRCROOT)/some dir2/some other dir3/"
Another option is to escape the spaces in your paths, by preceding each space with a backslash (in this case, you cannot use quotes). However, this makes it harder to read, and therefore more difficult to debug, especially when there are multiple long paths:
$(SRCROOT)/some\ dir/some\ other\ dir/ $(SRCROOT)/some\ dir2/some\ other\ dir3/

TFS api - candidates excluded by file extension

I am trying to import a set of files into TFS using the API. The method Workspace.GetPendingChangesWithCandidates excludes files that match the globally ignored file extensions (.dll, etc). How can I get these files from the API so that I can PendAdd them?
I found an answer but I think it's a kludge. You can edit the LocalItemExclusions.config file found here:
C:\Users\%username%\appdata\local\microsoft\team foundation\4.0\configuration\versioncontrol.
Ultimately, I think the ignored files should be overridden from the API, but I can't find such an option.
It is an older question, but this may help others: Another way to get files recognized as candidates is to create a file called ".tfignore" within the workspace that enables globally filtered files again.
# Do not ignore .dll files in this folder nor in any of its sub-folders
!*.dll
More details can be found here
MSDN: Add files to the server - Customize which files are ignored by version control

How to add a changelog to an RPM created with CPack

In a typical spec file there is a changelog section. I now use CPack and was wondering how to add such a section. I can't find information about that on the web.
Could I use an external file and indicate it to CPack for example ?
If you pack a RPM file use CPACK_RPM_CHANGELOG_FILE
May be used to embed a changelog in the spec file. The refered file will be read and directly put after the %changelog section.

Nuget: Is there a transformation token available to get the location of the package tools folder?

I am trying to use Nuget to distribute a ms build .targets file. I need to modify some elements of the file to include the installed path of a few assemblies. For that I would like to use the tools folder. I am having a hard time finding the token (if it exists) to do the replacement. Has anyone encountered this problem or know of a workaround?
http://docs.nuget.org/docs/creating-packages/configuration-file-and-source-code-transformations
You'll have to go the PowerShell route to get this done, as no transform exists AFAIK. The init.ps1 file can process some parameters provided by the NuGet VSIX.
Simply add the following to the top of the init.ps1 file and use the $installPath variable in your scripts that modify the file content.
param($installPath, $toolsPath, $package, $project)
Check here for an example usage.