# CMake for C# project with nuget package references

**URL:** https://discourse.cmake.org/t/cmake-for-c-project-with-nuget-package-references/11028
**Category:** Code
**Tags:** os:windows, gen:makefiles, gen:vs
**Created:** [June 16, 2024, 10:34am UTC](https://discourse.cmake.org/t/cmake-for-c-project-with-nuget-package-references/11028 "2024-06-16T10:34:44Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Sameer\_Joshi](https://discourse.cmake.org/user_avatar/discourse.cmake.org/sameer_joshi/32/4673_2.png) [@Sameer\_Joshi](https://discourse.cmake.org/u/Sameer_Joshi)
#### Post date: [June 16, 2024, 10:34am UTC](https://discourse.cmake.org/t/cmake-for-c-project-with-nuget-package-references/11028/1 "2024-06-16T10:34:44Z")

</div>

Hi All,

I am looking for generating a CMakeLists.txt file for my C# csproj project which is .netstandard 2.0 based.  
It has project references and nuget package references.  
How can I add those package references in the CMakeLists.txt file?

---

<div class="post-metadata">

### Author: ![ClausKlein](https://discourse.cmake.org/user_avatar/discourse.cmake.org/clausklein/32/352_2.png) [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)
#### Post date: [June 16, 2024, 7:00pm UTC](https://discourse.cmake.org/t/cmake-for-c-project-with-nuget-package-references/11028/2 "2024-06-16T19:00:35Z")

</div>

> [@Sameer\_Joshi](#):
>
> nuget

Dit you search for this Word in the cmake Doku or in this Forum?

---

<div class="post-metadata">

### Author: ![Sameer\_Joshi](https://discourse.cmake.org/user_avatar/discourse.cmake.org/sameer_joshi/32/4673_2.png) [@Sameer\_Joshi](https://discourse.cmake.org/u/Sameer_Joshi)
#### Post date: [June 17, 2024, 4:32am UTC](https://discourse.cmake.org/t/cmake-for-c-project-with-nuget-package-references/11028/3 "2024-06-17T04:32:25Z")

</div>

Hi Claus  
I found this property parameter VS\_PACKAGE\_REFERENCES that I can specify in the CMakeLists.txt file for specifying the packages to be referenced.  
However, I have issues when I download these packages its showing error they are not supported for .net framework 4.0 while I am targeting the project for .netstandard2.0  
I see the error comes while building ALL\_Build.vcxproj which is autogenerated file by CMake.
