dotnet / dotnet/fsharp

SpecificVersion=false flag is not taking effect in new SDK-style projects

Open
#10,277 4 comments 0 reactions 0 assignees View on GitHub
Area-ProjectsAndBuild Feature Request
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

The new SDK-style projects have a flag ` `under ``; when set to false, the reference to the assembly should not be strongly typed.

However this does not seem to be the case.

The IL from the F# assembly shows that the reference is strongly typed. E.g. :

```IL
.assembly extern XYZ
{
.publickeytoken = (
xxx
)
.ver yyy
}
```
A similar assembly in C# generates the (presumably) correct IL:

```IL
.assembly extern XYZ
{
.ver yyy
}
```

Is there a compiler or other flag/setting that can be used to fix this issue?

Note: The use case here is that the F# assembly will be dynamically loaded by another software as an 'add-in'. The add-in should bind to the already loaded XYZ assembly in the process. The instantiation of the add-in fails when the F# generated assembly tries to bind to the XYZ assembly.

I manually edited the IL to remove `.publickeytoken` from the reference to the assembly and then recompiled the F# assembly using ilasm.exe. This fixed the add-in load issue.

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.