Coder Social home page Coder Social logo

Comments (9)

janpio avatar janpio commented on May 30, 2024

I'm trying to recover being able to build from my main repo

So it worked before and does not work now any more?

and not having to open the solution in the platform every time.

What exactly does that mean?

What is your environment information? As you are using Ionic, running ionic info will give some nice and helpful output.

from cordova-windows.

Gorthog avatar Gorthog commented on May 30, 2024

Having the exact same issue. Using Cordova 7.1.0. Getting this message on Windows 10:

MakeAppx : error : You can't add both "C:\projects\cordova-blank\BlankCordovaApp1\BlankCordovaApp1\platforms\windows\build\windows\debug\x64\win10\Upload\AppxManifest.xml" and "C:\projects\cordova-blank\BlankCordovaApp1\BlankCordovaApp1\platforms\windows\build\windows\debug\x64\win10\ilc\AppxManifest.xml" to the output file as "AppxManifest.xml". [C:\projects\cordova-blank\BlankCordovaApp1\BlankCordovaApp1\platforms\windows\CordovaApp.Windows10.jsproj]

After upgrading cordova to 8.1.2, the message is still there, but now it won't break the build and the program runs.

from cordova-windows.

janpio avatar janpio commented on May 30, 2024

So this problem is "fixed" for you @sinapis? What version of Cordova Windows were you using?
What about your @DennisSmolek, did upgrading Cordova CLI help you as well?

I currently can't reproduce the error message you are reporting, so it is very difficult to investigate. I need more information or best a reproduction project.

from cordova-windows.

DennisSmolek avatar DennisSmolek commented on May 30, 2024

So, previously, I was able to work in the same Visual Studio as my core repo. In my case using Ionic.
Running tests, builds, etc. was all handled using the default Ionic setup.

I got a different Windows machine, pulled the repo and got nothing but headaches.

So a build that worked perfectly for iOS and Android refused to build in Windows.

What I found is that if you attempt to build or run the app from the root project some configuration/script/setup always blocks it.

So we do a standard build for all platforms. I pull the repo into Windows and do a Cordova Build. VS is great and you can do it from VS or with Cordova directly.

BUT You then have to open the generated solution in the windows platforms folder, open that, and then use that to generate/run your actual application. Attempting to do it from the root always fails.

from cordova-windows.

janpio avatar janpio commented on May 30, 2024

Can you elaborate that?

I was able to work in the same Visual Studio as my core repo. In my case using Ionic.

Do you mean a normal Ionic project here?

So a build that worked perfectly for iOS and Android refused to build in Windows.

What kind of build - cordova build windows run in the main folder of the Ionic project?

I pull the repo into Windows and do a Cordova Build. VS is great and you can do it from VS or with Cordova directly.

So opening the Ionic/Cordova project in Visual Studio and then do a build using the Visual Studio Tools for Cordova?

BUT You then have to open the generated solution in the windows platforms folder, open that, and then use that to generate/run your actual application. Attempting to do it from the root always fails.

How does it fail, do you see any error message?

What Visual Studio version are we talking about here? Do you have both the version from your old machine and the new one where the problems started?

I think what you describe might be related to an update of Visual Studio. Can you please answer these questions above?

If you have the time, you might try to cordova platform rm windows and then cordova platform add github:apache/cordova-windows to use the current master of this repository where I commited a fix for that specific problem.

from cordova-windows.

DennisSmolek avatar DennisSmolek commented on May 30, 2024

Sorry, let me elaborate the best I can, this is a year old and some of the details are a bit rusty to me.

Ok, at one point I followed the Visual Studio Guide/Docs for a Cordova/Ionic project. I'm not sure it's this exact one or not, but essentially it was a new blank project from their templates.

I was running Visual Studio. I can't remember if we started with 2015 or 2017 (sorry)

I could then click debug/run from the toolbar. I would see the build scripts run and any issues would show up inside visual studio.

I used this generated package as the basis for our core repo.

Then the bulk of development continued on my Mac or my teammates machines (Mac/Linux)

When on the other machines, in the root project folder, using terminal you can run ionic cordova build ios ionic cordova build android etc. Then open up Xcode or Android Studio.. Or of course use the browser and ionic serve

I would commit to a branch, then open up my Windows 10 Image, open VS, pull the branch, and then could debug or run the "build for store" etc. All of my configs like permissions and what not were all on the root project folder in a VS solution.

Windows 10 did an update and my Image got borked... So I did a totally new, 100% fresh Windows install.

Installed VS 2017, Taco, All the tools as before.

Pulled the Repo.

I can no longer build/debug/run/etc from inside visual studio on the root project, when I do I get the listed error above:
MakeAppx : error : You can't add both "C:\Users\dennis\Source\Repos\showman-ionic\platforms\windows\build\windows\debug\x86\win10\Upload\AppxManifest.xml" and "C:\Users\dennis\Source\Repos\showman-ionic\platforms\windows\build\windows\debug\x86\win10\ilc\AppxManifest.xml" to the output file as "AppxManifest.xml". [C:\Users\dennis\Source\Repos\showman-ionic\platforms\windows\CordovaApp.Windows10.jsproj]

I started to FREAK OUT as the bulk of our users use the store or side-load version of our app and I couldn't get it to build at all.

I tried all sorts of stuff, but ultimately, what works is to open the root in the Windows Command Line and run:

ionic cordova build windows --release -- --archs="x64"

NOTE Because we had AOT/compile issues somewhere in the past 6 years, the solution when building from the command line was a more verbose line. Our actual build call is:
ionic cordova build windows --release --aot true --environment prod --output-hashing all --sourcemaps false --extract-css true --named-chunks false --build-optimizer true -- --archs="x64"

This builds/updates the Windows platform folder with the compiled JS/etc and creates the Windows10.jsproj

I then open theWIndows10.jsproj in VS, and then am able to debug/run/deploy.

You asked about re-installing cordova-windows as you had a fix, when did you release it? After I posted this issue? I'm about to do another fresh Windows Install and will be trying all this again..

from cordova-windows.

janpio avatar janpio commented on May 30, 2024

Thanks for the explanation, now I can retrace what you were doing.

You asked about re-installing cordova-windows as you had a fix, when did you release it? After I posted this issue? I'm about to do another fresh Windows Install and will be trying all this again..

My assumption of this being caused by a new VS version were wrong, so the last paragraph of what I wrote does not apply any more.

But in general, quite often removing and readding a platform might fix things for Cordova projects that are in a strange, broken state. So cordova platform rm windows and cordova platform add windows might sometimes help.

from cordova-windows.

janpio avatar janpio commented on May 30, 2024

Hey @DennisSmolek and @sinapis - is there still something we should investigate here or can I close this issue?

from cordova-windows.

timbru31 avatar timbru31 commented on May 30, 2024

We are archiving this repository following Apache Cordova's Deprecation Policy. We will not continue to work on this repository. Therefore all issues and pull requests are being closed. Thanks for your contribution.

from cordova-windows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.