Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for 64 bit VS2022 path and version structure. #2631

Merged

Conversation

isaacabraham
Copy link
Contributor

Description

Fixes #2629 - now supports VS2022's installation of SqlPackage and gets the version using reflection against the executable itself.

TODO

  • boy scout rule: "leave the code behind in a better state than you found it" (fix warnings, obsolete members or code-style in the places you worked in).

I've tested this locally - my machine is a clean build that only has VS2022 on it, hence why I noticed this issue in the first place.

yazeedobaid and others added 3 commits January 6, 2022 11:42
* next release

* Fix sdk resolver for net6 assemblies. Using offical .NET release JSON to get runtime version (fsprojects#2625)

* Fix sdk resolver for net6 assemblies. Using official .NET release JSON to get matching runtime version

* Update RELEASE_NOTES.md
@yazeedobaid
Copy link
Collaborator

@isaacabraham no need to add the next version in RELEASE_NOTES.md file, it has been added for next release as 5.21.0-alpha005. The version needs to follow the SemVer notation, this is why the build fails.

Thanks

@isaacabraham
Copy link
Contributor Author

@yazeedobaid Fixed, rerunning the build.

@isaacabraham
Copy link
Contributor Author

@yazeedobaid can you re-run? Looks like the build failed because of a timeout.

@yazeedobaid
Copy link
Collaborator

@isaacabraham I have re-run the build again and now it fails due to this error:

Fsc: /home/runner/work/FAKE/FAKE/src/app/Fake.Sql.SqlPackage/Sql.SqlPackage.fs(201,22): error FS0001: All branches of an 'if' expression must return values of the same type as the first branch, which here is 'seq<string>'. This branch returns a value of type ''a list'.

Thanks

@yazeedobaid
Copy link
Collaborator

It seems I had introduced a conflict on this pull request when I merged the refactor of SqlPackage pull request #2634. Can you please fix the conflicts

Thanks

…2022-support

# Conflicts:
#	src/app/Fake.Sql.SqlPackage/Sql.SqlPackage.fs
@isaacabraham
Copy link
Contributor Author

Hmm. I've merged and solved the conflict - that's not the issue, because it builds locally fine.

I think the problem is that it's compiling against F#6 here but the build agent is still going against F#5: Despite having a global.json of .NET 6 preview (BTW, I think you should upgrade to a non-alpha version of .NET 6 e.g. 6.0.101), it's still using MSBuild 16.

Maybe that's a red herring but it seems suspicious, and I can reproduce the exact compiler error by reverting back to building against .NET 5.

@yazeedobaid
Copy link
Collaborator

@isaacabraham thanks for the update.
I have updated FAKE to latest .NET6 SDK version: 6.0.101 (#2635)
As you pointed out the MSBuild version after the update is 17 now.
Could you please update your branch from release/next

Thanks

@isaacabraham
Copy link
Contributor Author

Done

@yazeedobaid
Copy link
Collaborator

Thanks

@yazeedobaid yazeedobaid merged commit 986451a into fsprojects:release/next Jan 21, 2022
@isaacabraham isaacabraham deleted the sqlpackage-vs2022-support branch January 21, 2022 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SqlPackage doesn't work with VS2022
3 participants