You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NAnt 0.93 does not find .NET SDK 4.8 which comes with Visual Studio 2019. It gives the following error message in resgen task The SDK for the 'net-4.0' framework is not available or not configured.
This is due to the structure of registry keys .NET SDK 4.8 being different from the structure expected by the locatesdk task.
I analyzed the code of locatesdk task and (not having time to update the code), I came up with the following hack: Copy registry keys and values from keys created by .NET SDK to keys expected by NAnt. This can be done by copying the lines below to a .reg file and then inserting the reg file to registry. The actual values need to be taken from HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\NETFXSDK\4.8
Similar hack likely applies for .NET SDK 4.6 and .NET SDK 4.7
Windows Registry Editor Version 5.00 ; Required to avoid NullReferenceException in NAnt [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows] ; Required to allow NAnt to find NETFX tools for .NET SDK 4.6, 4.7 or 4.8 ; Copy the actual values from HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\NETFXSDK [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\WinSDK-NetFx40Tools] "ProductVersion"="4.8.03928" "ComponentName"="Microsoft .NET Framework 4.8 SDK" "InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.8 Tools\\" [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\WinSDK-NetFx40Tools-x64] "ProductVersion"="4.8.03928" "ComponentName"="Microsoft .NET Framework 4.8 SDK" "InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.8 Tools\\x64\\" [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\WinSDK-NetFx40Tools-x86] "ProductVersion"="4.8.03928" "ComponentName"="Microsoft .NET Framework 4.8 SDK" "InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.8 Tools\\"
The text was updated successfully, but these errors were encountered:
NAnt 0.93 does not find .NET SDK 4.8 which comes with Visual Studio 2019. It gives the following error message in resgen task
The SDK for the 'net-4.0' framework is not available or not configured.
This is due to the structure of registry keys .NET SDK 4.8 being different from the structure expected by the locatesdk task.
I analyzed the code of locatesdk task and (not having time to update the code), I came up with the following hack: Copy registry keys and values from keys created by .NET SDK to keys expected by NAnt. This can be done by copying the lines below to a .reg file and then inserting the reg file to registry. The actual values need to be taken from HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\NETFXSDK\4.8
Similar hack likely applies for .NET SDK 4.6 and .NET SDK 4.7
Windows Registry Editor Version 5.00
; Required to avoid NullReferenceException in NAnt
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows]
; Required to allow NAnt to find NETFX tools for .NET SDK 4.6, 4.7 or 4.8
; Copy the actual values from HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\NETFXSDK
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\WinSDK-NetFx40Tools]
"ProductVersion"="4.8.03928"
"ComponentName"="Microsoft .NET Framework 4.8 SDK"
"InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.8 Tools\\"
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\WinSDK-NetFx40Tools-x64]
"ProductVersion"="4.8.03928"
"ComponentName"="Microsoft .NET Framework 4.8 SDK"
"InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.8 Tools\\x64\\"
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\WinSDK-NetFx40Tools-x86]
"ProductVersion"="4.8.03928"
"ComponentName"="Microsoft .NET Framework 4.8 SDK"
"InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.8 Tools\\"
The text was updated successfully, but these errors were encountered: