سؤال

I've been trying to get this re-build command working for a Windows 8 Project in Visual Studio 2012.

if "$(ConfigurationName)"==ReleaseOEM copy "$(ProjectDir)PackageOEM.appxmainfest" "$(ProjectDir)Package.appxmainfest" copy "$(ProjectDir)StoreManifestOEM.xml" "$(ProjectDir)StoreManifest.xml"

The xml file StoreManifest.xml is copied every time I do a rebuild; however the Package.appxmainfest is never changed.

What have I done wrong?

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

المحلول

This worked in a test project ...

if "$(ConfigurationName)"=="Debug" copy "$(ProjectDir)Package.appxmanifest" "$(ProjectDir)Package2.appxmainfest"

The only real difference is I added quotes around Debug. It does not copy the file without the quotes. According to MSDN, you need to separate commands by line breaks. Yours should probably look something like ...

if "$(ConfigurationName)"=="ReleaseOEM" copy "$(ProjectDir)PackageOEM.appxmainfest" "$(ProjectDir)Package.appxmainfest"
if "$(ConfigurationName)"=="ReleaseOEM" copy "$(ProjectDir)StoreManifestOEM.xml" "$(ProjectDir)StoreManifest.xml"
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top