I have to work on an android application using visual studio. So I started by writing a simple "Hello World" application to print on the console.
It gives the following error:
1>------ Build started: Project: App1, Configuration: Debug Any CPU ------
1> Processing: obj\Debug\res\layout\main.xml
1> Processing: obj\Debug\res\values\strings.xml
1> App1 -> C:\Users\soume\Desktop\App1\App1\bin\Debug\App1.dll
1> Processing: obj\Debug\res\layout\main.xml
1> Processing: obj\Debug\res\values\strings.xml
1> Processing: obj\Debug\res\layout\main.xml
1> Processing: obj\Debug\res\values\strings.xml
2>Starting deploy VisualStudio_android-23_x86_phone ...
2>Starting emulator VisualStudio_android-23_x86_phone ...
2>C:\PROGRA~2\Android\ANDROI~1\tools\emulator.EXE -partition-size 512 -no-boot-anim -avd VisualStudio_android-23_x86_phone -prop monodroid.avdname=VisualStudio_android-23_x86_phone
2>PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT
2>Emulator VisualStudio_android-23_x86_phone cannot be started.
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
After looking for "Cannot find AVD system path. Please define ANDROID_SDK_ROOT" on Google, I thought I may have to set up an environment variable. So I added this to the Path list in System Environmental Variable: C:\Users\soume\.android\avd. However, the error has not changed.
Please suggest what is wrong and how to fix this issue.
Thanks in advance.
Related
I'm having trouble deploying a service onto a local cluster.
...
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:01.47
-------- Package: Project: Project succeeded, Time elapsed: 00:00:01.8640999 --------
3>Started executing script 'Deploy-FabricApplication.ps1'.
3>powershell -NonInteractive -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command ". 'C:\repo\service\Scripts\Deploy-FabricApplication.ps1' -ApplicationPackagePath 'C:\repo\service\pkg\Debug' -PublishProfileFile 'C:\repo\service\PublishProfiles\Cloud.xml' -DeployOnly:$false -ApplicationParameter:#{} -UnregisterUnusedApplicationVersionsAfterUpgrade $false -OverrideUpgradeBehavior 'VetoUpgrade' -OverwriteBehavior 'SameAppTypeAndVersion' -SkipPackageValidation:$false -ErrorAction Stop"
3>Test-ServiceFabricApplicationPackage : The BuildLayout of the application in
3>C:\Users\username\AppData\Local\Temp\TestApplicationPackage_269749895297\o40yhtdd.vi3\Debug is invalid. Code is missing
3>for service Service.
3>At C:\Program Files\Microsoft SDKs\Service
3>Fabric\Tools\PSModule\ServiceFabricSDK\Publish-NewServiceFabricApplication.ps1:163 char:38
3>+ ... tionSuccess = (Test-ServiceFabricApplicationPackage $AppPkgPathToUse)
3>+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3> + CategoryInfo : InvalidOperation: (:) [Test-ServiceFabricApplicationPackage], FabricImageBuilderValidati
3> onException
3> + FullyQualifiedErrorId : TestApplicationPackageErrorId,Microsoft.ServiceFabric.Powershell.TestApplicationPackage
3>
3>Finished executing script 'Deploy-FabricApplication.ps1'.
3>Time elapsed: 00:00:01.4326464
3>The PowerShell script failed to execute.
========== Build: 1 succeeded or up-to-date, 0 failed, 1 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
The above error message says "...\Debug is invalid. Code is missing for service<>". How exactly do I fix this problem? What code is missing?
+I did attempt creating that file path just in case, only to find out that the filepath seems to be randomly generated. That filepath did not exist before.
+I am running VSTS 2019 with admin privilege.
You are seeing the output of a Powershell command named Test-ServiceFabricApplicationPackage. It is reporting that your package layout has an issue:
The BuildLayout of the application in {folder} is invalid. Code is
missing
You can run this script yourself to reproduce, and fix the package layout issue. Compare your package with a working package, to see where the issue is. Maybe one of your manifest files is missing a CodePackage section?
I'm trying to upgrade the sample app (Voting) from Microsoft using Visual Studio 2019.
During the update I get the following error:
4>FABRIC_E_IMAGEBUILDER_UNEXPECTED_ERROR: One or more errors occurred. --> AggregateException: One or more errors occurred. --> FileLoadException: The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)
4>Registration of application type failed.
4>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\PSModule\ServiceFabricSDK\Publish-UpgradedServiceFabricApplication.ps1:258 char:17
4>+ throw "Registration of application type failed."
4>+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4> + CategoryInfo : OperationStopped: (Registration of application type failed.:String) [], RuntimeException
4> + FullyQualifiedErrorId : Registration of application type failed.
The full output is:
1>------ Build started: Project: VotingWeb, Configuration: Debug Any CPU ------
2>------ Build started: Project: VotingData, Configuration: Debug Any CPU ------
2>Waiting for output folder cleanup...
1>Waiting for output folder cleanup...
1>Output folder cleanup has been completed.
2>Output folder cleanup has been completed.
1>VotingWeb -> C:\DEV\Teamcity test\service-fabric-sample-app\VotingWeb\bin\Debug\net472\win7-x64\VotingWeb.exe
2>VotingData -> C:\DEV\Teamcity test\service-fabric-sample-app\VotingData\bin\Debug\net472\win7-x64\VotingData.exe
3>------ Build started: Project: Voting, Configuration: Debug x64 ------
4>------ Publish started: Project: Voting, Configuration: Debug x64 ------
4>Started executing script 'GetApplicationExistence'.
4>Finished executing script 'GetApplicationExistence'.
4>Time elapsed: 00:00:02.7466922
-------- Package started: Project: Voting, Configuration: Debug x64 ------
Das Verzeichnis ist nicht leer.
VotingData -> C:\DEV\Teamcity test\service-fabric-sample-app\VotingData\bin\Debug\net472\win7-x64\VotingData.exe
VotingData -> C:\DEV\Teamcity test\service-fabric-sample-app\VotingData\obj\Debug\net472\win7-x64\PubTmp\Out\
VotingWeb -> C:\DEV\Teamcity test\service-fabric-sample-app\VotingWeb\bin\Debug\net472\win7-x64\VotingWeb.exe
VotingWeb -> C:\DEV\Teamcity test\service-fabric-sample-app\VotingWeb\obj\Debug\net472\win7-x64\PubTmp\Out\
Voting -> C:\DEV\Teamcity test\service-fabric-sample-app\Voting\pkg\Debug
-------- Package: Project: Voting succeeded, Time elapsed: 00:00:34.0353563 --------
4>Started executing script 'Deploy-FabricApplication.ps1'.
4>powershell -NonInteractive -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command ". 'C:\DEV\Teamcity test\service-fabric-sample-app\Voting\Scripts\Deploy-FabricApplication.ps1' -ApplicationPackagePath 'C:\DEV\Teamcity test\service-fabric-sample-app\Voting\pkg\Debug' -PublishProfileFile 'C:\DEV\Teamcity test\service-fabric-sample-app\Voting\PublishProfiles\Cloud.xml' -DeployOnly:$false -ApplicationParameter:#{} -UnregisterUnusedApplicationVersionsAfterUpgrade $false -OverrideUpgradeBehavior 'None' -OverwriteBehavior 'SameAppTypeAndVersion' -SkipPackageValidation:$false -ErrorAction Stop"
4>Application Type VotingType and Version 1.7.2 was already registered with Cluster, unregistering it...
4>Unregister application type succeeded.
4>Copying application package to image store...
4>Upload to Image Store succeeded
4>Registering application type...
4>Register application type started. Use Get-ServiceFabricApplicationType to query for status.
4>Running Image Builder process ...
4>Downloading application package from 'VotingType' ...
4>Downloaded 101/999 Files (10.1% complete)
4>Downloaded 229/999 Files (22.9% complete)
4>Downloaded 291/999 Files (29.1% complete)
4>Downloaded 363/999 Files (36.3% complete)
4>Downloaded 447/999 Files (44.7% complete)
4>Downloaded 559/999 Files (56.0% complete)
4>Validating package and computing checksums ...
4>FABRIC_E_IMAGEBUILDER_UNEXPECTED_ERROR: One or more errors occurred. --> AggregateException: One or more errors occurred. --> FileLoadException: The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)
4>Registration of application type failed.
4>At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\PSModule\ServiceFabricSDK\Publish-UpgradedServiceFabricApplication.ps1:258 char:17
4>+ throw "Registration of application type failed."
4>+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4> + CategoryInfo : OperationStopped: (Registration of application type failed.:String) [], RuntimeException
4> + FullyQualifiedErrorId : Registration of application type failed.
4>
4>Finished executing script 'Deploy-FabricApplication.ps1'.
4>Time elapsed: 00:01:44.9589058
4>The PowerShell script failed to execute.
========== Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
How can I find out which file is in use?
And how can I fix it?
Solution:
In case that someone else faces the same issue, the solution for me was to upgrade the application using Powershell and set the CompressPackage parameter in the Copy-ServiceFabricApplicationPackage command.
Helpfull link: https://learn.microsoft.com/de-de/azure/service-fabric/service-fabric-package-apps
I'm getting "jarsigner.exe" exited with code 1 and I have to change the keystore location for which I don't know how to change in xamarin form in Windows bcoz I copied this project from MAC to Windows and I had a problem in PROGUARD as java.exe exited with error code 1 so I disabled PROGUARD and now jarsigner.exe error
1>C:\Program Files\Java\jdk1.8.0_131\\bin\jarsigner.exe -keystore "/Users/ekambaram/Desktop/CYBER/App Store - Cyb/Cyber Certifcate/my-release-key.keystore" -storepass 098765 -keypass 098765 -digestalg SHA1 -sigalg md5withRSA -signedjar bin\Debug\\com.Cyber.Cyber-Signed-Unaligned.apk E:\CyberPortable\CyberPortable\CyberPortable.Droid\obj\Debug\android\bin\com.Cyber.Cyber.apk Cyber
1>"jarsigner.exe" exited with code 1.
1>Done building project "CyberPortable.Droid.csproj" -- FAILED.
1>Build FAILED.
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
0) Open your Android project Options
1) Select Android Package Signing
2) Select configuration, that your trying to build
3) Check "Sign the .APK ..."
4) Select my-release-key.keystore file on your windows machine, you can copy it from your mac
I have followed the installation instructions found here: https://azure.microsoft.com/en-us/documentation/articles/vs-azure-tools-docker-edit-and-refresh/
and made an empty ASP.Net hello world project. I keep getting this error when I try to build my project:
Error MSB3073 The command "powershell -ExecutionPolicy RemoteSigned .\Docker\DockerTask.ps1 -Build -Environment Debug -Machine 'default'" exited with code 1. HelloWorld C:\dev\HelloWorld\src\HelloWorld\Properties\Docker.targets 37
Upon further digging I get this error:
1>------ Build started: Project: HelloWorld, Configuration: Debug Any CPU ------
1>
1> Build succeeded.
1> 0 Warning(s).
1> 0 Error(s).
1>
1> Time elapsed 00:00:00.0958314
1>
1> .\Docker\DockerTask.ps1 : The term '.\Docker\DockerTask.ps1' is not recognized as the name of a cmdlet, function,
1> script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
1> correct and try again.
1> At line:1 char:1
1> + .\Docker\DockerTask.ps1 -Build -Environment Debug -Machine 'default'
1> + ~~~~~~~~~~~~~~~~~~~~~~~
1> + CategoryInfo : ObjectNotFound: (.\Docker\DockerTask.ps1:String) [], CommandNotFoundException
1> + FullyQualifiedErrorId : CommandNotFoundException
1>
1>C:\dev\HelloWorld\src\HelloWorld\Properties\Docker.targets(37,5): error MSB3073: The command "powershell -ExecutionPolicy RemoteSigned .\Docker\DockerTask.ps1 -Build -Environment Debug -Machine 'default'" exited with code 1.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
I am using Visual Studios 2015 on Windows 10 64bit.
The problem was my working directory was set differently than the default settings. By using the get-location command I was able to figure out where the working directory was and give it the relative path from that directory.
HelloWorld\src\HelloWorld\Docker\DockerTask.ps1
Rightly pointed out by SirJackovich.
The issue was due to a mis-pointed folder path given to msbuild.
To check out what path to modify, follow these steps:
In Properties\Docker.targets,
a. Temporarily change DockerBuildCommand to <DockerBuildCommand>powershell get-location</DockerBuildCommand>.
b. Temporarily change DockerCleanCommand to <DockerCleanCommand>powershell get-location</DockerCleanCommand>.
c. Run build having Docker build target selected (instead of 'IIS Express').
d. From the trace output in the Output window, it will print the folder which is the root for execution. For example, c:\folder1 is the root execution folder for powershell.
e. Lets say DockerTask.ps1 is located in c:\folder1\MyApp\src\App1\DockerTask.ps1. Modify the DockerBuildCommand command within Properties\Docker.targets to point to MyApp\src\App1\DockerTask.ps1. Also Modify the DockerCleanCommand command to point to MyApp\src\App1\DockerTask.ps1.
powershell -ExecutionPolicy RemoteSigned MyApp\src\App1\DockerTask.ps1.ps1 -Build -Environment $(Configuration) -Machine '$(DockerMachineName)' -ClrDebugVersion VS2015U2
powershell -ExecutionPolicy RemoteSigned MyApp\src\App1\DockerTask.ps1 -Clean -Environment $(Configuration) -Machine '$(DockerMachineName)'
f. Rebuild the solution.
This will deploy the image to the default docker environment within docker-machine.
I am compile a sample C# .NET project using build.cmd file. The content of the build.cmd is as bellow.
build.cmd
#echo off
setlocal
set devenv="c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com"
del *.log >nul
%devenv% WindowsFormsApplication3.sln /rebuild "Release" /out WindowsFormsApplication3.log
if ERRORLEVEL 1 GOTO failed
findstr /C:"========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========" WindowsFormsApplication3.log >nul
if ERRORLEVEL 1 GOTO failed
echo *** BUILD SUCCESSFUL ***
pause
goto :EOF
:failed
echo.
echo.
echo *** BUILD FAILED ***
pause
Project compiles properly. But when i opened the log file it hassome error
WindowsFormsApplication3.log
1>------ Rebuild All started: Project: WindowsFormsApplication3, Configuration: Release Any CPU ------
Package 'Code Analysis Package' failed to load.
1> WindowsFormsApplication3 -> E:\Bin\junk\WindowsFormsApplication3\WindowsFormsApplication3\bin\Release\WindowsFormsApplication3.exe
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
I don't why i am getting this error (Package 'Code Analysis Package' failed to load) in log file.
I searched online but did not get any help.
how to solve this problem?
Note: WindowsFormsApplication3 is a sample project. i Opened VS2015 and New Project -> Visual C# -> Windows Form Application. I did not change any thing in the project.
Give Microsoft a chance to analyze and fix the problem.
I created a connect issue because the problem occurs on two PCs that both have vanilla VS 2015 installations.
https://connect.microsoft.com/VisualStudio/feedback/details/2423616/package-code-analysis-package-failed-to-load
Within the next few weeks, a guy from Microsoft will probably comment on that. You can followup there.