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

Make the templates compatible for FSharp.AutoComplete with VS2015 tooling #22

Closed
wants to merge 1 commit into from

Conversation

Vaub
Copy link

@Vaub Vaub commented Dec 21, 2015

Hello,

I had problems using the FSharp generator (or generating a .fsproj from VS/Xamarin) and Ionide on my Windows machine (no problem on OS X) both with VS Code and Atom (also with the Vim integration). FSharp.Autocomplete (for some reason, normal msbuild had no problems) could not process .fsproj files when using VS2015 since the targets checked for 2013.

Updated the templates. I ONLY tested manually the Console and the Class Library using http://yeoman.io/authoring/ instructions. I'm not sure how Yeoman works so maybe there's a better way.

Having fun so far with learning F#, but it seems that VS2015 is not well supported by many F# tooling.

If someone is interested, here's what FSharp.AutoComplete says without this condition:

{
    "Kind" : "project",
    "Data" : {
        "Project" : "d:\\Development\\fsharp\\sample\\sample.fsproj",
        "Files" : [],
        "Output" : "null",
        "References" : ["C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\FSharp\\.NETFramework\\v4.0\\4.4.0.0\\FSharp.Core.dll"],
        "Logs" : {
            "d:\\Development\\fsharp\\sample\\sample.fsproj" : "Microsoft.Build.Exceptions.InvalidProjectFileException: The value \"\" of the \"Project\" attribute in element <Import> is invalid. Parameter \"path\" cannot have zero length.  d:\\Development\\fsharp\\sample\\sample.fsproj\r\n   at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args)\r\n   at Microsoft.Build.Shared.ProjectErrorUtilities.VerifyThrowInvalidProject(Boolean condition, String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object arg0, Object arg1, Object arg2, Object arg3)\r\n   at Microsoft.Build.Evaluation.Evaluator`4.ExpandAndLoadImports(String directoryOfImportingFile, String importExpressionEscaped, ProjectImportElement importElement)\r\n   at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement)\r\n   at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)\r\n   at Microsoft.Build.Evaluation.Evaluator`4.Evaluate()\r\n   at Microsoft.Build.Evaluation.Evaluator`4.Evaluate(IEvaluatorData`4 data, ProjectRootElement root, ProjectLoadSettings loadSettings, Int32 maxNodeCount, PropertyDictionary`1 environmentProperties, ILoggingService loggingService, IItemFactory`2 itemFactory, IToolsetProvider toolsetProvider, ProjectRootElementCache projectRootElementCache, BuildEventContext buildEventContext, ProjectInstance projectInstanceIfAnyForDebuggerOnly)\r\n   at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation)\r\n   at Microsoft.Build.Evaluation.Project.CreateProjectInstance(ILoggingService loggingServiceForEvaluation, ProjectInstanceSettings settings)\r\n   at Microsoft.FSharp.Compiler.SourceCodeServices.ProjectCrackerTool.Program.projectInstanceFromFullPath@124(FSharpProjectFileInfo this, ProjectCollection engine, String fsprojFullPath)\r\n   at Microsoft.FSharp.Compiler.SourceCodeServices.ProjectCrackerTool.Program.FSharpProjectFileInfo.CrackProjectUsingNewBuildAPI(String fsprojFile)\r\n   at Microsoft.FSharp.Compiler.SourceCodeServices.ProjectCrackerTool.Program.FSharpProjectFileInfo..ctor(String fsprojFileName, FSharpOption`1 properties, FSharpOption`1 enableLogging)\r\n   at Microsoft.FSharp.Compiler.SourceCodeServices.ProjectCrackerTool.Program.getOptions@358(Boolean enableLogging, FSharpList`1 properties, String file)\r\n   at Microsoft.FSharp.Compiler.SourceCodeServices.ProjectCrackerTool.Program.getOptions(String file, Boolean enableLogging, FSharpList`1 properties)\r\n   at Microsoft.FSharp.Compiler.SourceCodeServices.ProjectCrackerTool.Program.main(String[] argv)"
        }
    }
}

@Krzysztof-Cieslak
Copy link
Contributor

Generally, it looks good to me. Just one thing - please make this PR to develop branch (templates folder) instead directly to templates branch. templates branch is meant to be "read-only" branch updated through FAKE build script by project maintainers.

@Vaub
Copy link
Author

Vaub commented Dec 22, 2015

Done, see #23

@Vaub Vaub closed this Dec 22, 2015
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.

2 participants