ExcelDna quick start #678
-
Hi, I'm really new to C# and ExcelDna, and I'm excited to come across this tool. I'm trying to follow the start-up guide: https://excel-dna.net/docs/getting-started I have some very basic questions. I guess since the start-up guide didn't mention which Nuget package to get, I got the ExcelDna.Integration 1.7.0. I was met with the warnings that it was restored using .NetFramework, Version=v.4.8.1 etc. I guess I can ignore this warning? I'm using the Visual Studio 2022, and I couldn't find debug with excel. Instead I debugged by attaching to an existing running Excel process, but nothing happens to my excel. Should I use an earlier version of Visual Studio? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The main package to reference is called |
Beta Was this translation helpful? Give feedback.
The main package to reference is called
ExcelDna.AddIn
, and version 1.7.0 is the current release. Visual Studio 2022 is best. It's better these days to make an SDK-style project file, which you get by picking the "Class Library" project template instead of the "Class Library (.NET Framework)" template. After the project is create, just change theTargetFramework
to "net472" or "net48" to target .NET Framework, which is simplest. Then your NuGet package references go into the project files as<PackageReference>
items and you don't have a packages.config file. Having done all of this, you can press F5 to build and debug (sometimes need to build twice to get rid of a VS bug after you change …