Excel-DNA / Excel-DNA/ExcelDna

Target framework net10.0 won't work (can't find compatible framework version) unless RuntimeFrameworkVersion is specified (1.9.0-rc3)

Open
#785 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.5k
Forks
292
Avg merge
20d 12h
Merged PRs (30d)
1

Description

Let us assume a .csproj containing the following:

```


net10.0-windows
enable
enable



```

With a simple MyFunctions.cs file containing:
```
using ExcelDna.Integration;

namespace ExcelDNAProject1;

public static class MyFunctions
{
[ExcelFunction(Description = "Hello .NET 10.0 world!")]
public static string SayHello(string name)
{
return "Hello " + name;
}
}
```

This results in a .xll file that will cause this error message to appear:

Error message: target framework could not be found

This machine does have .Net Desktop Runtime 10.0.0 (preview 7) version installed. So this is strange.

However, if RuntimeFrameworkVersion is specified in said .csproj file:
```


net10.0-windows
10.0.0-preview.7.25380.108
enable
enable



```

This results in a working .xll file.

I should note that I've only tested this using both Debug and Release configurations, same results each time.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.