Sitelet https://github.com/fsprojects/Paket/issues/3837
Skip to content

csproj file is no longer updated after upgrading project's ToolsVersion #3837

Description

@peter-f-s

Description

when running paket install, the references in my project files (csproj) are updated according to the paket.references file. This worked fine as long as I was working with Visual Studio 2017 (the projects have set ToolsVersion="15.0").
After upgrading to Visual Studio 2019 (ToolsVersion="16.0"), paket ignores changes in the paket.references file. The references in the projects are staying the same when doing a paket install. However, paket touches the project file (it moves the import directive to Paket.Restore.targets to another location in the file).

Repro steps

paket.dependencies:

source https://api.nuget.org/v3/index.json
framework: net48

nuget StreamJsonRpc
nuget NUnit

paket.references:

StreamJsonRpc

csproj file beginning like this:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

Expected behavior

When I change the paket.references file (e.g. adding NUnit), I expect that a reference to NUnit is added to the project when I run paket install.
(This is actually the case when the csproj's ToolsVersion="15.0")

Actual behavior

The reference added to paket.references file is not added to the csproj file.
Removing references also doesn't work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions