Skip to content

Conversation

@KevinRansom
Copy link
Contributor

@KevinRansom KevinRansom commented Sep 13, 2020

This PR fixes #10114

FSI uses reference assemblies for compilation purposes the same as the compiler, and relied on the built in msbuild resolver to find them. This had the disadvantage of requiring the developer to install them when using the desktop version of fsi.

Visual Studio dwfault install for the Managed Code workflow, causes the net472 reference assemblies to be loaded. So for any developer who goes for a clean install of VS, will have some trouble when using #r "nuget:blah" from the desktop fsi.

The best fix is to use the : Microsoft.NETFramework.ReferenceAssemblies package, because that will cause the nuget package manager to find the best reference assemblies for the build.

Which is what this change does, when using #r "nuget: we ensure that we go fetch the
Microsoft.NETFramework.ReferenceAssemblies package only when the targetframeworkidentity is .NETFramework.

We also disallow Microsoft.NETFramework.ReferenceAssemblies as a valid user supplied package, to stop developers innovating and perhaps causing problems.

Kevin

@KevinRansom KevinRansom reopened this Sep 13, 2020
@cartermp cartermp linked an issue Sep 13, 2020 that may be closed by this pull request
@cartermp cartermp merged commit 23b0b98 into dotnet:main Sep 14, 2020
KevinRansom added a commit that referenced this pull request Sep 14, 2020
* Bloody mutable fields (#10116)

* Fix 9150 --- #i nuget on desktop witout net48 ref assemblies fails. (#10114)

* signing (#10108)

Co-authored-by: Kevin Ransom (msft) <[email protected]>
@KevinRansom KevinRansom deleted the fix9150 branch October 29, 2020 18:57
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Feb 23, 2021
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Feb 23, 2021
* Bloody mutable fields (dotnet#10116)

* Fix 9150 --- #i nuget on desktop witout net48 ref assemblies fails. (dotnet#10114)

* signing (dotnet#10108)

Co-authored-by: Kevin Ransom (msft) <[email protected]>
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.

Desktop FSI #r nuget fails on preview build

2 participants