fsprojects / fsprojects/Paket

Unable to set up paket with visual studio for mac on macOS

Open
#3,594 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
F#
Stars
2.1k
Forks
528
Avg merge
1d 12m
Merged PRs (30d)
54

Description

Description

Unable to set up paket with visual studio for mac on macOS.

Repro steps
  1. Create a Xamarin.Forms blank project in visual studio for mac

  2. Download some nuget packages:
    Xamarin.Forms (already included by xamarin.forms project)
    Xamarin.Essentials (already included by xamarin.forms project)
    Newtonsoft.Json
    CompareNETObjects
    Microsoft.CSharp

  3. cd to the root of the project. run paket convert-from-nuget.

  4. run the Xamarin.Forms project

Expected behavior

The project should run with no problems.

Actual behavior

The project fails with the build error: "Xamarin.Forms targets have been imported multiple times. Please check your project file and remove the duplicate import(s) (XF001)"

Known workarounds

Show hidden files in project root. delete .vs folder. Go into obj folder for all projects. Delete XamarinApp.csproj.nuget.g.props, XamarinApp.csproj.nuget.g.targets files. Restart. Now the project will run.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with a Xamarin.Forms project and paket convert-from-nuget. Inspect the project file and generated XamarinApp.csproj.nuget.g.props and XamarinApp.csproj.nuget.g.targets files, including the .vs and obj folders. Done means the project builds and runs without the XF001 duplicate-import error without requiring manual deletion of generated files.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.