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
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 67 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives