Downloading Correct Dotnet Architecture - asp.net

I have a Mac running M1 Big Sur. When I got on my project 6 months ago I downloaded Dotnet 5 and everything was fine. Last night I downloaded VS 2022 (use VS Code for work) to learn via a Udemy video and it upgraded me to dotnet 6.0.4.
Today when I went to run my dotnet locally on my Run and Debug, I got this error
I've been trying for hours to find a compatible run time for the project but nothing I found is working, closest I got was this article here:
https://github.com/dotnet/runtime/issues/59168 which has a 14 step process further down.
I got dotnet 5 back on my machine, but now I get this error:
What do I need to do to get my architecture right to launch the project? To show my work, these are all the articles I have visited today, I promise I'm not being lazy, I just learned to code via a bootcamp 9 months ago and I am just now learning about these packages and how to use them, a lot of this is just going over my head. Any help would be appreciated.
My work:
https://github.com/dotnet/runtime/issues/52411
https://www.reddit.com/r/dotnet/comments/qwus6a/net_5_sdk_not_installing_properly_on_m1_mac/
https://learn.microsoft.com/en-us/dotnet/core/install/macos?tabs=netcore2x#dependencies
https://github.com/dotnet/sdk/issues/22380

The solution I found for resolving this was to manually remove dotnet from the usr/local/share folder. Then re-install dotnet 5.0 without dotnet 6.

Related

dotnet test command started failing with MSBuild 17.4

We have been using ubuntu-latest agent in Azuredevops to build .netcore 3.1 projects from last one year. Things had been going very smooth until a week ago and all of the sudden, dotnet test command started failing with below error message
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
When we dug deeper, we found that it started happening with MSBuild version 17.4. We then tried to use older version of ubuntu agent (which is using MSBuild 17.3) and then everything went well
I would like to understand the difference between MSBuild 17.3 and 17.4 and possible solution to fix this issue. Could anyone please help me on this?
I suppose that your issue is caused by the agent upgrades to support .NET 6 (.NET core 3.1 will be out of support in December). You could try to upgrade your project to .net 6 or higher.
Or you could test to add the property of <RuntimeFrameworkVersion>7.0.0<RuntimeFrameworkVersion>.

"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.

System.Text.Encoding.CodePages missing in netcoreapp2.0 app

I just installed a clean install of the new .NET Core SDK on a CentOs 7 box. I had a different Linux VM I was running to test this and received the same error there.
I am building my application in VS 2017 on a Windows box and copying the project file over to the Linux box to test it. I am coming from netframework environment and trying to learn dotnetcore so I am sure this is probably just a newb issue. Here is what I am doing.
I run a dotnet restore, which works without error.
I run a dotnet build, which I receive a
Build succeeded.
0 Warning(s)
0 Error(s)
Then I run a dotnet run and receive the following error:
Error:
An assembly specified in the application dependencies manifest (apf-ws.deps.json) was not found:
package: 'System.Text.Encoding.CodePages', version: '4.3.0'
path: 'runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll'
Nowhere in my code do I actually reference any type of Encoding explicitly. I have tried including System.Text.Encoding.CodePages in my project to see if that would add a reference and bring in the library to ignore the one it is looking for, but it doesn't help. Anyone have any ideas of what would be causing this?
I tried several things before wiping the directory out in Linux and copying the files over again. In doing so it seemed to fix the problem.

Launching Springsource tool giving some error

Fow the last few days I used to work on STS. But today it is not launching and giving following window. So, I reinstalled STS. But the problem still exits. Can some one help in sorting it out?
I found the solution after few hours. Some guy had same problem and solved
here:
Eclipse is trying to get the version of java that is installed on system. you might have installed that latest one but there are possibilities that any upgradation of later softwares has replaced the java.exe files in system32 folder with older version. All you need to do is to run eclipse with clean parameters. Create a batch file in the directory where eclipse.exe is and write this line in it eclipse -clean -vmargs -Xmx256m

Getting started with playn - eclipse

I followed all the instructions for setting up the environment in eclipse indigo EE. I did it both in ubuntu 12.04 64bit and Windows 7 64bit, and everything goes good till the point when I try to run the imported example (showcase-java). the build fails and following error appears in the eclipse console:
Failed to execute goal on project playn-showcase-java: Could not resolve dependencies for project com.googlecode.playn:playn-showcase-java:jar:1.0-SNAPSHOT: Could not find artifact com.googlecode.playn:playn-showcase-core:jar:1.0-SNAPSHOT in forplay-legacy (http://forplay.googlecode.com/svn/mavenrepo) -> [Help 1]
Note that I follow all the instructions on Getting Started page and I'm sure I'm not missing out on anything mentioned there on the page.
Hi here is a more detailed tutorial on how to set up eclipse with playn link
May be this is helpful for you.

Resources