Unable to run sample C# read-write-sheet in Visual Studio Code [New SS user]
As the title suggests, I am testing out the smartsheet sample API code in Visual Studio Code. I have cloned the repository from GitHub and run the Program.cs script with hopes that the code would run successfully. I had installed Git and the .NET 7.0 as required before running the code.
https://github.com/smartsheet-samples/csharp-read-write-sheet (sample sheet)
https://github.com/smartsheet-platform/smartsheet-csharp-sdk (SDK)
However, as I tried running the script, it returns me with this exact message.
C:\Program Files\dotnet\sdk\7.0.100\Microsoft.Common.CurrentVersion.targets(1229,5): error MSB3644: The reference assemblies for .NETFramework,Version=v4.5.2 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application.
I had raised a similar question on Stack Overflow for further clarification. A user had shared an older post suggested that the current C# SDK requires the .NET 4.5.2 (or above) framework, the post was dated back in 2018.
https://stackoverflow.com/questions/74571891/visual-studio-code-requires-an-older-version-of-net-framework-to-be-installed (similar question raised by me).
https://github.com/smartsheet-samples/csharp-read-write-sheet/issues/1 (post shared by another Stack Overflow user).
Above all, I would like to know if there any further steps I should consider before running the code. I am also open to other options to run the sample code from GitHub. Thanks!
Answers
-
Hi @disblue7
I checked in with our internal teams and they confirmed that NET 6.0 and higher (e.g. .NET 7.0) are not supported yet.
The samples are using older versions of .NET, which is why the error message is telling you to install this: https://dotnet.microsoft.com/en-us/download/dotnet-framework/net452
You don't specifically need 4.5.2, the SDK documentation notes it should work with .NETFramework version 4.5.2 or greater, as well as .NETStandard 2.0 or higher, but importantly, .NET 6.0 and higher are not supported.
Our team is actively working on updating the SDKs to make them compatible with .Net Core 6.0 (which should also work with .Net 7.0) however we don't have an ETA for when this may be complete.
Thanks!
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Any updates on the support of .Net Core 6.0? or 7?
-
Hi,
This is our .net 6 project configuration
Seems to work fine.
We hold RestSharp to 106.15.0. Otherwise we kept getting errors at:
smartsheet = new SmartsheetBuilder().SetAccessToken(ssCred.Token).Build();
Hope this is useful,
Brian
-
The SDK does not install in .NetFramework 4.72
Any help greatly appreciated.
-
Just wanted to drop a note here that C# SDK now supports .NET 8.0.
Check it out here:
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 414 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives