If I open corefxlab.sln in VS2017 15.6.4, I get a popup telling me that it is recommended that I use 15.7 for .NET Core 2.1 projects. If I open the same solution in 15.7 Preview 3.0, it wants to upgrade all the projects. After agreeing to do so, the projects all migrate but fail to load.
BTW: The project files are migrated to
-<EF><BB><BF><Project Sdk="Microsoft.NET.Sdk">
+<EF><BB><BF><Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\..\tools\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<OutputType>Exe</OutputType>
+ <FileUpgradeFlags>40</FileUpgradeFlags>
+ <UpgradeBackupLocation>D:\Repos\corefxlab\Backup3\samples\EchoService\</UpgradeBackupLocation>
+ <OldToolsVersion>2.0</OldToolsVersion>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\System.Net.Libuv\System.Net.Libuv.csproj" />
</ItemGroup>
</Project>
So question 1 is why is the solution requiring a migration to 15.7, but works without one in 15.6?
But back to all the projects that failed to load, if I try to manual reload them, I get something like
The SDK 'Microsoft.NET.Sdk' specified could not be found. D:\Repos\corefxlab\src\System.Azure.Experimental\System.Azure.Experimental.csproj
I don't have time right now to explore further, but wanted to see if anyone knew what was going on?
On 3fa7abfd50baafb7368746e573007a709744f822
Did you first run build.cmd from the command line (once)? That is required to install the dotnet cli.
Let me know if that works for you. Otherwise, I will try to reproduce your exact scenario.
build.cmd has now been run successfully. Now when I open the solution, all the projects say "need migration" (instead of doing the full migration right away) and when I try to load each one, I'm prompted to migrate each one, but ultimately I get the same error
The SDK 'Microsoft.NET.Sdk' specified could not be found. D:\Repos\corefxlab\src\System.Azure.Experimental\System.Azure.Experimental.csproj
I also moved ahead to 992826c806a9ac0e34c833d0d2340b42b6463e69
Can you share the VS version that you have please (copy and share Help > About Microsoft Visual Studio)? Did you chose all the relevant workloads to install as specified by https://github.com/dotnet/corefx/blob/master/Documentation/building/windows-instructions.md#visual-studio-2017?
I'm pretty sure I have everything installed. I didn't see any problems with the VS preview and the corefx repo.
Microsoft Visual Studio Enterprise 2017 Preview
Version 15.7.0 Preview 3.0
VisualStudio.15.Preview/15.7.0-pre.3.0+27604.0
Microsoft .NET Framework
Version 4.7.02556Installed Version: Enterprise
Visual C++ 2017 00369-60000-00001-AA064
Microsoft Visual C++ 2017C# Tools 2.8.0-beta3-62727-06. Commit Hash: bff1470cd9b1d44df8450e794bed97a64657c2a7
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.JavaScript Language Service 2.0
JavaScript Language ServiceMicrosoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual MachinesMicrosoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggersMicrosoft Visual C++ Wizards 1.0
Microsoft Visual C++ WizardsMicrosoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC PackageNuGet Package Manager 4.6.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed InfoVisual Basic Tools 2.8.0-beta3-62727-06. Commit Hash: bff1470cd9b1d44df8450e794bed97a64657c2a7
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
I'm pretty sure I have everything installed. I didn't see any problems with the VS preview and the
corefxrepo.
That is strange. I have not seen any project migration prompts or issues in the past. Let me make sure I understand your repro steps:
1) Clone the corefxlab repo.
2) Run build.cmd from the command line. Verify that the build succeeds.
3) Open corefxlab.sln in Visual Studio 2017.
And then you see project migration errors?
Are those the correct steps? I followed those steps and I can open and build all the projects in Visual Studio just fine.
Version 15.7.0 Preview 3.0
I tried with the same version.
Can you clone a clean repo (or run git clean -fdx), run build.cmd from the command line ones, and retry opening the solution in VS? Essentially get rid of previous bin/.vs folders, etc. If you are still seeing project migration prompts or errors, I would recommend filing an issue with Visual Studio.
Filed this with VS. I did a minimalistic install, only installing the individual components listed, so maybe something new is needed with 2.1? I did a command line install, so you can see the components installed in the filed issue.
OK, despite adding all the "Individual Components" listed, I tried just adding the workload ".NET Core cross-platform development" and now the solution loads fine. So there is some unlisted individual component(s) that was previously not needed (or didn't exist), but is now needed with 2.1.
@MisinformedDNA, anything left for this issue?
I do think it's still a problem as the instructions are not complete on what to install, leading to unnecessary roadblocks.
I think it would be useful to open an issue in corefx to update the "individual components" install section to include the necessary components that come from .NET Core cross-platform development.
Within this repo, the steps here mention the minimum workload to install: https://github.com/dotnet/corefxlab#building-and-testing
Make sure you have the .NET Core workload installed
Anything else that needs to be done, specific to this repo?