Вопрос

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