dotnet / fsharp

The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
https://dotnet.microsoft.com/languages/fsharp
MIT License
3.87k stars 780 forks source link

F# Intellisense is not initialized for net8.0-windows10.0.xxxxx #17440

Open vsfeedback opened 1 month ago

vsfeedback commented 1 month ago

This issue has been moved from a ticket on Developer Community.


Having F# project like this

<Project Sdk="Uno.Sdk">
  <PropertyGroup>
    <TargetFrameworks>$(DotNetVersion);$(DotNetVersion)-windows10.0.22621</TargetFrameworks>
    <TargetFrameworks Condition=" '$(OverrideTargetFramework)' != '' ">$(OverrideTargetFramework)</TargetFrameworks>

    <UnoSingleProject>true</UnoSingleProject>
    <OutputType>Library</OutputType>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>

    <!-- Ensures the .xr.xml files are generated in a proper layout folder -->
    <GenerateLibraryLayout>true</GenerateLibraryLayout>
    <!--
      If you encounter this error message:

        error NETSDK1148: A referenced assembly was compiled using a newer version of Microsoft.Windows.SDK.NET.dll.
        Please update to a newer .NET SDK in order to reference this assembly.

      This means that the two packages below must be aligned with the "build" version number of
      the "Microsoft.Windows.SDK.BuildTools" package above, and the "revision" version number
      must be the highest found in https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref.
    -->
    <!-- <WindowsSdkPackageVersion>10.0.22621.31</WindowsSdkPackageVersion> -->

  </PropertyGroup>
  <Target Name="XamlPreCompile" Condition="$(TargetFramework.Contains('windows10'))" />
</Project>

global.json

{
  "msbuild-sdks": {
    "Uno.Sdk": "5.2.175"
  }
}

solution-config.props

<Project>
  <!--
        This file is used to control the platforms compiled by Visual Studio, and allow for a faster
        build when testing for a single platform. This will also result in better intellisense, as
        the compiler will only load the assemblies for the platform that is being built. You do not
        need to use this when compiling from Visual Studio Code, the command line or other IDEs.

        Instructions:
        1) Copy this file and remove the ".sample" name
        2) Uncomment the single property below for the target you want to build
        3) Make sure to do a Rebuild, so that nuget restores the proper packages for the new target

        Notes:
        - You may optionally close the solution before making changes and reload the solution afterwards. This will avoid Visual Studio
          asking you to reload any projects, it will also ensure that the changes are picked up by Visual Studio, and trigger a restore of
          the packages.
        - You may want to unload the platform heads that you are not going to build for. This will ensure that Visual Studio does not
          try to build them, and will speed up the build process.
    -->

  <PropertyGroup>
    <!-- Uncomment each line for each platform that you want to build: -->

    <OverrideTargetFramework Condition="''!='hint: Windows App Sdk (WinUI)'">$(DotNetVersion)-windows10.0.22621</OverrideTargetFramework>
    <!--<OverrideTargetFramework Condition="''!='hint: Windows App Sdk (WinUI)' AND '$(MSBuildProjectExtension)'=='.csproj'">$(DotNetVersion)-browserwasm;$(DotNetVersion)-windows10.0.22621</OverrideTargetFramework>
    <OverrideTargetFramework Condition="''!='hint: Windows App Sdk (WinUI)' AND '$(MSBuildProjectExtension)'=='.fsproj'">$(DotNetVersion);$(DotNetVersion)-windows10.0.22621</OverrideTargetFramework>-->
    <!-- <OverrideTargetFramework Condition="''!='hint: Webassembly' AND '$(MSBuildProjectExtension)'=='.csproj'">$(DotNetVersion)-browserwasm</OverrideTargetFramework> -->
    <!-- <OverrideTargetFramework Condition="''!='hint: Webassembly' AND '$(MSBuildProjectExtension)'=='.fsproj'">$(DotNetVersion)</OverrideTargetFramework> -->
    <!-- <OverrideTargetFramework Condition="''!='hint: Desktop'">$(DotNetVersion)-desktop</OverrideTargetFramework> -->
    <!-- <OverrideTargetFramework Condition="''!='hint: iOS'">$(DotNetVersion)-ios</OverrideTargetFramework> -->
     <!--<OverrideTargetFramework Condition="''!='hint: Android'">$(DotNetVersion)-android</OverrideTargetFramework>-->
    <!-- <OverrideTargetFramework Condition="''!='hint: MacCatalyst'">$(DotNetVersion)-maccatalyst</OverrideTargetFramework> -->
  </PropertyGroup>
</Project>

Original Comments

Feedback Bot on 7/10/2024, 03:35 AM:

(private comment, text removed)


Original Solutions

(no solutions)

vzarytovskii commented 1 month ago

Nothing unusual in prism, session looks ok (unless it's reported from separate session).

xperiandri commented 6 days ago

You can try cloning this repo https://github.com/Ecierge/Elmish.Uno/tree/Ecierge And opening either Elmish.Uno.sln or Samples.sln

But in order to experience the problem immediately it is better to replace this line https://github.com/Ecierge/Elmish.Uno/blob/3c09b43ee22297151ee09ae1c463f864adcb6721/src/Elmish.Uno/Elmish.Uno.fsproj#L3 with <TargetFrameworks>$(DotNetVersion)-windows10.0.22621</TargetFrameworks> Use windows10.0.22621 whatever Windows SDK you have installed, it does not matter for the issue to appear

xperiandri commented 6 days ago

https://github.com/user-attachments/assets/e9009693-404a-4ab3-a616-78b770e13a40