I've tried many configurations, but I keep getting the following error upon opening eclipse:
Eclipse is running in a JRE, but a JDK is required
I've tried following the instructions in the following SA questions: 1, 2
The things I tried in the eclise.ini file:
Various -vm configurations:
-vm C:\Program Files\Java\jdk1.6.0_25\bin
-vm C:\Program Files\Java\jdk1.6.0_25\bin\java.exe
-vm C:\Program Files\Java\jdk1.6.0_25\jre\bin
-vm C:\Program Files\Java\jdk1.6.0_25\jre\bin\java.exe
Various -vm location :
as first line
as last line
just before -vmargs
just before showsplash
With and without -Dosgi.requiredJavaVersion = 1.6
Also, in eclipse\Window\Preferences\Java\Installed JREs I added C:\Program Files\Java\jdk1.6.0_25\jre and marked it (and unmarked the default jre6)
What am I missing?
See this answer regarding running eclipse in JDK
Related
I'm working in a virtual environment in VS Code and I can't understand why I'm getting this error:
[2022-07-19T10:00:31.580Z] A host error has occurred during startup operation '609dfded-e9f5-4fc4-b3a3-554bde11a415'.
[2022-07-19T10:00:31.582Z] Microsoft.Azure.WebJobs.Extensions.Http: Could not load file or assembly 'System.Net.Http.Formatting, Version=5.2.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Value cannot be null. (Parameter 'provider')
What should I check?
Rolled back nuget package Microsoft.NET.Sdk.Functions from 4.1.3 to 4.1.1 on the Azure functions Api project.
Rebuild solution.
I had this issues as well, and my solution was to re-download and re-install the Azure Function Core Tools. I think installing twice fixed the issue for me.
This fixed it for me, hope it helps someone else
Close Visual Studio
Delete folder C:\Users***\AppData\Local\AzureFunctionsTools
Restart Visual Studio.
Launch Application, folder gets recreated.
Taken from
Unable to upgrade Azure Functions Core Tools, Exception "Cannot create instance of type 'NuGet.Versioning.VersionRange'"
We encountered a similar problem after updating Microsoft.Azure.WebJobs.Extensions.Http to 3.2.0
Developers using Rider had no problems but no Visual Studio users could run our project.
This post explained it for us: https://weblogs.asp.net/sfeldman/updating-azure-functions-tools.
Just by creating a new azure functions project, the latest version for AzureFunctionsTools was downloaded to \AppData\Local\AzureFunctionsTools.
Then we could run the project without errors.
My solution to this issue was to go into Windows Defender and exclude:
C:\Program Files\Microsoft\Azure Functions Core Tools\func.exe
I then reinstalled Azure Functions Core Tools v4 and everything worked as intended.
Ps. After excluding make sure to give time for your system to update. I restarted and all worked as intended. Hope this helps someone.
I had this exact issue until Yesterday when I tried updating Azure Function Core Tools (https://learn.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=v4%2Cwindows%2Ccsharp%2Cportal%2Cbash) That resolved the problem, and I now am able to run my function's project using the CLI
For me, relaunching Azure Functions Core Tools installer and choose repair fixed the issue. I had been encountering this issue in the last two days and it's really annoying.
I believe the cause is that the Azure Functions Core Tools (henceforth AFCT) that Visual Studio (or VS Code) uses does not have the proper version of Microsoft.Azure.WebJobs.Extensions.Http.dll. Installing AFCT doesn't affect anything directly, because VS uses its own version stored elsewhere. My strategy was to install the latest AFCT version and point VS to that new version.
These instructions are for x64 Windows.
Install latest Azure Functions Core Tools
Using the below PowerShell code, move VS's old version of AFCT, then point VS to the newly installed version
Move old AFCT, point VS at new version
# Find Afct in Program Files
$PfMicrosoftPath = Join-Path -Path $env:ProgramFiles -ChildPath 'Microsoft'
$AfctPath = Join-Path -Path $PfMicrosoftPath -ChildPath 'Azure Functions Core Tools'
# Find the latest Aft in your Local AppData
$VsAftPath = Join-Path -Path $env:LOCALAPPDATA -ChildPath 'AzureFunctionsTools'
$VsAftReleasePath = Join-Path -Path $VsAftPath -ChildPath 'Releases'
$VsLatestAfctPath = Get-ChildItem -Path $VsAftReleasePath | Sort-Object -Property Name -Descending | Select-Object -First 1 -ExpandProperty FullName
$VsAfctCliPath = Join-Path -Path $VsLatestAfctPath -ChildPath 'cli_x64'
$VsAfctBackupPath = Join-Path -Path $VsLatestAfctPath -ChildPath 'cli_x64_backup'
# Move the existing AFCT and create a symlink
Move-Item -Path $VsAfctCliPath -Destination $VsAfctBackupPath -Confirm:$true
New-Item -Type Junction -Path $VsAfctClipath -Target $AfctPath`
The accepted answer didn't totally fix the issue for me, but I did find that the package Microsoft.NET.Sdk.Functions(4.1.3) does cause the issue, but I found another one does as well, so it will depend on what other packages you have in your app.
So, start with downgrading that package to (4.1.1), if that doesn't fix the issue, downgrade all packages and upgrade them one by one and try running the app after each upgrade.
In my case the other package that was causing the issue along with the above package was Microsoft.Extensions.Http.Polly(7.0.0), the highest that worked for me was (6.0.11)
In my case i just executed this command in my vs code project where the tool i would use was the v4 :npm install -g azure-functions-core-tools#4 --unsafe-perm true
You can check your machine and use the latest version of azure-functions-coretools.
For those are using Rider, go to settings > tools > Azure > Functions > Upgrade your tools to latest one (the version 4.0.4785 fixed my issue).
I uninstalled my older version of android studio (1.4.1) which was working properly (this installation was done a long time ago, and ADK and android studio were installed separately, in fact if I remember correctly I had the ADK installed for use with Eclipse, and I just updated paths in Android Studio to point to that location to use ADK for Android Studio )
I installed android-studio-bundle-162.4069837-windows.exe which apparently comes with both IDE and ADK
However after installation, Android Studio just doesn't start up
I have already added both JDK_HOME and JAVA_HOME to environment variables and the problem is the same
Double clicking on studio.exe studio.exe to get launched (I can see it in the Task Manager for a while) then it just closes (no error message, no IDE splash screen, nothing at all; in fact, if I wasn't looking at the task manager I wouldn't even know if anything was happening)
Computer setup:
Windows 7 service pack 1 32 bit
Android Studio is installed at
C:\Program Files\Android\Android Studio
studio.exe is in
C:\Program Files\Android\Android Studio\bin
Contents of studio.exe.vmoptions
#
# *DO NOT* modify this file directly. If there is a value that you would like to override,
# please add it to your user specific configuration file.
#
# See http://tools.android.com/tech-docs/configuration
#
-server
-Xms256m
-Xmx750m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-da
-Djna.nosys=true
-Djna.boot.library.path=
-Djna.debug_load=true
-Djna.debug_load.jna=true
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Didea.paths.selector=AndroidStudio2.3
-Didea.platform.prefix=AndroidStudio
-Didea.jre.check=true
Location of Java:
C:\Program Files\Java\jdk1.7.0_25
I installed android-studio-bundle-162.4069837-windows.exe
android-studio-bundle-162.4069837-windows.exe is for 64-bit OS, whereas, you need to download and install the one with android-studio-ide-162.4069837-windows32.zip
As you can see here: https://developer.android.com/studio/index.html#downloads
Meaning that, the one you are stating that the one you downloaded targets to: Android Studio Windows 64-Bit [Top link in the table]
Whereas, you need to download and install the one which is: Android Studio Windows 32-Bit [4th link from top in the table]
Also, if you look closely, it is explicitly stated that the one you downloaded is 64-Bit & has -bundle suffix & .exe extension, which also includes Android SDK, but the one your PC supports explicitly has -ide suffix & .zip extension. Included: No Android SDK, no installer
Am following Microsoft's "Getting Started" tutorial to deploy a Node.js Express app as a Cloud Service.
After carefully installing all the tools on two machines, one Win 7 and one Win 8, I get down to the point of generating "Hello World" and the tutorial suggests running the intuitively named: New-AzureServiceProject helloworld in Windows PowerShell.
Here is what happens:
PS C:\node> New-AzureServiceProject helloworld
New-AzureServiceProject : Could not find a part of the path 'C:\Program Files (x86)\Microsoft
SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureRM.Profile\Resources\Scaffolding\General\scaffold.xml'.
At line:1 char:1
+ New-AzureServiceProject expressapp
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureServiceProject], DirectoryNotFoundException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding.NewAzureServiceProjectCommand
Taking a look at my system after installing Powershell and the Azure SDK as instructed, I DO have a directory:
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureRM.Profile
However, that directory does NOT have a subdirectory "Resources" and hence it never finds the scaffold.xml file....
I tried creating the subdirectory Resources\Scaffolding\General inside of AzureRM.profile. That changed the error to simply "could not find scaffold.xml"
I tried setting the write positions on "General" to be wide open. No change.
The above error is on the Win 8 machine. On my Win 7 machine after digging more carefully into the install and going multiple layers deep into prereqs not mentioned in the tutorial, AzureRM.Profile ends up installed in C:\Program Files\C:\Program Files\WindowsPowerShell\Modules rather than in C:\Program Files (x86)\Microsoft
SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager but the behavior is identical.
I have looked all over the web and have not been able to find any information on the missing scaffold.xml that might point to a solution. Is this a template that New-AzureServiceProject needs to create the app? Or is this something that is supposed to be generated by New-AzureServiceProject?
Any suggestions would be appreciated...
Thanks!
I solved this problem by copying folder
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Services\Resources
to
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureRM.Profile
Need to copy the Resources folder from:
C:\Program Files\WindowsPowerShell\Modules\Azure\3.1.0\Compute
to
C:\Program Files\WindowsPowerShell\Modules\AzureRM.profile\2.3.0\Resources\Scaffolding\General
According your error message from PowerShell, it seems that you miss installed powershell AzureRM.* modules.
Please try to run the following commands from the Windows PowerShell console running as Administrator:
PS C:\> Install-Module AzureRM
PS C:\> Install-AzureRM
Then run New-AzureServiceProject helloworld again.
Meanwhile, if you want to get started with the node.js application on Azure Web Apps, you can refer to Azure Website Cmdlets.
Apologies for the terrible experience. This looks like a bug in one particular version of Azure PowerShell. To diagnose, we would need to know which version - if you used the msi installer, or WebPI, you will find thins in the 'Uninstall a Program' control panel, the entry is 'Microsoft Azure PowerShell'.
One piece of confusion in some of the comments - the hosted service cmdlets are part of the older RDFE (Service Management) commands in Azure. The cmdlets that support these are in the 'Azure' module, and not in any of the 'AzureRM' modules.
To install the latest version, I highly encourage you to use Web Platform Installer, or the msi installer that you can retrieve from our GitHub repo. PowerShell Gallery is a great solution as well, if you are very comfortable with PowerShell module management.
I will bring this tutorial to the attention of the documentation team. Meanwhile, if you can identify the azure powershell version and the sdk version you are using, I can see if there is a fix for the problem.
Copy content from
C:\Program Files\WindowsPowerShell\Modules\Azure\4.3.1\Services\Resources\Scaffolding\General
To
C:\Program Files\WindowsPowerShell\Modules\AzureRM.profile\3.3.1\Resources\Scaffolding\General
for creating certificate run this command
pvk2pfx.exe -pvk C:\myCerts\ELServer.pvk -spc C:\myCerts\ELServer.cer -pfx C:\myCerts\ELServer.pfx
following error occurred in command prompt
'pvk2pfx.exe' is not recognized as an internal or external command,
operable program or batch file.
I got exactly this error. The first thing I did was try to search for the .exe using Powershell:
Get-ChildItem -Path C:\ -Filter pvk2pfx.exe -Recurse -ErrorAction SilentlyContinue -Force
I could not find it but I could find makecert.exe with this command.
Turned out I did not have the package Desktop development with C++ installed for Visual Studio 2017. After I added this everything worked. Remember to run the command through Developer Command Prompt for VS 2017.
If you do not use Visual Studio 2017 you can download Windows Driver Kit (WDK) from here instead:
https://developer.microsoft.com/en-us/windows/hardware/windows-driver-kit
I ran the command in VS2012 command prompt which is available in
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2012\Visual Studio Tools\ in the name of
VS2012 x86 Native Tools Command Prompt
You can also use VS2017 command prompt which is available in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2017\Visual Studio Tools\VC in the name of
x86 Native Tools Command Prompt for VS 2017
You can do windows + s key and then type command and open the X86 based command prompt to run the command.
it's not in your PATH environment variable. add it to PATH or just navigate to the directory where that exe is.
I'm trying to set up a Jenkins CI server to deploy a .NET 4.5 app but I cant for the life of me find the msbuild exe on my windows 8 machine running visual studio 2012. Any ideas?
Make sure that you have installed the corresponding .Net framework.
You can find the build.exe by following this sample path
C:\Windows\Microsoft.NET\Framework\v4.5\MSBuild.exe
The correct way to locate MSBuild is to use the registry.
Here's a powershell implementation of finding a specific version of the .exe
$regKey = "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\${Version}"
$itemProperty = Get-ItemProperty $RegKey -ErrorAction SilentlyContinue
if ($itemProperty -ne $null -and $itemProperty.MSBuildToolsPath -ne $null)
{
$msBuildPath = Join-Path $itemProperty.MSBuildToolsPath -ChildPath "MsBuild.exe"
}
I do not like neither of the other answers. Because in C:\Windows\Microsoft.NET\Framework\ or registry you cannot find new msbuild version that was installed with visual studio or separately as build tools. The best way is to use vswhere
find msbuild