Giter Club home page Giter Club logo

Comments (8)

rneatherway avatar rneatherway commented on June 30, 2024
  1. Which version of fsautocomplete are you using?
  2. Which versions of VS do you have installed, and which did you use to create this project file?
  3. Please can you post the whole project file so I can try to reproduce?

from fsautocomplete.

lulu-berlin avatar lulu-berlin commented on June 30, 2024

Hello @rneatherway :) Thank you for the quick reply.

  1. I'm using version 0.23.0 of fsautocomplete. EDIT: I checked and it doesn't work on 0.24.1 either.
  2. Visual Studio Community 2015, Version 14.0.23107.0
  3. The project file is nothing more than the fs file given above, used inside a template project (Visual F#: Console Application).
    Here is a copy-paste:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>ed7b037a-ea4f-4892-aa77-5595939ae3f7</ProjectGuid>
    <OutputType>Exe</OutputType>
    <RootNamespace>FsAutoComplete_repro</RootNamespace>
    <AssemblyName>FsAutoComplete_repro</AssemblyName>
    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
    <TargetFSharpCoreVersion>4.4.0.0</TargetFSharpCoreVersion>
    <Name>FsAutoComplete-repro</Name>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <Tailcalls>false</Tailcalls>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <WarningLevel>3</WarningLevel>
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DocumentationFile>bin\Debug\FsAutoComplete_repro.XML</DocumentationFile>
    <Prefer32Bit>true</Prefer32Bit>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <Tailcalls>true</Tailcalls>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <WarningLevel>3</WarningLevel>
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DocumentationFile>bin\Release\FsAutoComplete_repro.XML</DocumentationFile>
    <Prefer32Bit>true</Prefer32Bit>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="mscorlib" />
    <Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
      <Private>True</Private>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Numerics" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="AssemblyInfo.fs" />
    <Compile Include="Program.fs" />
    <None Include="App.config" />
  </ItemGroup>
  <PropertyGroup>
    <MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
  </PropertyGroup>
  <Choose>
    <When Condition="'$(VisualStudioVersion)' == '11.0'">
      <PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')">
        <FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
      </PropertyGroup>
    </When>
    <Otherwise>
      <PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets')">
        <FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
      </PropertyGroup>
    </Otherwise>
  </Choose>
  <Import Project="$(FSharpTargetsPath)" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>

from fsautocomplete.

lulu-berlin avatar lulu-berlin commented on June 30, 2024

Note that it compiles fine with fsc and with MSBuild from the command line.
Also, the same error occurs in fsautocomplete even if I don't provide a project file:

fsautocomplete.exe
parse "Project.fs"
module M
open System.Diagnostics
let p = Process.GetProcessesByName "fsi"
<<EOF>>
{"Kind":"info","Data":"Background parsing started"}
{"Kind":"errors","Data":[{"FileName":"D:\\Code\\fsharp-repro\\FsAutoComplete-repro\\Project.fs","StartLine":2,"EndLine":2,"StartColumn":9,"EndColumn":16,"Severity":"Error","Message":"The namespace or module 'Process' is not defined","Subcategory":"typecheck"}]}

But no error if I try to use, for instance, System.Console.WriteLine:

fsautocomplete.exe
parse "Project.fs"
module M
open System
System.Console.WriteLine "hello world"
<<EOF>>
{"Kind":"info","Data":"Background parsing started"}
{"Kind":"errors","Data":[]}

from fsautocomplete.

rneatherway avatar rneatherway commented on June 30, 2024

Can you paste the output of the compilation from the command line, most importantly the arguments given to fsc by msbuild.

from fsautocomplete.

lulu-berlin avatar lulu-berlin commented on June 30, 2024
Microsoft (R) Build Engine version 14.0.23107.0
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 30/09/2015 12:34:08.
Project "D:\Code\fsharp-repro\FsAutoComplete-repro\FsAutoComplete-repro.fsproj" on node 1 (default targets).
GenerateBindingRedirects:
  No suggested binding redirects from ResolveAssemblyReferences.
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreCompile:
  C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\fsc.exe -o:obj\Debug\FsAutoComplete_repro.exe -g --debug:full --noframework --define:DEBUG --define:TRACE --doc:bin\Debug\FsAutoComplete_repro.XML --optimize- --tailcalls- --platform:anycpu32bitpreferred -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.4.0.0\FSharp.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\mscorlib.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Numerics.dll" --target:exe --warn:3 --warnaserror:76 --fullpaths --flaterrors --subsystemversion:6.00 --highentropyva+ "D:\cygwin64\tmp\.NETFramework,Version=v4.5.2.AssemblyAttributes.fs" AssemblyInfo.fs Program.fs
_CopyFilesMarkedCopyLocal:
  Copying file from "C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.4.0.0\FSharp.Core.dll" to "bin\Debug\FSharp.Core.dll".
  Copying file from "C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.4.0.0\FSharp.Core.xml" to "bin\Debug\FSharp.Core.xml".
_CopyAppConfigFile:
  Copying file from "App.config" to "bin\Debug\FsAutoComplete_repro.exe.config".
CopyFilesToOutputDirectory:
  Copying file from "obj\Debug\FsAutoComplete_repro.exe" to "bin\Debug\FsAutoComplete_repro.exe".
  FsAutoComplete-repro -> D:\Code\fsharp-repro\FsAutoComplete-repro\bin\Debug\FsAutoComplete_repro.exe
  Copying file from "obj\Debug\FsAutoComplete_repro.pdb" to "bin\Debug\FsAutoComplete_repro.pdb".
Done Building Project "D:\Code\fsharp-repro\FsAutoComplete-repro\FsAutoComplete-repro.fsproj" (default targets).

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.58

But a simple call to fsc Program.fs succeeds just as well.

from fsautocomplete.

rneatherway avatar rneatherway commented on June 30, 2024

OK, it does seem like a bug. I will have to try to reproduce in my VM, I'll post back here once I learn something. In the meantime, if you want to keep using VIM, I could recommend a few ideas that might help:

  1. Try lowering the .NET Framework version to 4.5
  2. Find a project file generated by VS2013 (there are examples in the http://github.com/fsharp/fsharp repo among other places)
  3. Generate a project file using http://github.com/fsprojects/projekt

from fsautocomplete.

rneatherway avatar rneatherway commented on June 30, 2024

@yever I reproduced this using your project file. When I enabled more logging, I found that the issue was the absence of the App.config file referenced by the project. After I removed that entry from the project file, I received the following output:

{"Kind":"project","Data":{"Project":"C:\\Users\\test\\FsAutoComplete\\test.fspro
j","Files":["C:\\Users\\test\\FsAutoComplete\\AssemblyInfo.fs","C:\\Users\\test\
\FsAutoComplete\\Program.fs"],"Output":"C:\\Users\\test\\FsAutoComplete\\bin\\De
bug\\FsAutoComplete_repro.exe","References":["C:\\Program Files (x86)\\Reference
 Assemblies\\Microsoft\\FSharp\\.NETFramework\\v4.0\\4.4.0.0\\FSharp.Core.dll","
C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramewo
rk\\v4.5.2\\System.Core.dll","C:\\Program Files (x86)\\Reference Assemblies\\Mic
rosoft\\Framework\\.NETFramework\\v4.5.2\\System.Numerics.dll","C:\\Program File
s (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.5.2\\Syst
em.dll","C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.N
ETFramework\\v4.5.2\\mscorlib.dll"],"Framework":"v4.5.2"}}

from fsautocomplete.

rneatherway avatar rneatherway commented on June 30, 2024

@yever as far as I can tell this is just a problem due to the missing AssemblyInfo.fs, so closing for now. If that isn't the case let me know.

from fsautocomplete.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.