मैंने यहां कई अन्य एसजेन से संबंधित प्रश्नों को देखा है और या तो उनके उत्तर लागू नहीं होते हैं या उनके उत्तर मेरे लिए यह ठीक नहीं करते हैं। मैंने इस मुद्दे को कोई भाग्य के साथ ठीक करने के लिए कई एसडीके स्थापित किए हैं। संदर्भ प्रकारों को बदला नहीं जाना चाहिए क्योंकि यह एकमात्र जगह है जहां यह एक समस्या है। एक बार सुझाव है कि SGen.exe को C:\Windows\Microsoft.NET\Framework\v3.5
फ़ोल्डर में डालना है, लेकिन यह उस बॉक्स पर नहीं किया गया है जहां यह कोई समस्या नहीं है। इस परिदृश्य में, SGen.exe
वास्तव में मौजूद है और यह सही है जहां यह होना चाहिए, लेकिन एमएसबिल्ड को अभी भी किसी कारण से इसे ढूंढने में समस्याएं हैं!एमएसबिल्ड समाधान को संकलित करते समय एसजीएन नहीं ढूंढ सकता
पृष्ठभूमि:
हम एक NAnt स्क्रिप्ट है कि हमारे बनाता है स्वचालित है। इस परिदृश्य में, एनएएनटी एमएसबिल्ड को बुला रहा है और एमएसबिल्ड एसजीएन को खोजने में असमर्थ होने का दावा करने वाली त्रुटि उत्पन्न कर रहा है। परियोजना .NET 3.5-आधारित है। मेरे पास मेरा प्राथमिक देव पर्यावरण (64-बिट विस्टा अल्टीमेट) है जहां स्क्रिप्ट पूरी तरह से काम करती है और मैं इसे वीएम (64-बिट विन 7 अल्टीमेट) में डुप्लिकेट करने का प्रयास कर रहा हूं। मुझे लगता है कि मेरे पास उस बिंदु पर सबकुछ है जहां मुझे अच्छा होना चाहिए लेकिन यह Win7 बॉक्स पर विफल रहता है (Vista बॉक्स पर पूरी तरह से काम करता है)।
मैंने दो बक्से के बीच कुछ तुलना की है और वे दोनों इस संबंध में समान दिखते हैं, लेकिन यह अभी भी विफल रहता है। उदाहरण के लिए, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework
का sdkInstallRootv2.0
मान दोनों मशीनों पर C:\Program Files\Microsoft.NET\SDK\v2.0 64bit\
पर सेट किया गया है। दोनों मशीनों में, SGen.exe
उस पथ के bin
उपनिर्देशिका में है।
NAnt स्क्रिप्ट:
report-installer:
[exec] Microsoft (R) Build Engine Version 3.5.30729.4926
[exec] [Microsoft .NET Framework, Version 2.0.50727.4927]
[exec] Copyright (C) Microsoft Corporation 2007. All rights reserved.
[exec]
[exec] Build started 4/8/2010 11:28:23 AM.
[exec] Project "C:\Projects\Production\Tools\ReportInstaller\ReportInstaller.sln" on node 0 (default targets).
[exec] Building solution configuration "Release|Any CPU".
[exec] Project "C:\Projects\Production\Tools\ReportInstaller\ReportInstaller.sln" (1) is building "C:\Projects\Production\Tools\ReportInstaller\ReportInstaller.csproj" (2) on node 0 (default targets).
[exec] 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.
[exec] CoreCompile:
[exec] Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
[exec] C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1902,9): error MSB3091: Task failed because "sgen.exe" was not found, or the .NET Framework SDK v2.0 is not installed. The task is looking for "sgen.exe" in the "bin" subdirectory beneath 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 v2.0. 2.) Manually set the above registry key to the correct location. 3.) Pass the correct location into the "ToolPath" parameter of the task.
[exec] Done Building Project "C:\Projects\Production\Tools\ReportInstaller\ReportInstaller.csproj" (default targets) -- FAILED.
[exec] Done Building Project "C:\Projects\Production\Tools\ReportInstaller\ReportInstaller.sln" (default targets) -- FAILED.
[exec]
[exec] Build FAILED.
[exec]
[exec] "C:\Projects\Production\Tools\ReportInstaller\ReportInstaller.sln" (default target) (1) ->
[exec] "C:\Projects\Production\Tools\ReportInstaller\ReportInstaller.csproj" (default target) (2) ->
[exec] (GenerateSerializationAssemblies target) ->
[exec] C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1902,9): error MSB3091: Task failed because "sgen.exe" was not found, or the .NET Framework SDK v2.0 is not installed. The task is looking for "sgen.exe" in the "bin" subdirectory beneath 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 v2.0. 2.) Manually set the above registry key to the correct location. 3.) Pass the correct location into the "ToolPath" parameter of the task.
[exec]
[exec] 0 Warning(s)
[exec] 1 Error(s)
[exec]
[exec] Time Elapsed 00:00:00.24
[call] C:\Projects\Production\Source\reports.build(15,4):
[call] External Program Failed: C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe (return code was 1)
क्या मैं गलत है कि यहाँ खड़ी कर रहा है कर रहा हूँ MSBuild अभी भी SGen खोजने में असमर्थ होने के लिए:
<target name="report-installer" depends="fail-if-environment-not-set">
<exec program="MSBuild.exe" basedir="${framework35.directory}">
<arg value="${tools.directory.current}\ReportInstaller\ReportInstaller.sln" />
<arg value="/p:Configuration=${buildconfiguration.current}" />
</exec>
</target>
त्रुटि संदेश मिल रहा है?
स्पष्टीकरण के लिए, मैंने 3.5 और 2.0 एसडीके स्थापित किए हैं और उनमें से कोई भी इसके लिए व्यवहार बदल नहीं गया है। – Jaxidian
क्या आप पहले से ही अपने समाधान को एमएसबिल्ड करने की कोशिश कर रहे हैं (बिना एनएएनटी द्वारा बुलाए जा रहे हैं)? – Filburt
यूप, एक ही समस्या। – Jaxidian