System.FormatException in CCnet - build

When I try to Build my project via Cruise Control, I get the fallowing error :
BUILD EXCEPTION
Error Message: System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseUInt64(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.Convert.ToUInt64(String value)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Svn.GetModifications(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModificationsWithLogging(ISourceControl sc, IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModifications(ISourceControl sourceControl, IIntegrationResult lastBuild, IIntegrationResult thisBuild)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.GetModifications(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest request)
Project: TRPMonitor 5.2.0 10G 11G
Date of build: 2012-06-07 13:53:26
Running time: 00:00:03
Integration Request: Build (ForceBuild) triggered from COREBUILDER
I change the version of TortoiseSvn from 1.6 to 1.7 and update the svn command line from 1.6 to 1.7. How can I make my projects build again?
Thanks!
P.S. I went here : http://jira.public.thoughtworks.org/browse/CCNET-634
and here : http://comments.gmane.org/gmane.comp.windows.dotnet.ccnet.user/6126
But it did not solve my problem.
EDIT -
In the CCnet.log I found this (after updating all my files to svn 1.7) :
2012-06-07 15:16:45,579 [72:INFO] Project: 'TRPMonitor 5.2.0 10G 11G' is added to queue: 'TRPMonitor 5.2.0 10G 11G' in position 0. Requestsource : COREBUILDER ()
2012-06-07 15:16:45,594 [TRPMonitor 5.2.0 10G 11G:INFO] Queue: 'TRPMonitor 5.2.0 10G 11G' is attempting to be in-use, trying to lock related queues
2012-06-07 15:16:45,594 [TRPMonitor 5.2.0 10G 11G:INFO] Project: 'TRPMonitor 5.2.0 10G 11G' is first in queue: 'TRPMonitor 5.2.0 10G 11G' and shall start integration.
2012-06-07 15:16:45,594 [TRPMonitor 5.2.0 10G 11G:DEBUG] Checking if C:\REP\TRUNKS_5.2.0\TRPMonitor\trunks_5.01.1 is a svn working folder
2012-06-07 15:16:45,594 [TRPMonitor 5.2.0 10G 11G:DEBUG] Starting process [C:\Program Files\svn-win32-1.7.5\svn.exe] in working directory [C:\REP\TRUNKS_5.2.0\TRPMonitor\trunks_5.01.1] with arguments [info http://xx.xx.xxx.xx/svn/svn-payments-core/ --username XXXXXXXX --password ******** --no-auth-cache --non-interactive --xml]
594 [TRPMonitor 5.2.0 10G 11G:DEBUG] Not setting PriorityClass on [C:\Program Files\svn-win32-1.7.5\svn.exe] to default Normal
844 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] <?xml version="1.0" encoding="UTF-8"?>
844 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] <info>
844 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] <entry
844 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] path="svn-payments-core"
844 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] revision="75905"
844 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] kind="dir">
844 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] <url>http://xx.xx.xxx.xx/svn/svn-payments-core</url>
844 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] <repository>
844 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] <root>http://xx.xx.xxx.xx/svn/svn-payments-core</root>
844 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] <uuid>12d69269-45e3-204f-b74b-a9c2047a3d92</uuid>
2012-06-07 15:16:45,844 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] </repository>
2012-06-07 15:16:45,844 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] <commit
844 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] revision="75905">
844 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] <author>XXXXXX</author>
844 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] <date>2012-06-07T19:15:34.949697Z</date>
844 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] </commit>
844 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] </entry>
844 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] </info>
954 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] standard-error stream closed -- null received in event
954 [4:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] standard-output stream closed -- null received in event
969 [72:DEBUG] [TRPMonitor 5.2.0 10G 11G C:\Program Files\svn-win32-1.7.5\svn.exe] process exited event received
985 [TRPMonitor 5.2.0 10G 11G:WARN] Source control failure (GetModifications): Input string was not in a correct format.
It seems that the error comes from the SVN command line ...

Looking at the release notes for svn 1.7, it looks like there were changes to how the metadata is stored (instead of multiple .svn folders, there is now only one.) Try deleting all of the source code on the build box and let ccnet re-pull everything.

Related

CentOS - Has AspNetCore.App 5.0.6 but needs AspNetCore.App 5.0.0

I am trying to run a .NET 5 console application (developed on Windows) in a docker container on CentOS 7.
I have the following:
[root#AU4RLBNAGV04A KLM Releases]# dotnet --list-runtimes
Microsoft.AspNetCore.App 3.1.15 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.15 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
But I get this error when I run the container:
[root#AU4RLBNAGV04A KLM Releases]# docker logs klmcontainer
It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '5.0.0' was not found.
- No frameworks were found.
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
- https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=5.0.0&arch=x64&rid=debian.10-x64
I tried to install version 5.0.0, but I get this error:
[root#AU4RLBNAGV04A KLM Releases]# sudo yum install aspnetcore-runtime-5.0.0
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
No package aspnetcore-runtime-5.0.0 available.
Error: Nothing to do
How can I resolve this?

cloud foundry hosting on ubuntu fails

I am trying to host my django application in cloudfoundry.
But hosting is failing with following error:
**ERROR** Error running supply: failed to apt-get update Get:1 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:2 https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease [3,959 B]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages [166 kB]
Err:4 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages
File has unexpected size (93512 != 165979). Mirror sync in progress? [IP: 13.91.48.226 443]
Hashes of expected file:
- Filesize:165979 [weak]
- SHA512:ce0cd5497cdc9242a0e841113b3c280aa381555b20cde125fb1ded717ba89d936f004d0e64c83b3b6d5e2ef42756352975feb16ae5c7271cdcf631ffe6c3872a
- SHA256:179eb71f2afb4a72bf5b11180b4d4c9ccf1644076dd75f5a7bbf880ecefafbba
- SHA1:381a8321619083a4063fa8381bf3aa12a2dac5a3 [weak]
- MD5Sum:54c730dd6a33c612b2ae3c23fe0cfcb7 [weak]
Release file created at: Thu, 12 Dec 2019 19:59:19 +0000
Get:5 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1,344 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
Get:8 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,322 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1,057 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [10.5 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [795 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [6,781 B]
Get:14 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages [761 kB]
rm: cannot remove '/var/cache/apt/archives/partial/*.deb': Permission denied
Fetched 17.2 MB in 3s (5,576 kB/s)
Reading package lists...
W: Conflicting distribution: https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease (expected bionic but got stable)
E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/dists/bionic/main/binary-amd64/Packages.gz File has unexpected size (93512 != 165979). Mirror sync in progress? [IP: 13.91.48.226 443]
Hashes of expected file:
- Filesize:165979 [weak]
- SHA512:ce0cd5497cdc9242a0e841113b3c280aa381555b20cde125fb1ded717ba89d936f004d0e64c83b3b6d5e2ef42756352975feb16ae5c7271cdcf631ffe6c3872a
- SHA256:179eb71f2afb4a72bf5b11180b4d4c9ccf1644076dd75f5a7bbf880ecefafbba
- SHA1:381a8321619083a4063fa8381bf3aa12a2dac5a3 [weak]
- MD5Sum:54c730dd6a33c612b2ae3c23fe0cfcb7 [weak]
Release file created at: Thu, 12 Dec 2019 19:59:19 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.
exit status 100
Failed to run all supply scripts: exit status 14
Exit status 225
Cell c33058db-3c05-4f3f-99db-d13037e2f2d7 stopping instance f82bda74-79bc-4110-9495-161830f18ffd
Cell c33058db-3c05-4f3f-99db-d13037e2f2d7 destroying container for instance f82bda74-79bc-4110-9495-161830f18ffd
Cell c33058db-3c05-4f3f-99db-d13037e2f2d7 successfully destroyed container for instance f82bda74-79bc-4110-9495-161830f18ffd
Error staging application: Staging error: staging failed
FAILED
following is my apt.yml:
---
keys:
- https://packages.microsoft.com/keys/microsoft.asc
repos:
- deb [arch=amd64] https://packages.microsoft.com/ubuntu/18.04/prod bionic main
packages:
- msodbcsql17
- mssql-tools
- unixodbc-dev
It was working till yesterday evening. But today suddenly stopped working. i tried to re login using cf-login and rebooted my system. still no luck. please help me resolve it.
Original Response
This may be related to
what-causes-failed-to-fetch-file-has-unexpected-size-mirror-sync-progress.
It appears the dist was updated at 13-Dec-2019 01:34, so what ever mirror you're using might not be up to date yet.
Try to explicitly add the Microsoft registry:
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/prod
sudo apt-get update
as per the documentation.
New Response (Fixed by developers)
Has been resolved see: https://github.com/dotnet/core/issues/3995
It wasn't the mirror, it was a repository issue.
It looked like the InRelease file wasn't up to date given that the distro was updated in the morning (2019-12-13) and the release updated the previous day.
For instance if you did a manual check of the MD5, SHA256 and file size, for Packages.gz, you would have found that there were discrepancies:
MD5 actual: 712391F77F24F2D9962FEE41CD41C55D, reported in InRelease: 54c730dd6a33c612b2ae3c23fe0cfcb7 for main/binary-amd64/Packages.gz
SHA256 actual: 28B8996AF9C6D5A3298F1EDC3427C1DED03E69D5EFCECF8469A075083AA01557, reported in InRelease: 179eb71f2afb4a72bf5b11180b4d4c9ccf1644076dd75f5a7bbf880ecefafbba for main/binary-amd64/Packages.gz
File size actual: 93512 bytes, expected: 165979.
After the fix, though, the values reported in the InRelease corresponded with manual checks.
There were (2019-12-13) issues open for something similar:
https://github.com/dotnet/core/issues/3988
https://github.com/dotnet/core/issues/2731
https://github.com/microsoft/vscode/issues/86925
Did nothing, no changes, but tried after 2 days. it worked.

Couldn't set up mod_wsgi for my Apache and Django

Need guides to set up mod_wsgi on Windows for my XAMPP Apache and Django project. I'm using Python 3.7.3(win32), Django 2.2.3 and Apache 2.4.39(win64).
Errors appear when after i set "MOD_WSGI_APACHE_ROOTDIR=C:\xampp\apache\bin" and pip install mod_wsgi. I'm not sure what i did wrong at this step?
Read about Visual Code 14.0. Downloaded it and i still got error.
ERROR: Command errored out with exit status 1:
command: 'c:\program files (x86)\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\CHEEHO~1\\AppData\\Local\\Temp\\pip-install-41s5l0d2\\mod-wsgi\\setup.py'"'"'; __file__='"'"'C:\\Users\\CHEEHO~1\\AppData\\Local\\Temp\\pip-install-41s5l0d2\\mod-wsgi\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\CHEEHO~1\AppData\Local\Temp\pip-record-um32pphd\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\CHEEHO~1\AppData\Local\Temp\pip-install-41s5l0d2\mod-wsgi\
Complete output (33 lines):
c:\program files (x86)\python37-32\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\mod_wsgi
copying src\__init__.py -> build\lib.win32-3.7\mod_wsgi
creating build\lib.win32-3.7\mod_wsgi\server
copying src\server\apxs_config.py -> build\lib.win32-3.7\mod_wsgi\server
copying src\server\environ.py -> build\lib.win32-3.7\mod_wsgi\server
copying src\server\__init__.py -> build\lib.win32-3.7\mod_wsgi\server
creating build\lib.win32-3.7\mod_wsgi\server\management
copying src\server\management\__init__.py -> build\lib.win32-3.7\mod_wsgi\server\management
creating build\lib.win32-3.7\mod_wsgi\server\management\commands
copying src\server\management\commands\runmodwsgi.py -> build\lib.win32-3.7\mod_wsgi\server\management\commands
copying src\server\management\commands\__init__.py -> build\lib.win32-3.7\mod_wsgi\server\management\commands
creating build\lib.win32-3.7\mod_wsgi\docs
copying docs\_build\html\__init__.py -> build\lib.win32-3.7\mod_wsgi\docs
creating build\lib.win32-3.7\mod_wsgi\images
copying images\__init__.py -> build\lib.win32-3.7\mod_wsgi\images
copying images\snake-whiskey.jpg -> build\lib.win32-3.7\mod_wsgi\images
running build_ext
building 'mod_wsgi.server.mod_wsgi' extension
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
creating build\temp.win32-3.7\Release\src
creating build\temp.win32-3.7\Release\src\server
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -IC:\xampp\apache\bin/include "-Ic:\program files (x86)\python37-32\include" "-Ic:\program files (x86)\python37-32\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcsrc/server\mod_wsgi.c /Fobuild\temp.win32-3.7\Release\src/server\mod_wsgi.obj
mod_wsgi.c
C:\Users\Chee Hong\AppData\Local\Temp\pip-install-41s5l0d2\mod-wsgi\src\server\wsgi_apache.h(42): fatal error C1083: Cannot open include file: 'httpd.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.22.27905\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files (x86)\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\CHEEHO~1\\AppData\\Local\\Temp\\pip-install-41s5l0d2\\mod-wsgi\\setup.py'"'"'; __file__='"'"'C:\\Users\\CHEEHO~1\\AppData\\Local\\Temp\\pip-install-41s5l0d2\\mod-wsgi\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\CHEEHO~1\AppData\Local\Temp\pip-record-um32pphd\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
I need to deploy my Django on Apache web server.
In windows apache configuration for Django project is slightly different than that of Ubuntu.
We cannot find mod_wsgi.so module for windows to include it as LoadModule in apache httpd.conf.
Alternatively we can do the following setup for successfully running Django project in apache server.
Install latest version of apache
download mod_wsgi source code from https://github.com/GrahamDumpleton/mod_wsgi
Activate python virtual environment
cd to mod_wsgi folder where it downloaded
Run the following command
python setup.py install
mod_wsgi package is installed in python virtual environment
Now some configuration has to be included in httpd.conf file of apache in order to run web app. So, run the following command
mod_wsgi-express module-config
output of the command is-
LoadFile "c:/path_to/python37.dll"
LoadModule
wsgi_module
"d:/virtual_environment/lib/site-packages/mod_wsgi-4.7.1-py3.7-win-amd64.egg/mod_wsgi/server/mod_wsgi.cp37-win_amd64.pyd" WSGIPythonHome "d:/virtual_environment"
Include the above in apache httpd.conf file.
Now to run web app of django in apache, some more configuration has to be
done at apache httpd.conf file. In windows running daemon process is
not possible. So alternatively the httpd.conf setup information can
be found in official link of django
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/modwsgi/
The set up is done and web app will run successfully in apache!!

NetCore project does not publish, keeps giving error of versioning mismatch

I have a asp.net core project and it's supporting libraries all in .net core version 2.2. They run, I can debug, they also work in release mode. However when I try to publish them, I get a list of errors. The main cause is shown as the web project:
Error NU1202: Package Microsoft.NETCore.App 2.2.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.NETCore.App 2.2.0 supports: netcoreapp2.2 (.NETCoreApp,Version=v2.2)
after which this error keeps repeating for every project that the web project references/uses in the solution.
I have verified the dependencies and here's what I see in the web project:
and this:
as you can see the project references the latest version 2.2.0. So I have no idea where is it picking this netcoreapp2.1?
if that is the problem with configuration, why this error does not show up during debug and release build or even debugging. Just to note my publish is based on Release build and it uses netcore 2.2 as framework dependent.
This is what I get if I run dotnet --list-runtimes
Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0-preview-18579-0056 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview-27122-01 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0-alpha-27128-4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
The issue is likely to do with your publish settings in Visual Studio. You have two ways of fixing the issue.
Option A. Edit the file FolderProfile.pubxml under the folder \Properties\PublishProfiles directly and change the target framework from 2.1 to 2.2 under:
<TargetFramework>netcoreapp2.2</TargetFramework>
or
Option B. Go to publish menu and click Configure... It appears that just going to menu and clicking save will fix the issue since the menu defaults to the the project default 2.2.
Hope this fixes your problem.
I think that your installed runtime is .net core hosting 2.1.
You should download the dotnet runtime 2.2 or higher version.

"ionic cordova build android" fails to buld apk

I have set all the required environments. To confirm i checked the requirements to build android using command
cordova requirements
which gave the result as below
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-26,android-25,android-24,Google
Inc.:Google APIs:24,android-23
Gradle: installed C:\Program Files\Android\Android Studio\gradle\gradle-3.2\bin\gradle
when i tried to build apk using command
ionic cordova build android
am getting as below
> ionic cordova prepare
> cordova prepare
- Running command [12:17:44] lint finished in 4.70 s
√ Running command - done!
> cordova build android
× Running command - failed!
[ERROR] An error occurred while running cordova build android (exit code 1):
ANDROID_HOME=C:\Users\Arunkumar.DESKTOP-59TSCLF\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_144
The system cannot find the path specified.
Error: cmd: Command failed with exit code 1
Previously I had also faced this problem. I solved my problem by this way. I have installed Gradle in C:\Program Files\gradle\gradle-3.3. I set the Gradle path like that
GRADLE_HOME C:\Program Files\gradle\gradle-3.3
Add Path C:\Program Files\gradle\gradle-3.3\bin