2017-05-24 241 views
0

Windows 10 64位上的Visual Studio 2015,目標設置爲32位。visual studio 2015系統找不到指定的路徑

極力打造從系統中心2012 R2配置管理器SDK

的CustomTSActionControl樣本引用後,所有的DLL文件確定,當我嘗試建立它失敗:

------ Build started: Project: CustomTSActionControl, Configuration: Debug x86 ------ 
1> CustomTSActionControl -> C:\Program Files (x86)\Microsoft System Center 2012 R2 Configuration Manager SDK\Samples\Admin UI\CustomTaskSequenceAction\VCSharp.Net\bin\x86\Debug\CustomTSActionControl.dll 
1> The system cannot find the path specified. 
1> The system cannot find the path specified. 
1> The system cannot find the path specified. 
1> The system cannot find the path specified. 
1> The system cannot find the path specified. 
1> The system cannot find the path specified. 
1> The system cannot find the path specified. 
1> The system cannot find the path specified. 
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4714,5): error MSB3073: The command "copy "C:\Program Files (x86)\Microsoft System Center 2012 R2 Configuration Manager SDK\Samples\Admin UI\CustomTaskSequenceAction\VCSharp.Net\..\..\..\..\lib\AdminUI.Common.dll" "C:\Program Files (x86)\Microsoft System Center 2012 R2 Configuration Manager SDK\Samples\Admin UI\CustomTaskSequenceAction\VCSharp.Net\bin\x86\Debug\AdminUI.Common.dll" 
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4714,5): error MSB3073: copy "C:\Program Files (x86)\Microsoft System Center 2012 R2 Configuration Manager SDK\Samples\Admin UI\CustomTaskSequenceAction\VCSharp.Net\..\..\..\..\lib\AdminUI.Controls.dll" "C:\Program Files (x86)\Microsoft System Center 2012 R2 Configuration Manager SDK\Samples\Admin UI\CustomTaskSequenceAction\VCSharp.Net\bin\x86\Debug\AdminUI.Controls.dll" 
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4714,5): error MSB3073: copy "C:\Program Files (x86)\Microsoft System Center 2012 R2 Configuration Manager SDK\Samples\Admin UI\CustomTaskSequenceAction\VCSharp.Net\..\..\..\..\lib\AdminUI.DialogFoundation.dll" "C:\Program Files (x86)\Microsoft System Center 2012 R2 Configuration Manager SDK\Samples\Admin UI\CustomTaskSequenceAction\VCSharp.Net\bin\x86\Debug\AdminUI.DialogFoundation.dll" 
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4714,5): error MSB3073: copy "C:\Program Files (x86)\Microsoft System Center 2012 R2 Configuration Manager SDK\Samples\Admin UI\CustomTaskSequenceAction\VCSharp.Net\..\..\..\..\lib\AdminUI.OsdCommon.dll" "C:\Program Files (x86)\Microsoft System Center 2012 R2 Configuration Manager SDK\Samples\Admin UI\CustomTaskSequenceAction\VCSharp.Net\bin\x86\Debug\AdminUI.OsdCommon.dll" 
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4714,5): error MSB3073: copy "C:\Program Files (x86)\Microsoft System Center 2012 R2 Configuration Manager SDK\Samples\Admin UI\CustomTaskSequenceAction\VCSharp.Net\..\..\..\..\lib\AdminUI.TaskSequenceEditor.dll" "C:\Program Files (x86)\Microsoft System Center 2012 R2 Configuration Manager SDK\Samples\Admin UI\CustomTaskSequenceAction\VCSharp.Net\bin\x86\Debug\AdminUI.TaskSequenceEditor.dll" 
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4714,5): error MSB3073: copy "C:\Program Files (x86)\Microsoft System Center 2012 R2 Configuration Manager SDK\Samples\Admin UI\CustomTaskSequenceAction\VCSharp.Net\..\..\..\..\lib\Microsoft.ConfigurationManagement.exe" "C:\Program Files (x86)\Microsoft System Center 2012 R2 Configuration Manager SDK\Samples\Admin UI\CustomTaskSequenceAction\VCSharp.Net\bin\x86\Debug\Microsoft.ConfigurationManagement.exe" 
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4714,5): error MSB3073: copy "C:\Program Files (x86)\Microsoft System Center 2012 R2 Configuration Manager SDK\Samples\Admin UI\CustomTaskSequenceAction\VCSharp.Net\..\..\..\..\lib\Microsoft.ConfigurationManagement.ManagementProvider.dll" "C:\Program Files (x86)\Microsoft System Center 2012 R2 Configuration Manager SDK\Samples\Admin UI\CustomTaskSequenceAction\VCSharp.Net\bin\x86\Debug\Microsoft.ConfigurationManagement.ManagementProvider.dll" 
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4714,5): error MSB3073: copy "C:\Program Files (x86)\Microsoft System Center 2012 R2 Configuration Manager SDK\Samples\Admin UI\CustomTaskSequenceAction\VCSharp.Net\..\..\..\..\lib\Microsoft.ConfigurationManagement.DialogFramework.dll" "C:\Program Files (x86)\Microsoft System Center 2012 R2 Configuration Manager SDK\Samples\Admin UI\CustomTaskSequenceAction\VCSharp.Net\bin\x86\Debug\Microsoft.ConfigurationManagement.DialogFramework.dll"" exited with code 1.` 

這是怪我因爲VS在添加它們時接受了所有對這些各種DLL的引用。我試着加入

C:\ Program Files文件(x86)的\ Microsoft配置管理器\ R2 \ AdminConsole \ BIN \

C:\ Program Files文件(x86)的\微軟系統中心2012 R2配置管理器SDK \ Samples \ Admin UI \ CustomTaskSequenceAction \ VCSharp.Net \ bin \ x86 \ Debug \

到參考路徑但結果相同。我猜它需要引用周圍的路徑,因爲空間,但我不知道在哪裏把這些報價,因爲我不知道VS有這些路徑存儲在哪裏。

回答

0

開放項目\ CustomTSAControl屬性... 點擊 「生成Evdents」 點擊 「編輯生成後...」

與(在我的情況下的DLL替換處

copy "$(ProjectDir)..\..\..\..\lib\AdminUI.Common.dll" "$(TargetDir)AdminUI.Common.dll" 
copy "$(ProjectDir)..\..\..\..\lib\AdminUI.Controls.dll" "$(TargetDir)AdminUI.Controls.dll" 
copy "$(ProjectDir)..\..\..\..\lib\AdminUI.DialogFoundation.dll" "$(TargetDir)AdminUI.DialogFoundation.dll" 
copy "$(ProjectDir)..\..\..\..\lib\AdminUI.OsdCommon.dll" "$(TargetDir)AdminUI.OsdCommon.dll" 
copy "$(ProjectDir)..\..\..\..\lib\AdminUI.TaskSequenceEditor.dll" "$(TargetDir)AdminUI.TaskSequenceEditor.dll" 
copy "$(ProjectDir)..\..\..\..\lib\Microsoft.ConfigurationManagement.exe" "$(TargetDir)Microsoft.ConfigurationManagement.exe" 
copy "$(ProjectDir)..\..\..\..\lib\Microsoft.ConfigurationManagement.ManagementProvider.dll" "$(TargetDir)Microsoft.ConfigurationManagement.ManagementProvider.dll" 
copy "$(ProjectDir)..\..\..\..\lib\Microsoft.ConfigurationManagement.DialogFramework.dll" "$(TargetDir)Microsoft.ConfigurationManagement.DialogFramework.dll" 

c:\ Program Files(x86)\ Microsoft Configuration Manager \ AdminConsole \ bin)

copy "C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\AdminUI.Common.dll" "$(TargetDir)AdminUI.Common.dll" 
copy "C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\AdminUI.Controls.dll" "$(TargetDir)AdminUI.Controls.dll" 
copy "C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\AdminUI.DialogFoundation.dll" "$(TargetDir)AdminUI.DialogFoundation.dll" 
copy "C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\AdminUI.OsdCommon.dll" "$(TargetDir)AdminUI.OsdCommon.dll" 
copy "C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\AdminUI.TaskSequenceEditor.dll" "$(TargetDir)AdminUI.TaskSequenceEditor.dll" 
copy "C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\Microsoft.ConfigurationManagement.exe" "$(TargetDir)Microsoft.ConfigurationManagement.exe" 
copy "C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\Microsoft.ConfigurationManagement.ManagementProvider.dll" "$(TargetDir)Microsoft.ConfigurationManagement.ManagementProvider.dll" 
copy "C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\Microsoft.ConfigurationManagement.DialogFramework.dll" "$(TargetDir)Microsoft.ConfigurationManagement.DialogFramework.dll" 

然後按預期構建。不知道爲什麼Visual Studio把那些不好的路徑放在那裏,當它知道我什麼時候引用它們的時候。可能是來自樣本隨附的原始參考文獻的痕跡。

相關問題