Oct 18, 2013 at 6:54 AM
Edited Oct 18, 2013 at 6:55 AM
I'm trying to build from source using build.cmd but I'm having a few problems relating to CommandLine.ServerExtensions and versions of the .net framework.
It comes down to this root error:
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3274: The primary reference
"NuGet" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher
version than the currently targeted framework ".NETFramework,Version=v4.0". [C:\Projects_OpenSource\nuget\src\CommandL
I figured out that the TargetFrameworkVersion is determined in NuGet.Settings.targets based on some Dev*Availabled properties:
<Dev10Available Condition=" '$(VisualStudioVersion)' == '10.0' Or Exists('$(Dev10Directory)') ">true</Dev10Available>
<Dev11Available Condition=" '$(VisualStudioVersion)' == '11.0' And Exists('$(Dev11Directory)') ">true</Dev11Available>
<Dev12Available Condition=" '$(VisualStudioVersion)' == '12.0' And Exists('$(Dev12Directory)') ">true</Dev12Available>
I have 10.0 and 11.0 installed but, since build.cmd isn't running in VS, it's going with only Dev10Available = 'true' (right?). Because of that TargetFrameworkVersion is later set to v4.0.
So NuGet.exe reference should also be v4.0. Yet, checking on src\CommandLine\bin\Debug\Merged\NuGet.exe (which is referenced) is v4.5 according to dotPeek.
So I have few questions:
- Are the Dev*Available results right?
Why isn't it
<Dev11Available Condition=" '$(VisualStudioVersion)' == '11.0' Or Exists('$(Dev11Directory)') ">true</Dev11Available>? When I make this change the build succeeds.
- How is the target version for Ilmerge determined? Why isn't it merged to v4.0?
- Am I the only one to have this problem? AFAIK, my set up isn't exceptional and this is step 1 in actually building this thing.