Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Commit bd6b554

Browse files
adalonkzu
authored andcommitted
Resetting the TF in the targets used by VS
TF must be empty to bypass the CpsPackageReferenceProjectProvider: https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Clients/NuGet.PackageManagement.VisualStudio/ProjectSystems/CpsPackageReferenceProjectProvider.cs and being correctly created by the LegacyCSProjPackageReferenceProjectProvider https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Clients/NuGet.PackageManagement.VisualStudio/ProjectSystems/LegacyCSProjPackageReferenceProjectProvider.cs The CPS-based provider can't be used because it's expecting the ProjectRestoreInfo stuff provided (only for now) by the Roslyn project system On the other hand, we MUST need the TF value when the project is being restored from cmd-line.
1 parent 4c70eef commit bd6b554

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/VisualStudio/NuGet.Packaging.VisualStudio/Targets/NuGet.Packaging.Authoring.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ Copyright (c) .NET Foundation. All rights reserved.
1616
<PropertyGroup>
1717
<ProjectSystemRulesDir Condition="'$(ProjectSystemRulesDir)' == ''">$(MSBuildThisFileDirectory)..\Rules\</ProjectSystemRulesDir>
1818
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
19-
<TargetFramework>netstandard1.0</TargetFramework>
19+
<!-- Inside Visual Studio, TF must be empty to bypass the CPS-based restore mechanism -->
20+
<TargetFramework></TargetFramework>
2021
<PackageTargetFallback>net11;net20;net35;net40;net403;net45;net451;net452;net46;net461;net462;netcore;netcore45;netcore451;netcore50;win8;win81;win10;sl4;sl5;wp;wp7;wp75;wp8;wp81;wpa81;uap;uap10;netstandard1.0;netstandard1.1;netstandard1.2;netstandard1.3;netstandard1.4;netstandard1.5;netstandard1.6;netstandard2.0;netcoreapp1.0;netcoreapp2.0;monoandroid;monotouch;monomac;xamarinios;xamarinmac;xamarinpsthree;xamarinpsfour;xamarinpsvita;xamarinwatchos;xamarintvos;xamarinxboxthreesixty;xamarinxboxone</PackageTargetFallback>
2122
</PropertyGroup>
2223

0 commit comments

Comments
 (0)