none
could not locate .NET Framework SDK? RRS feed

  • Question

  • Is there a FAQ or some doc to help me fix the Blend build error below?
    Should I try reinstalling things in a different order?
    It is not clear what value I should be setting the registry key too.

    - MS Expression Blend June 2008
    - Visual Studio 2008

    - Windows Server 2008 and .NET 3.5 SDK

    Project "C:\Documents and Settings\jf10
    825\My Documents\Expression\Expression Blend Projects\ScrollingList\ScrollingList.csproj" (Build target(s)):

    Could not locate the .NET Framework SDK. The task is looking for the path to the .NET Framework SDK at the location specified in the SDKInstallRootv2.0 value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework. You may be able to solve the problem by doing one of the following: 1.) Install the .NET Framework SDK. 2.) Manually set the above registry key to the correct location.

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig /nowarn:1701,1702 /define:DEBUG;TRACE /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\PresentationCore.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\PresentationFramework.dll" /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\WindowsBase.dll" /debug+ /out:obj\Debug\UntitledProject1.exe /target:winexe /win32icon:Application.ico App.xaml.cs AssemblyInfo.cs Window1.xaml.cs

    Window1.xaml.cs(17,9): error CS0117: 'UntitledProject1.Window1' does not contain a definition for 'InitializeComponent'

    Done building project "ScrollingList.csproj" -- FAILED.

    Build failed.


    KingJosiah
    Thursday, March 27, 2008 9:01 PM

Answers

  • I found the answer in the Microsoft Windows SDK v6.1 release notes. (it worked!)

    5.1.2 MSBuild Reports a Dependency on the Microsoft .NET Framework SDK 2.0

    The Windows SDK does not set the HKLM\Software\Microsoft\.NETFramework\sdkInstall Rootv2.0 registry key to a string value containing the root directory of the Windows SDK installation. Some MSBuild tasks might expect this registry key to be set. If you already have .NET Framework SDK 2.0 or Microsoft Visual Studio 2005, this key will be set, and you should not encounter a problem. However, if you install the Windows SDK without either the .NET Framework SDK or Microsoft Visual Studio 2005, you might receive an error message from MSBuild tasks with a dependency on this key. To workaround this issue set the string value of this key to the root directory of the Windows SDK installation. By default, this directory is C:\Program Files\Microsoft SDKs\Windows\v6.1


    KingJosiah
    Friday, March 28, 2008 3:21 PM

All replies

  • KingJosiah said:

    - MS Expression Blend June 2008
    Where did you get it? :-)

    Key value is (on my machine)
    C:\Windows\Microsoft.NET\Framework\




    Corrado Cavalli [MVP]
    Thursday, March 27, 2008 9:05 PM
  • I found the answer in the Microsoft Windows SDK v6.1 release notes. (it worked!)

    5.1.2 MSBuild Reports a Dependency on the Microsoft .NET Framework SDK 2.0

    The Windows SDK does not set the HKLM\Software\Microsoft\.NETFramework\sdkInstall Rootv2.0 registry key to a string value containing the root directory of the Windows SDK installation. Some MSBuild tasks might expect this registry key to be set. If you already have .NET Framework SDK 2.0 or Microsoft Visual Studio 2005, this key will be set, and you should not encounter a problem. However, if you install the Windows SDK without either the .NET Framework SDK or Microsoft Visual Studio 2005, you might receive an error message from MSBuild tasks with a dependency on this key. To workaround this issue set the string value of this key to the root directory of the Windows SDK installation. By default, this directory is C:\Program Files\Microsoft SDKs\Windows\v6.1


    KingJosiah
    Friday, March 28, 2008 3:21 PM
  • The Windows SDK does not set the HKLM\Software\Microsoft\.NETFramework\sdkInstall Rootv2.0 registry key to a string value containing the root directory of the Windows SDK installation.


    Actually, there seems to be some kind of misspelling in the release notes.
    You should not add a new key called "sdkInstall Rootv2.0", with a default value of the directory path, but rather a string value called "SDKInstallRootv2.0" on the ".NETFramework" key itself, with a value of the directory path.
    That's quite different things!
    • Proposed as answer by Mgroetan Thursday, November 12, 2009 1:59 PM
    Thursday, November 12, 2009 1:58 PM
  • Thanks for the clarification Mgroetan! This worked for me.  You have to set a string value with Name="SDKInstallRootv2.0" with Data="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727".  I believe this occurs when you attempt to compile a project written in 2005 on a machine that does not have 2005 installed (i.e. a build machine).
    Thursday, July 8, 2010 3:11 PM
  • I am on Windows 8.1 64 bit. The problem started after upgrade from Windows 8.0.

    I fixed it by creating a string entry SDKInstallRootv2.0 under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework

    • Proposed as answer by Barniferous Sunday, November 17, 2013 7:56 PM
    Monday, October 28, 2013 3:49 PM
  • I'm on Windows 7 SP1 and creating this string value under the Wow6432Node registry branch fixed me right up. It has been aggrivating me for almost a year. Just to be clear:

    In RegEdit, navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework

    Create a string value name = "SDKInstallRootv2.0"    (no spaces in the name)

    Make its value = "C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A"

    Close and restart Visual Studio.

    Sunday, November 17, 2013 7:55 PM
  • I am on Windows 8.1 64 bit. The problem started after upgrade from Windows 8.0.

    I fixed it by creating a string entry SDKInstallRootv2.0 under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework


    On Windows 7.1 x64 it worked for me.

    Thanks for the trick ! 👍
    Tuesday, February 6, 2018 6:05 PM