سؤال

لدي برنامج نصي PowerShell في تحديث الحل الخاص بي: giveacodicetagpre.

عندما أقوم بتنفيذها باستخدام SPP Management Shell (بدون Add-pssnapin بالطبع)، فهي تعمل موافق، ولكن عندما أحاول تنفيذها مع الأمر Nant: giveacodicetagpre.

أحصل على خطأ: giveacodicetagpre.

لذلك يبدو أن الحجة التي أقوم بها ليست تحليلا، وهو أمر غريب، لأن مضيف الكتابة في كلتا الحالتين (مع إدارة الإدارة و nant) يعرض المسار الصحيح. أي أفكار لماذا لا يتم تحويل Args $ [0] في تحديث التحديثات إلى الوسيطة الفعلية عند التشغيل مع Nant؟

هل كانت مفيدة؟

المحلول

Try and put a $() around your literal path, like so:

Update-SPSolution -Identity PkbInfo.SP.wsp -literalpath $($args[0]) -GACDeployment  

You can also use Resolve-Path if your path is relative

On a side note: remember that Update-SPSolution only works as long as you update existing artefacts (eg. no new or deleted modules/features/rootfiles)

نصائح أخرى

You try to run:

Update-SPSolution -Identity PkbInfo.SP.wsp 

And you get the error:

 [exec] Update-SPSolution : c:\shared\PkbInfo.wsp: The specified file was no  
t found.

Check your filename :)

(I know you can have different identity and filename, but nobody ever changes that, right?)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى sharepoint.stackexchange
scroll top