dotnet / cli-migrate

MIT License
9 stars 15 forks source link

[MIGRATION]: Warnings & errors building MoreLINQ post migration #46

Open livarcocc opened 7 years ago

livarcocc commented 7 years ago

From @atifaziz on March 9, 2017 9:16

Setup

I started by cloning the MoreLINQ repo:

git clone https://github.com/morelinq/MoreLINQ.git`

The default branch, master, was at morelinq/MoreLINQ@dbad4803bedfef69f6a27cd897d0a4b2a66ce491 at time of reporting this issue. Next I ran dotnet --info:

.NET Command Line Tools (1.0.0-preview2-003131)

Product Information:
 Version:            1.0.0-preview2-003131
 Commit SHA-1 hash:  635cf40e58

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10586
 OS Platform: Windows
 RID:         win10-x64

I updated global.json and changed the SDK version from 1.0.0-preview2-003131 to 1.0.0:

diff --git a/global.json b/global.json
index 7d9a70b..16bbe9d 100644
--- a/global.json
+++ b/global.json
@@ -4,6 +4,6 @@
         "MoreLinq.Test"
     ],
     "sdk": {
-        "version": "1.0.0-preview2-003131"
+        "version": "1.0.0"
     }
 }
\ No newline at end of file

I ran dotnet --info again to check that dotnet was indeed reflecting the new SDK version from global.json and it was:

.NET Command Line Tools (1.0.0)

Product Information:
 Version:            1.0.0
 Commit SHA-1 hash:  e53429feb4

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10586
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\1.0.0

Migration

I ran the migration:

dotnet migrate

All seemed to have gone well:

Project MoreLinq migration succeeded (B:\MoreLinq).

Project MoreLinq.Test migration succeeded (B:\MoreLinq.Test).
Summary
Total Projects: 2
Succeeded Projects: 2
Failed Projects: 0

The project migration has finished. Please visit https://aka.ms/coremigration to report any issues you've encountered or ask for help.
Files backed up to B:\backup\

Expected Behavior

I expected the migration to succeed with the process touching the solution, *.xproj & project.json files.

Actual behavior

The migration deleted global.json:

On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    deleted:    MoreLinq.Test/MoreLinq.Test.xproj
    deleted:    MoreLinq.Test/project.json
    modified:   MoreLinq.sln
    deleted:    MoreLinq/MoreLinq.xproj
    deleted:    MoreLinq/project.json
    deleted:    global.json

Untracked files:
  (use "git add <file>..." to include in what will be committed)

    MoreLinq.Test/MoreLinq.Test.csproj
    MoreLinq/MoreLinq.csproj
    backup/

no changes added to commit (use "git add" and/or "git commit -a")

Is that normal? How does one pin the SDK version to guard against future incompatible versions?

Restoring

I ran a restore:

dotnet restore

Expected behavior

I expected packages for all projects to be restored.

Actual behavior

It failed:

MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.

However MoreLinq.sln was there in the same directory so the error was a surprise.

Restoring Take 2

I ran a restore specifying the solution file explicitly:

dotnet restore MoreLinq.sln

Expected behavior

I expected packages for all projects to be restored.

Actual behavior

While restoring succeeded, it did so with many warnings about packages being downgraded:

  Restoring packages for B:\MoreLinq.Test\MoreLinq.Test.csproj...
  Restoring packages for B:\MoreLinq\MoreLinq.csproj...
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning : Detected package downgrade: System.Collections from 4.3.0 to 4.0.11  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq (>= 2.3.0) -> NETStandard.Library (>= 1.6.1) -> System.Collections (>= 4.3.0)  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq (>= 2.3.0) -> System.Collections (>= 4.0.11) [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning : Detected package downgrade: System.Diagnostics.Debug from 4.3.0 to 4.0.11  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq (>= 2.3.0) -> NETStandard.Library (>= 1.6.1) -> System.Diagnostics.Debug (>= 4.3.0)  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq (>= 2.3.0) -> System.Diagnostics.Debug (>= 4.0.11) [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning : Detected package downgrade: System.Linq from 4.3.0 to 4.1.0  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq (>= 2.3.0) -> NETStandard.Library (>= 1.6.1) -> System.Linq (>= 4.3.0)  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq (>= 2.3.0) -> System.Linq (>= 4.1.0) [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning : Detected package downgrade: System.Resources.ResourceManager from 4.3.0 to 4.0.1  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq (>= 2.3.0) -> NETStandard.Library (>= 1.6.1) -> System.Resources.ResourceManager (>= 4.3.0)  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq (>= 2.3.0) -> System.Resources.ResourceManager (>= 4.0.1) [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning : Detected package downgrade: System.Runtime.Extensions from 4.3.0 to 4.1.0  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq (>= 2.3.0) -> NETStandard.Library (>= 1.6.1) -> System.Runtime.Extensions (>= 4.3.0)  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq (>= 2.3.0) -> System.Runtime.Extensions (>= 4.1.0) [B:\MoreLinq.sln]
  Lock file has not changed. Skipping lock file write. Path: B:\MoreLinq\obj\project.assets.json
  Restore completed in 208.55 ms for B:\MoreLinq\MoreLinq.csproj.
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning : Detected package downgrade: System.Collections from 4.3.0 to 4.0.11  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq.Test (>= 2.0.0) -> MoreLinq (>= 2.3.0) -> NETStandard.Library (>= 1.6.1) -> System.Collections (>= 4.3.0)  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq.Test (>= 2.0.0) -> MoreLinq (>= 2.3.0) -> System.Collections (>= 4.0.11) [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning : Detected package downgrade: System.Diagnostics.Debug from 4.3.0 to 4.0.11  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq.Test (>= 2.0.0) -> MoreLinq (>= 2.3.0) -> NETStandard.Library (>= 1.6.1) -> System.Diagnostics.Debug (>= 4.3.0)  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq.Test (>= 2.0.0) -> MoreLinq (>= 2.3.0) -> System.Diagnostics.Debug (>= 4.0.11) [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning : Detected package downgrade: System.Linq from 4.3.0 to 4.1.0  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq.Test (>= 2.0.0) -> MoreLinq (>= 2.3.0) -> NETStandard.Library (>= 1.6.1) -> System.Linq (>= 4.3.0)  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq.Test (>= 2.0.0) -> MoreLinq (>= 2.3.0) -> System.Linq (>= 4.1.0) [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning : Detected package downgrade: System.Resources.ResourceManager from 4.3.0 to 4.0.1  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq.Test (>= 2.0.0) -> MoreLinq (>= 2.3.0) -> NETStandard.Library (>= 1.6.1) -> System.Resources.ResourceManager (>= 4.3.0)  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq.Test (>= 2.0.0) -> MoreLinq (>= 2.3.0) -> System.Resources.ResourceManager (>= 4.0.1) [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning : Detected package downgrade: System.Runtime.Extensions from 4.3.0 to 4.1.0  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq.Test (>= 2.0.0) -> MoreLinq (>= 2.3.0) -> NETStandard.Library (>= 1.6.1) -> System.Runtime.Extensions (>= 4.3.0)  [B:\MoreLinq.sln]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): warning :  MoreLinq.Test (>= 2.0.0) -> MoreLinq (>= 2.3.0) -> System.Runtime.Extensions (>= 4.1.0) [B:\MoreLinq.sln]
  Lock file has not changed. Skipping lock file write. Path: B:\MoreLinq.Test\obj\project.assets.json
  Restore completed in 1.03 sec for B:\MoreLinq.Test\MoreLinq.Test.csproj.

  NuGet Config files used:
      C:\Users\atif\AppData\Roaming\NuGet\NuGet.Config
      C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config

  Feeds used:
      https://api.nuget.org/v3/index.json
      C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\

Building

I ran a build as follows (I specified the solution file explicitly because like with dotnet restore, dotnet build alone failed with the error MSB1003):

dotnet build MoreLinq.sln

Expected behavior

I expected the build to succeed with errors or warnings.

Actual behavior

The build failed with 1 warning, and more importantly, 19 errors:

Microsoft (R) Build Engine version 15.1.548.43366
Copyright (C) Microsoft Corporation. All rights reserved.

C:\Program Files\dotnet\sdk\1.0.0\Microsoft.Common.CurrentVersion.targets(1111,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v3.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [B:\MoreLinq\MoreLinq.csproj]
  MoreLinq -> B:\MoreLinq\bin\Debug\netstandard1.0\MoreLinq.dll
C:\Program Files\dotnet\sdk\1.0.0\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed. [B:\MoreLinq.Test\MoreLinq.Test.csproj]
AssertCountTest.cs(30,32): error CS0117: 'MoreEnumerable' does not contain a definition for 'AssertCount' [B:\MoreLinq.Test\MoreLinq.Test.csproj]
AssertCountTest.cs(37,31): error CS1061: 'object[]' does not contain a definition for 'AssertCount' and no extension method 'AssertCount' accepting a first argument of type 'object[]' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
AssertCountTest.cs(43,47): error CS1061: 'IEnumerable<string>' does not contain a definition for 'AssertCount' and no extension method 'AssertCount' accepting a first argument of type 'IEnumerable<string>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
AssertCountTest.cs(50,51): error CS1061: 'IEnumerable<string>' does not contain a definition for 'AssertCount' and no extension method 'AssertCount' accepting a first argument of type 'IEnumerable<string>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
AssertCountTest.cs(57,51): error CS1061: 'IEnumerable<string>' does not contain a definition for 'AssertCount' and no extension method 'AssertCount' accepting a first argument of type 'IEnumerable<string>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
AssertCountTest.cs(67,24): error CS1061: 'IEnumerable<string>' does not contain a definition for 'AssertCount' and no extension method 'AssertCount' accepting a first argument of type 'IEnumerable<string>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
AssertCountTest.cs(76,24): error CS1061: 'IEnumerable<string>' does not contain a definition for 'AssertCount' and no extension method 'AssertCount' accepting a first argument of type 'IEnumerable<string>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
AssertCountTest.cs(91,51): error CS1061: 'IEnumerable<string>' does not contain a definition for 'AssertCount' and no extension method 'AssertCount' accepting a first argument of type 'IEnumerable<string>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
AssertCountTest.cs(106,51): error CS1061: 'IEnumerable<string>' does not contain a definition for 'AssertCount' and no extension method 'AssertCount' accepting a first argument of type 'IEnumerable<string>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
AssertCountTest.cs(131,44): error CS1061: 'BreakingSequence<object>' does not contain a definition for 'AssertCount' and no extension method 'AssertCount' accepting a first argument of type 'BreakingSequence<object>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
InterleaveTest.cs(173,56): error CS1061: 'IEnumerable<int>' does not contain a definition for 'AsVerifiable' and no extension method 'AsVerifiable' accepting a first argument of type 'IEnumerable<int>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
InterleaveTest.cs(174,60): error CS1061: 'IEnumerable<int>' does not contain a definition for 'AsVerifiable' and no extension method 'AsVerifiable' accepting a first argument of type 'IEnumerable<int>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
InterleaveTest.cs(175,60): error CS1061: 'IEnumerable<int>' does not contain a definition for 'AsVerifiable' and no extension method 'AsVerifiable' accepting a first argument of type 'IEnumerable<int>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
InterleaveTest.cs(176,52): error CS1061: 'IEnumerable<int>' does not contain a definition for 'AsVerifiable' and no extension method 'AsVerifiable' accepting a first argument of type 'IEnumerable<int>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
SortedMergeTest.cs(201,56): error CS1061: 'IEnumerable<int>' does not contain a definition for 'AsVerifiable' and no extension method 'AsVerifiable' accepting a first argument of type 'IEnumerable<int>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
SortedMergeTest.cs(202,60): error CS1061: 'IEnumerable<int>' does not contain a definition for 'AsVerifiable' and no extension method 'AsVerifiable' accepting a first argument of type 'IEnumerable<int>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
SortedMergeTest.cs(203,60): error CS1061: 'IEnumerable<int>' does not contain a definition for 'AsVerifiable' and no extension method 'AsVerifiable' accepting a first argument of type 'IEnumerable<int>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
SortedMergeTest.cs(204,52): error CS1061: 'IEnumerable<int>' does not contain a definition for 'AsVerifiable' and no extension method 'AsVerifiable' accepting a first argument of type 'IEnumerable<int>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]

Build FAILED.

C:\Program Files\dotnet\sdk\1.0.0\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed. [B:\MoreLinq.Test\MoreLinq.Test.csproj]
C:\Program Files\dotnet\sdk\1.0.0\Microsoft.Common.CurrentVersion.targets(1111,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v3.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [B:\MoreLinq\MoreLinq.csproj]
AssertCountTest.cs(30,32): error CS0117: 'MoreEnumerable' does not contain a definition for 'AssertCount' [B:\MoreLinq.Test\MoreLinq.Test.csproj]
AssertCountTest.cs(37,31): error CS1061: 'object[]' does not contain a definition for 'AssertCount' and no extension method 'AssertCount' accepting a first argument of type 'object[]' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
AssertCountTest.cs(43,47): error CS1061: 'IEnumerable<string>' does not contain a definition for 'AssertCount' and no extension method 'AssertCount' accepting a first argument of type 'IEnumerable<string>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
AssertCountTest.cs(50,51): error CS1061: 'IEnumerable<string>' does not contain a definition for 'AssertCount' and no extension method 'AssertCount' accepting a first argument of type 'IEnumerable<string>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
AssertCountTest.cs(57,51): error CS1061: 'IEnumerable<string>' does not contain a definition for 'AssertCount' and no extension method 'AssertCount' accepting a first argument of type 'IEnumerable<string>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
AssertCountTest.cs(67,24): error CS1061: 'IEnumerable<string>' does not contain a definition for 'AssertCount' and no extension method 'AssertCount' accepting a first argument of type 'IEnumerable<string>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
AssertCountTest.cs(76,24): error CS1061: 'IEnumerable<string>' does not contain a definition for 'AssertCount' and no extension method 'AssertCount' accepting a first argument of type 'IEnumerable<string>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
AssertCountTest.cs(91,51): error CS1061: 'IEnumerable<string>' does not contain a definition for 'AssertCount' and no extension method 'AssertCount' accepting a first argument of type 'IEnumerable<string>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
AssertCountTest.cs(106,51): error CS1061: 'IEnumerable<string>' does not contain a definition for 'AssertCount' and no extension method 'AssertCount' accepting a first argument of type 'IEnumerable<string>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
AssertCountTest.cs(131,44): error CS1061: 'BreakingSequence<object>' does not contain a definition for 'AssertCount' and no extension method 'AssertCount' accepting a first argument of type 'BreakingSequence<object>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
InterleaveTest.cs(173,56): error CS1061: 'IEnumerable<int>' does not contain a definition for 'AsVerifiable' and no extension method 'AsVerifiable' accepting a first argument of type 'IEnumerable<int>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
InterleaveTest.cs(174,60): error CS1061: 'IEnumerable<int>' does not contain a definition for 'AsVerifiable' and no extension method 'AsVerifiable' accepting a first argument of type 'IEnumerable<int>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
InterleaveTest.cs(175,60): error CS1061: 'IEnumerable<int>' does not contain a definition for 'AsVerifiable' and no extension method 'AsVerifiable' accepting a first argument of type 'IEnumerable<int>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
InterleaveTest.cs(176,52): error CS1061: 'IEnumerable<int>' does not contain a definition for 'AsVerifiable' and no extension method 'AsVerifiable' accepting a first argument of type 'IEnumerable<int>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
SortedMergeTest.cs(201,56): error CS1061: 'IEnumerable<int>' does not contain a definition for 'AsVerifiable' and no extension method 'AsVerifiable' accepting a first argument of type 'IEnumerable<int>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
SortedMergeTest.cs(202,60): error CS1061: 'IEnumerable<int>' does not contain a definition for 'AsVerifiable' and no extension method 'AsVerifiable' accepting a first argument of type 'IEnumerable<int>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
SortedMergeTest.cs(203,60): error CS1061: 'IEnumerable<int>' does not contain a definition for 'AsVerifiable' and no extension method 'AsVerifiable' accepting a first argument of type 'IEnumerable<int>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
SortedMergeTest.cs(204,52): error CS1061: 'IEnumerable<int>' does not contain a definition for 'AsVerifiable' and no extension method 'AsVerifiable' accepting a first argument of type 'IEnumerable<int>' could be found (are you missing a using directive or an assembly reference?) [B:\MoreLinq.Test\MoreLinq.Test.csproj]
    1 Warning(s)
    19 Error(s)

Time Elapsed 00:00:06.86

Environment

dotnet --info output supplied earlier.

I also have Visual Studio 2017 Enterprise installed (output below from Get-VSSetupInstance):

InstanceId          : 86b28833
DisplayName         : Visual Studio Enterprise 2017
InstallationVersion : 15.0.26228.4
InstallationPath    : C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise
InstallDate         : 08/03/2017 08:35:42

/cc @blackdwarf @livarcocc

Copied from original issue: dotnet/cli#5973

livarcocc commented 7 years ago

From @atifaziz on March 23, 2017 16:40

(bump)

livarcocc commented 7 years ago

From @joelharkes on April 14, 2017 8:32

Got same issue here running dotnet build -f net35

C:\Program Files\dotnet\sdk\1.0.3\Microsoft.Common.CurrentVersion.targets(1111,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v3.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

dotnet info

.NET Command Line Tools (1.0.3)

Product Information:
 Version:            1.0.3
 Commit SHA-1 hash:  37224c9917

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14393
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\1.0.3

running msbuild /p:TargetFramework=net35 works though, is this fixed in a newer sdk version?

joelharkes commented 7 years ago

See:

This might fix simple solutions

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net35</TargetFramework>
    <!-- Fix dotnet build for net35 -->
    <FrameworkPathOverride Condition="'$(TargetFramework)' == 'net35'">C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client</FrameworkPathOverride>
  </PropertyGroup>
</Project>

Otherwise the only solution you can use is: msbuild /p:TargetFramework=net35

This issue may be closed again. (this message is just for reference)

atifaziz commented 7 years ago

@joelharkes I believe that helps on Windows but not on other platforms.

joelharkes commented 7 years ago

@atifaziz am i missing something or are you not going to build dotnet 35 Full framework on any other OS than windows? (excluding non advised mono maybe).

atifaziz commented 7 years ago

@joelharkes We are targeting .NET 3.5 on non-Windows platforms using Mono.

joelharkes commented 7 years ago

Then check where you can find the Dotnet 3.5 framework in mono possibly make a variable for it and use: $(Dotnet35Dir)/Profile/Client

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net35</TargetFramework>
    <FrameworkLocation>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5</FrameworkLocation>
    <!-- Fix dotnet build for net35 -->
    <FrameworkPathOverride Condition="'$(TargetFramework)' == 'net35'">$(FrameworkLocation)\Profile\Client</FrameworkPathOverride>
  </PropertyGroup>
</Project>