I have set in the compiler settings warning level 0 in the Release configuration, however it keeps changing it back to warning level 6, and as a result anytime I run
dotnet build /my/prpject.csproj --configuration Release
it still insists on displaying warnings as it compiles. WHY?
I am using the latest .NET 6.0 SDK on Ubuntu Server 22.04 (Jammy) to build the project.
My dev environment is Visual Studio for Mac 17.3.2 (Build 24) on macOS 12.5.1
Related
Omnisharp does not seem to recognize my installed .NET sdk (version 6.0.408).
I have tried manually adding this path via settings to Omnisharp: SDK path i.e.:
C:\Program Files\dotnet\sdk\6.0.403
I have also tried reinstalling the SDK and even VSCode.
This does not seem to solve the issue however, and I am unable to run my asp.net application on VSCode. Running dotnet run from the terminal is fine.
TLDR: Both .NET SDK versions and Visual Studion versions needed to be x64.
Here was the exact error I was seeing in the Output Window:
[ERROR] A .NET 6 SDK for x86_64 was not found. Please install the
latest x86_64 SDK from
https://dotnet.microsoft.com/en-us/download/dotnet/6.0.
[ERROR] Error: OmniSharp server load timed out. Use the
'omnisharp.projectLoadTimeout' setting to override the default delay
(one minute).
When I realized there was a mismatch between my .NET SDKs and Visual Studio Code in terms of being x86 and x64, I did the following:
Deleted the bin/obj folders and .vscode folders in my VS Code project.
Uninstalled my .NET SDKs via Windows (Setings > Apps).
Uninstalled Visual Studio Code via Windows (Setings > Apps).
Installed .NET 7.0 x64 and .NET 6.0 x64.
Opened PowerShell and ran dotnet --info to make sure my .NET runtime and SDK were appearing correctly.
Installed Visual Studio Code x64.
Used PowerShell and cd'd to my project folder. Did a dotnet restore. Then launched Visual Studio Code using code . command.
I could then use the most current version of the VS Code extension (v1.25.2).
Uninstalling and then installing the VSCode extension C# for Visual Studio Code solved the issue for me.
I had the same problem and just solved it. Copy and pasting this from a Youtube comment I just finished writing, so it might sound funny out of context, but the good bits are in there. Hope it helps.
Installed dotnet 7.0, but then it said dotnet 6 was missing...
So I deleted the script asset, exited Unity, went back to their website and installed Net 6.0.403
Error still happened.
I'll note this seemed to push a script compiling error out to Unity in the inspector window, as well.
Deleted the script asset again, exited Unity again, then uninstalled both dotnet 7 and dotnet 6.
Then I reinstalled dotnet 6.
Into unity, made a new script, opened it, and this time no error message about missing net 6.
I just started yesterday. Literally. So if my solution is trash, I'll laugh with you lol. Best of luck.
I'm trying to run a small app using .NET Core 2.x SDK on a Macbook. So far I've run dotnet restore to restore NuGet packages and then dotnet build to build the webapp. However when I input dotnet run I get the following error in my terminal.
Failed to load /usr/local/share/dotnet/shared/Microsoft.NETCore.App/2.0.9/libhostpolicy.dylib, error: dlopen(/usr/local/share/dotnet/shared/Microsoft.NETCore.App/2.0.9/libhostpolicy.dylib, 0x0001): tried: '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/2.0.9/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/libhostpolicy.dylib' (no such file), '/usr/lib/libhostpolicy.dylib' (no such file)
An error occurred while loading required library libhostpolicy.dylib from [/usr/local/share/dotnet/shared/Microsoft.NETCore.App/2.0.9]
The version I downloaded was .NET SDK Arm64 as .NET SDK x64 didn't seem to work for the dotnet commands I mentioned previously. I'm not familiar with .NET at all so any help for this error would be greatly appreciated.
I have recently upgraded our .Net Core 2.2 application to .Net 5.0. I'm now trying to upgrade our TeamCity build agent, so it can build this solution.
Installed the .Net 5.0 SDK on the build agent, and restarted the machine.
Installed the latest Community edition of Visual Studio on the build agent as well.
When I try to run a build on the agent using "dotnet msbuild", it shows this error message:
[Building CodeEngineQueryBuilder4] C:\Program Files\dotnet\sdk\5.0.202\Microsoft.Common.CurrentVersion.targets(1216,5): error MSB3971: The reference assemblies for ".NETFramework,Version=v5.0" were not found. You might be using an older .NET SDK to target .NET 5.0 or higher. Update Visual Studio and/or your .NET SDK.
More info:
RDPed onto the build agent and run "dotnet --info" on the command line, which gave me ".Net SDK Version 5.0.203"
I did find directory "C:\Program Files\dotnet\sdk\5.0.203" on the build agent, so it seems .Net 5.0 is installed.
The build agent runs Windows 8.1.
The TeamCity installation is on the latest version.
What am I missing here?
In the end, I found that I had to change the system environment variable MSBuildSdksPath
to make it point at the new .net5 Sdk directory.
In my case, I repointed it at:
C:\Program Files\dotnet\sdk\5.0.203\Sdks
I have started new test project .net core web from Ubuntu Linux console, and when I am trying to run it, I am getting an error:
/tmp/.NETCoreApp,Version=v2.1.AssemblyAttributes.cs(5,1):
error CS1022: Type or namespace definition, or end-of-file expected [/home/alex/projects/test/test/test.csproj]
The build failed. Please fix the build errors and run again.
Ubuntu Linux 18.04
ASP.NET Core 2.1
I have reinstalled SDK full reinstall with apt-autoremove, and install again, nothing changed
Strange thing but i have reinstalled SDK again, reboot the machine and after that all is ok.
I couldn't get Meteorite and Telescope running on windows 7, any ideas how should we do this?
Here's what I tried:
installed Meteor on win7 using win.meteor.com
tried to install Meteorite (following instructions on its Github page), but it threw
couple errors (although it finished installation):
C:\Users\Daler\AppData\Roaming\npm\node_modules\meteorite\node_modules\ddp\node_modules\w
s\build\bufferutil.vcxproj(18,3): error MSB4019: The imported project
"C:\Microsoft.Cpp.D efault.props" was not found. Confirm that the path
in the declaration is correct , and that the file exists on
disk.
C:\Users\Daler\AppData\Roaming\npm\node_modules\meteorite\node_modules\ddp\node_modules\w
s\build\validation.vcxproj(18,3): error MSB4019: The imported project
"C:\Microsoft.Cpp.D efault.props" was not found. Confirm that the path
in the declaration is correct , and that the file exists on
disk.
cloned Telescope, then ran it with mrt from its folder, but got errors about missing dependencies of Meteorite. manually copied "router" and "page-js" packages to "Meteor/packages" as suggested here:
But still, running mrt or mrt run exits without error.
However running with meteor command sometimes starts the server on localhost and then fails due to a missing file and sometimes cannot find/start MongoDB.
Installing Microsoft Visual C++ 2010 Service Pack 1 Compiler Update for the Windows SDK 7.1 (as suggested by https://github.com/TooTallNate/node-gyp) fixed the MSB4019 error for me doing npm install xxx on Windows7 x64.
The readme of that update states that the recommended order is
Visual Studio 2010
Windows SDK 7.1
Visual Studio 2010 SP1
Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1