<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:PMingLiU;
panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"\@PMingLiU";
panose-1:2 2 5 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Sprechblasentext Zchn";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.SprechblasentextZchn
{mso-style-name:"Sprechblasentext Zchn";
mso-style-priority:99;
mso-style-link:Sprechblasentext;
font-family:"Tahoma","sans-serif";}
span.msgfragment
{mso-style-name:msgfragment;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">we’re looking into generating our C# projects using CMAKE. We can generate working solution files, but we’re still struggling with dependencies. We would like to manage nuget packages via the nuget.exe command line tool.
With the install or restore parameter this deems us a good approach for managing dependencies. However, CMAKE currently only supports the Reference tag in the csproj file. Without an additional HintPath subtag into the package’s folder the reference is not
resolved. This HintPath points down the whole path to the DLL of the package, including version etc. So far I have not found a way how to extract this path from nuget.exe and I would not like having to guess it to fill the HintPath tag.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Any ideas how to solve this issue? <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">We found that using the new PackageReference tag (new since VS2017) would work fine without a HintPath and would offer complete configuration of dependencies via nuget.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">So we wondered if CMAKE could support this new PackageReference tag, too, like it does for the Reference tag by means of the
<span class="msgfragment">VS_DOTNET_REFERENCES? Or is there any way how we could inject the XML into the generated csproj file ourselves from the project’s CMakeLists.txt? Looking into the CMAKE source code, I think supporting the PackageReference tag would
basically require going along the lines of the VS_DOTNET_REFERENCES property handling. However, I don’t know if another property like this (e.g. VS_DOTNET_PACKAGEREFERENCES) would be appreciated by the CMAKE team or whether there are better solutions? If such
a property were acceptable maybe we could even try to offer a patch for CMAKE.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span class="msgfragment"><span lang="EN-US"><o:p> </o:p></span></span></p>
<p class="MsoNormal"><span class="msgfragment"><span lang="EN-US">Thank you!<o:p></o:p></span></span></p>
<p class="MsoNormal"><span class="msgfragment"><span lang="EN-US"><o:p> </o:p></span></span></p>
<p class="MsoNormal"><span class="msgfragment"><span lang="EN-US">Cheers,<o:p></o:p></span></span></p>
<p class="MsoNormal"><span class="msgfragment"><span lang="EN-US">Jörn</span></span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>