Enable m2e logging in JBoss Developer Studio 11 - m2e

JBoss Developer Studio 11.1.0.GA.
I've added the http://download.eclipse.org/technology/m2e/releases/ repository.
Installed m2e - slf4j over logback logging (Optional) 1.8.1.20170728-1531 (picked the version that corresponds to the installed m2e version).
Closed JBDS.
In workspace/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.8.1.20170728-1531.xml changed STDOUT filter's and root logger's levels to DEBUG.
Started JBDS. Opened Maven Console. Did a Maven Update Project. Nothing in console. No 0.log file in the org.eclipse.m2e.logback.configuration directory.
What's wrong? If I remember correctly, this worked in JDBS 10.2.0.GA.
In workspace preferences there is a Maven -> Debug Output setting. AFAIK it does nothing, but I tried enabling it anyway - no effect.
Tried changing <File>${org.eclipse.m2e.log.dir}/0.log</File> to a fixed path - no effect.

Related

"dotnet" command does nothing

I'm trying to install a global package through dotnet cli but the command dotnet does nothing. I don't get an error message that says the command is not found etc. but it also doesn't run.
Between each line, cursor inside the powershell (or command prompt) turns into Working In Background ( ) mode but after just a few seconds, it just gets into the new line without doing anything. During these few seconds, if I move the cursor outside the prompt, it goes back to regular mode. So it's doing something I guess.
What is happening here, and how can I solve this issue?
What have I already tried:
1-) Since my network is behind a proxy, I've added the proxy credentials through NPM configuration commands. (as can be seen here)
(I also set the strict-ssl to false).
2-) Since it didn't do anything, I also used this method and edited the global nuget.config file. But didn't solve any problem.
3-) I tried this too, but setting the environment variable MSBuildSDKsPath seems to do nothing about my problem.
My PATH variable has these:
C:\Program Files\dotnet,
%USERPROFILE%\.dotnet\tools
I also downloaded the latest Dotnet 5.0 SDK and installed it, but nothing.
Only command that works with dotnet is the --list-sdks command which shows this result:
I uninstalled all the .NET SDKs and runtimes, I also removed all the installed modules on both VS 2019 and VS 2022 Preview using the Visual Studio Installer, then restarted my computer.
While installing the SDKs and runtimes from Microsoft's website I checked the .NET version using the command line and command dotnet --version after every installation to see when exactly it starts not working. After installing all the SDK's up to .NET 5, there was no issue. And since I did not really need the .NET 6 SDK I didn't specifically download it thinking VS 2022 Preview would automatically install it anyways.
Using Visual Studio Installer, I installed the necessary components for the dotnet development on the VS 2019 and the previously mentioned command was working on point. Then I proceeded to install the necessary components on the VS 2022 Preview but after installing it, the command started to not work. So there it was, the source of the problem. Something about VS 2022 Preview's installment process just corrupts dotnet cli, but I'm not sure if it's just me.
You also need a restart after all the installments or dotnet cli might show some errors.

dotnet build stopped working after VS 2022 upgrade

I upgraded Visual Studio Community to the final release, and it stopped working. Specifically, I could generate a new project, but when I try to load it, it gave me an error
Critical Project 'SdkTest' load failed| [MSB4236] The SDK 'Microsoft.NET.Sdk.Web' specified could not be found. ...\SdkTest.csproj
Even though build and run worked fine
I ran "repair" on VS2022, and it seems to be working now from Visual Studio. However, dotnet --info doesn't show any SDKs; only runtime; and dotnet build or dotnet new give an error:
C:\Code>dotnet new console -o myapp
Could not execute because the application was not found or a compatible .NET SDK is not installed.
Possible reasons for this include:
* You intended to execute a .NET program:
The application 'new' does not exist.
* You intended to execute a .NET SDK command:
It was not possible to find any installed .NET SDKs.
Install a .NET SDK from:
https://aka.ms/dotnet-download
I even reinstalled .NET 6 and I see it in the list of applications (along with older SDKs). I checked the path, and I see everything that I expect to see:
C:\Program Files (x86)\dotnet\
C:\Program Files\dotnet\
C:\Users\me\.dotnet\tools
I am running Windows 11.
It's known bug in VS2022 installation.
Problem is that dotnet you access is located inside Program Files(x86)/dotnet, but all sdk's are located in Program Files/dotnet. You simply need to edit PATH environment variable so Program Files/dotnet goes before Program Files(x86)/dotnet. If you don't see Program Files(x86)/dotnet in user environment variable (which is likely to happen) then edit system environment variable (located below)
Example with screenshots: https://stackoverflow.com/a/44272417/10339675

Console Application written in .NET 5.0 unable to run on colleague's computer

I wrote a tool at work in .NET 5.0 that I now have to give to a non-developer to use. Unfortunately, no matter how I publish it I can't get it to run on her computer. Currently I have it set at:
Configuration: Release | Any CPU
Target framework: net5.0
Deployment mode: Self-contained
Target runtime: win-x64 (checked that, she definitely has Windows 10 64-bit)
But when she runs it on her PC she gets:
Failed to load the dll from [C:\Users\username\Desktop\Release Builder\hostfxr.dll], HRESULT: 0x800700C1
The library hostfxr.dll was found, but loading it from C:\Users\username\Desktop\Release Builder\hostfxr.dll failed
- Installing .NET prerequisites might help resolve this problem.
https://go.microsoft.com/fwlink/?linkid=798306
I, of course, checked the link and she has above the minimum version of Windows 10. What gives? I'm use to either building web applications or just building console tools for myself. I figured self-contained would mean just handing over the contents of the publish folder.
I should point out, that the publish folder APPEARS to be correct... its over 230 files in there.
Can you try to publish with these settings?
Step 1:
Step 2: Open your .csproj and add these, or swap with yours.
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<PublishReadyToRun>true</PublishReadyToRun>
<PublishSingleFile>true</PublishSingleFile>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<UseWPF>true</UseWPF>
// keep other info
</PropertyGroup>

vscode start debugging does nothing

When I select "Debug > Start Debugging" I'm prompted for the environment and I select ".NET Core" but then nothing happens.
If I type"dotnet run" in the terminal window the program runs just fine.
"Help > About" displays the following;
Version: 1.33.1 (user setup)
Commit: 51b0b28134d51361cf996d2f0a1c698247aeabd8
Date: 2019-04-11T08:27:14.102Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17134
EDIT:
I've tried the 32 and 64 bit versions of .NET Core and the corresponding System and User versions of vscode. In each instance I've tried running as Administrator and normally. I just don't think it's going to work on this machine.
I've done a similar install on Ubuntu and it worked the first time.
EDIT 2:
I finally managed to see this error, but I haven't been able to resolve it.
Cannot create .NET debug configurations. The OmniSharp server is still
initializing or has exited unexpectedly.
The debug freature is provided by the C# (ms-vscode.csharp) extension that uses omnisharp as back-end. So debug not working is probably because omnisharp is not working properly, which is maybe your omnisharp is still downloading (The download source is sometimes unstable) or there are some problems in your project files (csproj and sln files), or the SDK environment is not correctly configured.
If omnisharp is running, you can see the Omnisharp Logitem in the output window, otherwise check the C# item, which may includes the downloading status of omnisharp. Check them and you may get how it is not working, or just paste the exact output logs for help.
I had a similar issue when I hit f5 on a VSCode .net project. It asked me to select the debugger (.net core 5+ or .net framework). However nothing happened no matter what I tried. Clicking on the Debug icon on the left revealed a link to create a launch.json file. Clicking that link created the file and then I was able to debug.
enter image description here

pom.xml no such file or directory

I've got a problem when I am building my project. I uses the springsource tools (STS) version 3.1.0 on Linux platform. After I imported my project to the STS, the springsource tools told me that "No such file or directory" at the pom.xml file. The file is actually exist in the correct path. I think the project is working fine because I've tried to import the same project with the same procedure in the other computer.
When I use console to compile the project with maven, all of them are complied successfully.
I've also tried the following but still not work:
1. reinstall the STS.
2. re-import the project.
3. create a user profile and re-import project.
4. use older version of STS (3.0.0)
I want to import the project to my computer so that I can work with.
Please suggest to resolve the problem. Thanks!
Had "No such file or directory" error on pom.xml in Eclipse Luna SR1.
Tracked it down to be caused by faulty resolution of other projects within the workspace by M2E.
So there are 2 solutions:
Either close the other project in the workspace (a dependency of the project in error).
Or disable workspace resolution by M2E on the project in error (right-click on the project, Maven --> Disable Workspace Resolution).
Obviously, if you need both projects open then option 2. is the way to go. The dependent project then takes the dependency from the local Maven repo, so to refresh it, you have to build and install the dependency into the local repo (mvn install).
I have the same issue. Still didn't find any smart solution, but this sometimes works for me:
Close eclipse
Go to console and do a maven clean install with update flag "mvn clean install -U"
Reboot the computer (logging out and back in didn't help)
Start eclipse and refresh and rebuild your projects

Resources