Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation on how to use the *.csproj CDATA block to provide information? #9174

Open
diberry opened this issue Feb 13, 2020 · 2 comments
Open

Comments

@diberry
Copy link

@diberry diberry commented Feb 13, 2020

How do I use the CDATA block as a first class citizent to provide rich text and hyperlinks to information relevant to my customers to use the package?

Is there reference documentation somewhere?

@dominoFire

This comment has been minimized.

Copy link

@dominoFire dominoFire commented Feb 15, 2020

How do I use the CDATA block as a first class citizent to provide rich text and hyperlinks to information relevant to my customers to use the package?

Since the .csproj file is an XML file, you can use CDATA in the nodes. In the following .NET Core sample library, the csproj would look like:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <PackageVersion>0.0.3</PackageVersion>
    <PackageLicenseExpression>MIT</PackageLicenseExpression>
  </PropertyGroup>

  <PropertyGroup>
    <Description><![CDATA[<h1>Package Title</h1>

A package with awesome functionalities

<pre>
var x = ClassLib1.AwesomeStuff(param1, param2);
</pre>

<h2>Features</h2>

Lots of features

More info at <a href="https://nuget.org">this website</a>

<ul>
<li>Support for multiple languages</li>
<li>打发发阿飞是否教案反思了啊</li>
</ul>
]]></Description>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.Data.OData" Version="5.6.3" />
    <PackageReference Include="WindowsAzure.Storage" Version="9.3.1" />
  </ItemGroup>
</Project>

In the preview page in nuget.org, the description appears as follows:

image

Is there reference documentation somewhere?

I did a quick search and I couldn't find any documentation. This issue may be related: NuGet/docs.microsoft.com-nuget#1324

@diberry

This comment has been minimized.

Copy link
Author

@diberry diberry commented Feb 18, 2020

@dominoFire Thank you. I don't find this information in the docs anywhere. Can you provide the link?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.