Skip to content

Instantly share code, notes, and snippets.

@refactorsaurusrex
Last active March 13, 2018 20:41
Show Gist options
  • Save refactorsaurusrex/e98b8a1ac154e1e0ccea73c24a072fc0 to your computer and use it in GitHub Desktop.
Save refactorsaurusrex/e98b8a1ac154e1e0ccea73c24a072fc0 to your computer and use it in GitHub Desktop.

Revisions

  1. refactorsaurusrex renamed this gist Dec 3, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. refactorsaurusrex revised this gist Dec 3, 2017. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,9 @@ Scanning for projects...
    MSBuild auto-detection: using msbuild version '15.4.8.50001' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\
    Enterprise\MSBuild\15.0\bin'.
    The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\Roslyn\
    Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\Microsoft.CSharp.CurrentVersion.targets
    Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the <Import> declaration is correct,
    and that the file exists on disk. C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\
    Microsoft.CSharp.CurrentVersion.targets
    ```

    Eventually I saw that the auto-detected version of MSBuild was withinin an `Enterprise` Visual Studio directory. I do not have an Enterprise version of Visual Studio installed, so I tried running this command instead:
  3. refactorsaurusrex revised this gist Dec 3, 2017. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,10 @@ When running `nuget update 'some.solution.sln' -id 'Some.Package.Id'` yesterday,

    ```
    Scanning for projects...
    MSBuild auto-detection: using msbuild version '15.4.8.50001' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin'.
    The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\Roslyn\Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\Microsoft.CSharp.CurrentVersion.targets
    MSBuild auto-detection: using msbuild version '15.4.8.50001' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\
    Enterprise\MSBuild\15.0\bin'.
    The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\Roslyn\
    Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\Microsoft.CSharp.CurrentVersion.targets
    ```

    Eventually I saw that the auto-detected version of MSBuild was withinin an `Enterprise` Visual Studio directory. I do not have an Enterprise version of Visual Studio installed, so I tried running this command instead:
  4. refactorsaurusrex created this gist Dec 3, 2017.
    13 changes: 13 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    When running `nuget update 'some.solution.sln' -id 'Some.Package.Id'` yesterday, I got the following error:

    ```
    Scanning for projects...
    MSBuild auto-detection: using msbuild version '15.4.8.50001' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin'.
    The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\Roslyn\Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\Microsoft.CSharp.CurrentVersion.targets
    ```

    Eventually I saw that the auto-detected version of MSBuild was withinin an `Enterprise` Visual Studio directory. I do not have an Enterprise version of Visual Studio installed, so I tried running this command instead:

    `nuget update 'some.solution.sln' -id 'Some.Package.Id' -MSBuildPath 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\amd64'`

    Notice that the path above has 'Professional' in it, instead of 'Enterprise'. (Also note that passing a fully qualified path to msbuild.exe won't work.) This time, the command succeeded! But since I didn't want to pass that path to nuget every time I called it, I just deleted the Enterprise copy of msbuild.exe and auto-detection just used the file contained in the 'Professional' directory instead.