question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VSCode uses MSBuild 14 instead of MSBuild 15 to build Visual Studio 2017 RC solution

See original GitHub issue

Environment data

dotnet --info output: .NET Command Line Tools (1.0.0-preview4-004233)

Product Information: Version: 1.0.0-preview4-004233 Commit SHA-1 hash: 8cec61c6f7

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

VS Code version: Version 1.8.1 Commit ee428b0eead68bf0fb99ab5fdc4439be227b6281 Date 2016-12-19T14:49:23.350Z Shell 1.4.6 Renderer 53.0.2785.143 Node 6.5.0

C# Extension version: ms-vscode.csharp-1.6.0-beta6

Steps to reproduce

Create .NET Core library project in Visual Studio 2017 RC Add XUnit Unit Tests project.

Expected behavior

Builds using MSBuild 15.0

Actual behavior

Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 20/12/2016 22:09:10.
Project "c:\Projects\PauloMorgado_GH\StateMachineExplorations\git\StateMachineExplorations.sln" on node 1 (build target(s)).
ValidateSolutionConfiguration:
  Building solution configuration "Debug|Any CPU".
Project "c:\Projects\PauloMorgado_GH\StateMachineExplorations\git\StateMachineExplorations.sln" (1) is building "c:\Projects\PauloMorgado_GH\StateMachineExplorations\git\src\StateMachineExplorations\StateMachineExplorations.csproj" (2) on node 1 (default targets).
c:\Projects\PauloMorgado_GH\StateMachineExplorations\git\src\StateMachineExplorations\StateMachineExplorations.csproj(31,52): error MSB4066: The attribute "Version" in element <PackageReference> is unrecognized.
Done Building Project "c:\Projects\PauloMorgado_GH\StateMachineExplorations\git\src\StateMachineExplorations\StateMachineExplorations.csproj" (default targets) -- FAILED.
Project "c:\Projects\PauloMorgado_GH\StateMachineExplorations\git\StateMachineExplorations.sln" (1) is building "c:\Projects\PauloMorgado_GH\StateMachineExplorations\git\tests\StateMachineExplorationTests\StateMachineExplorationTests.csproj" (3) on node 1 (default targets).
c:\Projects\PauloMorgado_GH\StateMachineExplorations\git\tests\StateMachineExplorationTests\StateMachineExplorationTests.csproj(25,37): error MSB4066: The attribute "Version" in element <PackageReference> is unrecognized.
Done Building Project "c:\Projects\PauloMorgado_GH\StateMachineExplorations\git\tests\StateMachineExplorationTests\StateMachineExplorationTests.csproj" (default targets) -- FAILED.
Done Building Project "c:\Projects\PauloMorgado_GH\StateMachineExplorations\git\StateMachineExplorations.sln" (build target(s)) -- FAILED.
Build FAILED.
"c:\Projects\PauloMorgado_GH\StateMachineExplorations\git\StateMachineExplorations.sln" (build target) (1) ->
"c:\Projects\PauloMorgado_GH\StateMachineExplorations\git\src\StateMachineExplorations\StateMachineExplorations.csproj" (default target) (2) ->
  c:\Projects\PauloMorgado_GH\StateMachineExplorations\git\src\StateMachineExplorations\StateMachineExplorations.csproj(31,52): error MSB4066: The attribute "Version" in element <PackageReference> is unrecognized.
"c:\Projects\PauloMorgado_GH\StateMachineExplorations\git\StateMachineExplorations.sln" (build target) (1) ->
"c:\Projects\PauloMorgado_GH\StateMachineExplorations\git\tests\StateMachineExplorationTests\StateMachineExplorationTests.csproj" (default target) (3) ->
  c:\Projects\PauloMorgado_GH\StateMachineExplorations\git\tests\StateMachineExplorationTests\StateMachineExplorationTests.csproj(25,37): error MSB4066: The attribute "Version" in element <PackageReference> is unrecognized.
    0 Warning(s)
    2 Error(s)
Time Elapsed 00:00:00.07

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
DustinCampbellcommented, Dec 21, 2016

Paulo, I’m going to close this for now because the original issue sounds like it’s solved. Feel free to file issues if you come across problems. We’re definitely interested in whatever can help make the extension better. Thanks!

2reactions
paulomorgadocommented, Dec 21, 2016

@DustinCampbell,

I created a solution on Visual Studio 2017 RC with a class library project and a XUnit unit test project.

Then I opened it in VSCode (after installing the latest beta of OmniSharp - 1.6.0-beta6).

Then I pressed Ctrl+Shift+B to build and it prompted me to configure the task runner and I chose MSBUILD.

The solution is here, if you want to take a look at it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I call Visual Studio 2017 RC's version of MSBuild from ...
Assuming you are using the default installation path, you could just recursively search for msbuild.exe under %ProgramFiles(x86)%\Microsoft ...
Read more >
Find and use a version of MSBuild - Microsoft Learn
In this article. Use Microsoft.Build.Locator; Change MSBuild references; Ensure output is clean; Add package reference for Microsoft.Build.
Read more >
Visual Studio - Wikipedia
Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs including websites, web apps, ...
Read more >
Can't find registry entries for Visual Studio 2017
Y, which made it easy to know which versions of Visual Studio were installed and the paths they were installed in. Installing VS2017RC...
Read more >
Some implications of the new modular setup of Visual Studio ...
Instead, the official approach is to use some interop assemblies ... BTW, you can download the MSBuild Tools for Visual Studio 2017 RC...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found