After update my vs2017 to 16.6.5, and update google sdk-build-tools to 27.0.3, my project got a problem with debugging for my tablet. My project type is xamarin.android, I check it for xamarin.forms but debugging for my (not emulator) tablet is woks! Also before this update i don't have any problem with debugging.
Here is my project output in diagnostic mode:
3>Done executing task "Delete".
3>Using "AndroidZipAlign" task from assembly "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Build.Tasks.dll".
3>Task "AndroidZipAlign"
3>Task Parameter:Source=F:\Projects\Amin\AminApp\AminApp\obj\Debug\android\bin\com.aminsystem.forush.apk
3>Task Parameter:DestinationDirectory=bin\Debug\
3>Task Parameter:ToolPath=C:\Program Files (x86)\Android\android-sdk\build-tools\27.0.3
3>AndroidZipAlign Task
3> Alignment: 4
3> Source: F:\Projects\Amin\AminApp\AminApp\obj\Debug\android\bin\com.aminsystem.forush.apk
3> DestinationDirectory: bin\Debug\
3>C:\Program Files (x86)\Android\android-sdk\build-tools\27.0.3\zipalign.exe 4 "F:\Projects\Amin\AminApp\AminApp\obj\Debug\android\bin\com.aminsystem.forush.apk" "bin\Debug\\com.aminsystem.forush-Signed.apk"
3>Done executing task "AndroidZipAlign".
3>Task "AndroidZipAlign"
3>Task Parameter:Source=F:\Projects\Amin\AminApp\AminApp\obj\Debug\android\bin\com.aminsystem.forush-armeabi-v7a.apk
3>Task Parameter:DestinationDirectory=bin\Debug\
3>Task Parameter:ToolPath=C:\Program Files (x86)\Android\android-sdk\build-tools\27.0.3
3>AndroidZipAlign Task
3> Alignment: 4
3> Source: F:\Projects\Amin\AminApp\AminApp\obj\Debug\android\bin\com.aminsystem.forush-armeabi-v7a.apk
3> DestinationDirectory: bin\Debug\
3>C:\Program Files (x86)\Android\android-sdk\build-tools\27.0.3\zipalign.exe 4 "F:\Projects\Amin\AminApp\AminApp\obj\Debug\android\bin\com.aminsystem.forush-armeabi-v7a.apk" "bin\Debug\\com.aminsystem.forush-armeabi-v7a-Signed.apk"
3>Output file 'bin\Debug\\com.aminsystem.forush-armeabi-v7a-Signed.apk' exists
3>"zipalign.exe" exited with code 1.
3>Done executing task "AndroidZipAlign" -- FAILED.
3>Done building target "_Sign" in project "AminApp.csproj" -- FAILED.
3>Done building project "AminApp.csproj" -- FAILED.
3>Build FAILED.
3>
3>Deploy failed on Samsung SM-T585
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
As you see my project compiled successfully!
I also tried copy zipalign.exe from Android\android-sdk\build-tools\27.0.3 to Android\android-sdk\tools, but it not works.
The problem was solved by changing the Debug option to X86!
Thanks to https://www.c-sharpcorner.com/forums/deployment-error-with-xamarin-android-application
In my case, zipalign.exe was being blocked by the Windows Virus & Threat protection and once I allowed it, it started working fine.
Related
Here is the log
Rebuild started...
1>------ Rebuild All started: Project: OxyPlot.Xamarin.iOS, Configuration: Debug Any CPU ------
2>------ Rebuild All started: Project: OxyPlot.Xamarin.Forms, Configuration: Debug Any CPU ------
Restored D:\...\MyApp\MyApp\Autofac\Autofac.csproj (in 108 ms).
1> Executing SayHello Task to establish a connection to a Remote Server.
1> Properties:
1> SessionId=b2c2c29378abf7c944566f76ca68a6dc43fad4b8538dd7c4bd39fd2d30164eb5,
1> Addresss=192.168.10.224,
1> SshPort=22,
1> TcpPort=57058,
1> User=dims,
1> AppName=OxyPlot.Xamarin.iOS,
1> VisualStudioProcessId=2364,
1> ContinueOnDisconnected=False
2>D:\...\MyApp\OxyPlot\OxyPlot.Xamarin.Forms\PlotView.cs(42,25,42,34): warning CS0618: 'Device.OS' is obsolete: 'TargetPlatform is obsolete as of version 2.3.4. Please use RuntimePlatform instead.'
2>D:\...\MyApp\OxyPlot\OxyPlot.Xamarin.Forms\PlotView.cs(44,26,44,40): warning CS0612: 'TargetPlatform' is obsolete
2>D:\...\MyApp\OxyPlot\OxyPlot.Xamarin.Forms\PlotView.cs(48,26,48,40): warning CS0612: 'TargetPlatform' is obsolete
2>D:\...\MyApp\OxyPlot\OxyPlot.Xamarin.Forms\PlotView.cs(52,26,52,40): warning CS0612: 'TargetPlatform' is obsolete
2>D:\...\MyApp\OxyPlot\OxyPlot.Xamarin.Forms\PlotView.cs(56,26,56,40): warning CS0612: 'TargetPlatform' is obsolete
2> OxyPlot.Xamarin.Forms -> D:\...\MyApp\OxyPlot\OxyPlot.Xamarin.Forms\bin\Debug\OxyPlot.Xamarin.Forms.dll
1> OxyPlot.Xamarin.iOS -> D:\...\MyApp\OxyPlot\OxyPlot.Xamarin.iOS\bin\Debug\OxyPlot.Xamarin.iOS.dll
3>------ Rebuild All started: Project: OxyPlot.Xamarin.Forms.Platform.iOS, Configuration: Debug Any CPU ------
========== Rebuild All: 2 succeeded, 1 failed, 0 skipped ==========
First DLL is created, second one is not. Failed counts confirms this, but no any error reported.
How to investigate?
Diagnostic MSBuild can contain additional information relating to package building and may contain some package deployment information.
To enable diagnostic MSBuild output within Visual Studio:
Click Tools > Options...
In the left-hand tree view, select Projects and Solutions > Build and Run
In the right-hand panel, set the MSBuild build output verbosity dropdown to Diagnostic
Click OK
Clean and rebuild your package.
Diagnostic output is visible within the Output panel.
To enable diagnostic MSBuild output within Visual Studio for Mac/OS X:
Click Visual Studio for Mac > Preferences...
In the left-hand tree view, select Projects > Build
In the right-hand panel, set the Log verbosity drop-down to Diagnostic
Click OK
Restart Visual Studio for Mac
Clean and rebuild your package.
Diagnostic output is visible within the Errors Pad (View > Pads > Errors ), by clicking the Build Output button.
When I enable Multi-Dex in Xamarin.Android Build. The build fails with below error.
##[error]C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2610,3): Error MSB6006: "java.exe" exited with code 2.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2610,3): error MSB6006: "java.exe" exited with code 2.
Done Building Project "<< MY Project Path>>" (PackageForAndroid target(s)) -- FAILED.
"<< MY Project Path>>" (PackageForAndroid target) (1) ->
(_CompileToDalvikWithDx target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2610,3): error MSB6006: "java.exe" exited with code 2. [<< MY Project Path>>]
23 Warning(s)
1 Error(s)
Time Elapsed 00:03:29.78
##[error]Process 'msbuild.exe' exited with code '1'.
Note
In my local machine everything working fine without any issue.
I am trying to do a basic 'cloud project' -> 'Asp.Net Web Application' in VS2017
When I debug the application I get what I expect the 'MVC landing page'.
Then when I publish i get an Azure landing page, but I was expecting to see my 'MVC landing page'
It appears to deploy correctly, so I must be doing missing something obvious.
When I publish project from VS2017 I get this:
1>------ Build started: Project: zerocloud, Configuration: Release Any CPU ------
1> zerocloud -> C:\Users\patrick\Documents\Visual Studio 2017\Projects\zerocloud\zerocloud\bin\zerocloud.dll
2>------ Publish started: Project: zerocloud, Configuration: Release Any CPU ------
2>Transformed Web.config using C:\Users\patrick\Documents\Visual Studio 2017\Projects\zerocloud\zerocloud\Web.Release.config into obj\Release\TransformWebConfig\transformed\Web.config.
2>Auto ConnectionString Transformed Views\Web.config into obj\Release\CSAutoParameterize\transformed\Views\Web.config.
2>Auto ConnectionString Transformed obj\Release\TransformWebConfig\transformed\Web.config into obj\Release\CSAutoParameterize\transformed\Web.config.
2>Copying all files to temporary location below for package/publish:
2>obj\Release\Package\PackageTmp.
2>Start Web Deploy Publish the Application/package to https://zerocloud20170318070155.scm.azurewebsites.net/msdeploy.axd?site=zerocloud20170318070155 ...
2>Adding ACL's for path (zerocloud20170318070155)
2>Adding ACL's for path (zerocloud20170318070155)
2>Updating file (zerocloud20170318070155\bin\zerocloud.dll).
2>Adding ACL's for path (zerocloud20170318070155)
2>Adding ACL's for path (zerocloud20170318070155)
2>Publish Succeeded.
2>Web App was published successfully http://zerocloud20170318070155.azurewebsites.net/
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 1 succeeded, 0 failed, 0 skipped ==========
The website (http://zerocloud20170318070155.azurewebsites.net/) does load correct. Any chance you could be seeing a cached version?
This is what I see:
When I attempt to run my Cordova app using Visual Studio 2015 using Remote Device, I get an error "SyntaxError: Unexpected token M". Visual Studio is installed on windows 10 which is a Parallels VM on my Mac. I have followed the steps to setup remotebuild on my Mac. From Visual Studio - Tools - options, I can successfully connect to the running remotebuild on my mac. The project runs fine when I run it on Ripple in chrome.
Here's a little more background. When I first started working on this project, it was working fine and I was able to run it on the iOS simulator on my Mac. At one point, it started giving me a different error which was related to my iOS developer account. I opened up Xcode on my mac and realized that I needed to login to the developer website and accept the latest license agreement. Once I did that, I attempted to run the project again from Visual Studio. At that point I saw an error related to certificate. I ran the project again, and from then on I keep getting this "SyntaxError: Unexpected token M" error.
I attempted to run an old backup of the same project. The error I get with that is:
An error occurred uploading to the build server https://10.0.1.31:3000/cordova: Error: self signed certificate in certificate chain
Here's the part of the output log where I see the "SyntaxError: Unexpected token M":
1> ------ changeList.deletedFilesIos: (TaskId:11)
1> ------ changeList.addedPluginsIos: org.apache.cordova.camera#0.3.6,org.apache.cordova.file-transfer#0.5.0,org.apache.cordova.splashscreen#1.0.0,org.apache.cordova.inappbrowser#0.6.0 (TaskId:11)
1> ------ changeList.deletedPluginsIos: (TaskId:11)
1> ------ changeList.addedPlugins: org.apache.cordova.camera#0.3.6,org.apache.cordova.file-transfer#0.5.0,org.apache.cordova.splashscreen#1.0.0,org.apache.cordova.inappbrowser#0.6.0 (TaskId:11)
1> ------ changeList.deletedPlugins: (TaskId:11)
1> ------ Updating plugins (TaskId:11)
1> SyntaxError: Unexpected token M (TaskId:11)
1>Done executing task "MdaVsCli" -- FAILED. (TaskId:11)
1>Done building target "BuildMDA" in project "MyPyaarApp.jsproj" -- FAILED.: (TargetId:12)
1>
1>Project Performance Summary:
1> 672 ms C:\svn\mypyaar\trunk\MyPyaarApp\MyPyaarApp\MyPyaarApp.jsproj 1 calls
1> 672 ms build 1 calls
1>
1>Target Performance Summary:
1> 0 ms BuildOnlySettings 1 calls
1> 0 ms CompileTypeScript 1 calls
1> 0 ms AfterBuild 1 calls
1> 0 ms TrackJsChanges 1 calls
1> 0 ms BeforeBuild 1 calls
1> 0 ms PreComputeCompileTypeScript 1 calls
1> 0 ms CoreBuild 1 calls
1> 16 ms _CheckForInvalidConfigurationAndPlatform 1 calls
1> 266 ms EnsureNodeJsRequirementsAreAtCorrectVersion 1 calls
1> 266 ms InstallMDA 1 calls
1> 391 ms BuildMDA 1 calls
1>
1>Task Performance Summary:
1> 0 ms MdaVerifySetup 1 calls
1> 0 ms MdaTrackJsChanges 1 calls
1> 0 ms Message 2 calls
1> 0 ms VsTsc 2 calls
1> 0 ms AssignTargetPath 1 calls
1> 266 ms RunMdaInstall 1 calls
1> 266 ms CallTarget 1 calls
1> 391 ms MdaVsCli 1 calls
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.65
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
Found the solution to this!!!
Luckily I had an old backup of my project which didn't produce the "SyntaxError: Unexpected token M" when running it on the remote device. I used a compare tool to see the differences in files/folders. It turned out that the "remote_ios.json" file located in the plugins folder was corrupted. I deleted it and on the next run it generated a proper one and everything now works as expected. I can deploy to the iOS simulator on my mac as well as my iPhone.
I did notice a few more times that the file did get corrupted. So every time I just deleted the file and it got recreated and everything worked. Sounds like a bug in Visual Studio 2015.
Here's how my corrupted remote_os.json file looked like:
{
"prepare_queue": {
"installed": [],
"uninstalled": []
},
"config_munge": {
"files": {
"framework": {
"parents": {
"ImageIO.framework": [
{
"xml": true,
"count": 1
}
],
"CoreLocation.framework": [
{
"xml": false,
"count": 1
}
],
"CoreGraphics.framework": [
{
"xml": false,
"count": 4
}
],
"AssetsLibrary.framework": [
{
"xml": false,
"count": 3
}
],
"MobileCoreSe
The solution is
and a more permanent fix for this issue (which worked for me):
Is to delete your plugins folder
Restore all of your plugins. (listed in your package.json in an array called cordovaPlugins)
Hint: Run cordova plugin ls to have a list of what you need to add back in.
I use Ionic so I just used this command: ionic state restore --plugins and voila problem solved for ever (I hope).
PS. FYI don't run cmd as administrator for this, it could be the cause of your issues with iOS apps...
Got to the root of the problem from Navid Harandi's answer.
I have Frank D Lunas directx11 book, and i'm trying to set it up using VS2012, but i've run into this:
1>------ Build started: Project: FirstProject, Configuration: Debug Win32 ------
1>TRACKER : error TRK0002: Failed to execute command: "C:\Users\Josh\Documents\Applications\DirectX\Utilities\bin\x64\fxc.exe /nologo /Emain /Fo "C:\Users\Josh\Documents\DirectX\Chapter 1\Projects\FirstProject\Debug\color.cso" /Od /Zi FX\color.fx". The handle is invalid.
1>
1>
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
and I have no idea how to fix it.
I believe I have all the paths correct, and included files.
Any ideas?
Thanks!