Upgrade project files to SDK-style format compatible with dotnet#428
Open
Upgrade project files to SDK-style format compatible with dotnet#428
Conversation
Member
Author
|
@BHoMBot check compliance |
|
@adecler to confirm, the following actions are now queued:
|
Member
Author
|
@BHoMBot check compliance |
|
@adecler to confirm, the following actions are now queued:
|
Member
Author
|
@BHoMBot check installer |
|
@adecler to confirm, the following actions are now queued:
|
Member
Author
|
@BHoMBot check compliance |
|
@adecler to confirm, the following actions are now queued:
|
Member
Author
|
@BHoMBot check installer |
|
@adecler to confirm, the following actions are now queued:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues addressed by this PR
Fixes #251
Build\net472).You can find more details on the logic behind the modifications done in this PR here:
SDK_Migration_Notes.md
Tests
Make sure the solution build with
dotnet buildRun your end of milestone testing procedure
There is also an installer for this PR available on SharePoint at
BHoM\Excel_UI\#428-UpgradeProjectFormat. You can use it to test this PR but still make sure thatdotnet buildruns successfully.Note on the need for explicit casting
The old .csproj explicitly set EmbedInteropTypes=True on the interop reference (confirmed in git). With the old project format (non-SDK, packages.config), the .NET Framework build toolchain's NoPIA (No Primary Interop Assembly) embedding mechanism was more permissive — it allowed implicit assignment from object to a COM interface type that was simultaneously being embedded into the consuming assembly, treating it as type-equivalent at the point of use. The compiler silently inserted the conversion.
The new SDK-style project format uses a stricter Roslyn integration. Even when EmbedInteropTypes=True is active (the default for Interop.* packages), it no longer permits that implicit object → specific COM interface coercion. It requires the cast to be written explicitly.