Forum Widgets
Latest Discussions
Can't install MAUI workload properly on Mac with .NET SDK 8
I’m having trouble installing the .NET MAUI workload on my Mac running macOS. Despite trying different versions of the .NET SDK (8.0.401 and 8.0.400), Visual Studio Code consistently fails to detect the installation. I was removing all .net installations also using recommended tools from documentation, and installing .net SDK again from scratch. Nothing changed the situation. I have been using "dotnet workload repair" , "dotnet workload clean", "dotnet workload restore", "dotnet workload update", nothing seems to work. Here are the sample logs always ending with same error Writing workload pack installation record for Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64 version 7.0.20... Warning: Workload garbage collection failed with error: Workload version 8.0.400-baseline.24375.2 was not found.. When I have SDK 8.0.401 installed, I have had similar error. I suspect that a previous installation of Visual Studio 2022 (which included .NET 5 and .NET 6) might have left behind some configuration or components that are interfering with the current setup. Here are the steps sudo dotnet workload install maui dotnet workload list Result: No entries on the list. However when I run "sudo dotnet workload list" I see: Installed Workload Id Manifest Version Installation Source -------------------------------------------------------------------- maui 8.0.72/8.0.100 SDK 8.0.400 On VSCode I have the error on.net maui project (created from template) ".NET MAUI SDK: not found. Please check the .NET MAUI output window for more info." The output looks: .NET MAUI Workloads: Path: /usr/local/share/dotnet Version: 8.0.400 Suggested Workloads to be installed: Workload: maui-ios Workload: maui-android .NET MAUI SDK verification failed. Please try running `dotnet workload restore` from your project's directory and reopen the solution. I also get an error from C# dev kit: "Failed to restore solution." The output looks: Determining projects to restore... /usr/local/share/dotnet/sdk/8.0.400/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To build this project, the following workloads must be installed: maui-android [/Users/pbaturo/Repos/dotnet-learning/MauiFirstApplication/MauiFirstApplication/MauiFirstApplication.csproj::TargetFramework=net8.0-android] /usr/local/share/dotnet/sdk/8.0.400/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To install these workloads, run the following command: dotnet workload restore [/Users/pbaturo/Repos/dotnet-learning/MauiFirstApplication/MauiFirstApplication/MauiFirstApplication.csproj::TargetFramework=net8.0-android] I have completely no idea why I have this issue. Can anyone help me with overcoming this, please?pbaturoSep 01, 2024Copper Contributor436Views0likes0CommentsIs it possible for the dotnet command to not publish some files?
I've received an unusual request from some users of an ASP.NET Core app. I'm using the dotnet command to clean and publish the solution, to a server in our network, using a GitHub self-hosted runner on another server. They don't want the dotnet command to publish the "appsettings.json" and "appsettings.Developer.json" files. Is there a way of preventing dotnet from publishing some files? Here's the code snippet I'm using from the YAML file: - name: Clean build run: dotnet clean $env:Solution_Name - name: Publish app run: dotnet publish -c Release $env:Solution_Name /p:PublishProfile=VaccineRegDevProfileRod-FJun 19, 2024Iron Contributor208Views0likes0CommentsBest Practices
Hello All: This question is for those of you who develop in .Net/Visual Studio. When building web facing user interfaces, what are your preferred tools for speeding up development time (and why)? Thanks in advance for your feedback.AccessDevJun 12, 2024Copper Contributor165Views0likes0CommentsMicrosoft.VisualStudio.Diagnostics.ServiceModelSink.dll installed by Visual studio 2022 has issue
I am using VS2022 community with latest update 17.9.6. I installed the component "Windows communication foundation" from VS installer. After it is installed, windows security reports this dll as suspicious and gives error "windows cannot verify the digital signature for this file. A recent hardware or software change might have installed a file that is signed incorrectly" when I ran my WCF application (which opens a service host). I debugged it further and noticed that machine.config is added with below: <commonBehaviors> <endpointBehaviors> <Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior/> </endpointBehaviors> <serviceBehaviors> <Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior/> </serviceBehaviors> </commonBehaviors> I then checked the digital signature associated to this dll (in GAC). I see that the certificate validity is no more valid. Now questions here are: 1) Can someone confirm if validity of the certificate is the reason of error "windows cannot verify the digital signature for this file. A recent hardware or software change might have installed a file that is signed incorrectly"? 2) If yes, how do we get new version of this dll with valid signature? NOTE: I am using windows 11 home with latest updates.harshbodhiApr 16, 2024Copper Contributor339Views0likes0CommentsLinux, 'strip' corrupt self-contained publish binary
For your knowledge (i search this community but i don't find anything related), Linux command strip -S --strip-unneeded "my_app" performed on a binary created with dotnet publish --runtime linux-x64 --self-contained true -p:PublishTrimmed=true -p:EnableCompressionInSingleFile=true corrupt the binary. Can be reproducible with any CLI program like the classic Hello World. ----------------------- In any Debian-derivated, when building a package (.deb), it will require to add an exception (in /usr/share/lintian/overrides) unstripped-binary-or-object in Lintian, otherwise .deb will throw an ERROR when installed (Lintian are called from package manager to validate the .deb package before install) ----------------------- In any Arch-derivated, makepkg perform a strip automatically ==> Tidying install... > Stripping unneeded symbols from binaries and libraries... resulting in a error when launching the binary: "Failure processing application bundle; possible file corruption." This can be avoided with options=('!strip') in PKGBUILD.Clodo1515Dec 11, 2023Copper Contributor325Views0likes0Comments.Net and Orphaned Classes
I decided to update some older code that targeted an older version of .Net. I've used vb.Net since forever so I'm used to the unwanted step-child treatment. I copied my code out of a text file hoping to reduce the chances of conversion problems. I targeted v6 because I heard it might stick for a bit. I used the ApplicationServices class of the VB Namespace in my code. I'm writing a Class library and my code needs to write a file in the folder (or at least the folder structure) of the application calling my library. I used ApplicationServices to get the StartupPath of the user. I decided since I'm probably the user of the library to set the path at runtime when I call the library. So, first question, anyone know how to get the user's StartPath with a .Net call? The real problem is, VS has marked my code with "Error BC30002 Type 'Global.Microsoft.VisualBasic.ApplicationServices.User' is not defined. QLib F:\Programing\Repository\dj\Libraries\QLib\vbc 1 Active". There is no file or folder at "vbc". I can't find anywhere within the VS environment to remove it's reference. It must be within one of the project files and the last time I tried to edit one of those directly, I lost a lot of work. I did my part and searched MS online but their suggestions didn't seem to apply when I tried them. How do I fix the error? Thx, djdjQueckeJun 15, 2023Copper Contributor402Views0likes0CommentsUnable to connect to TFS from Visual Studio 2017, getting TF31002: Unable to connect
I wonder if anyone could assist me with that. I am unable to connect to TFS from Visual Studio 2017, I get the error specified below "TF31002: Unable to connect to this Team Foundation Server: http://tfs.**************** Team Foundation Server Url: http://tfs.*************************** Possible reasons for failure include: The name, port number, or protocol for the Team Foundation Server is incorrect. The Team Foundation Server is offline. The password has expired or is incorrect. Technical information (for administrator): The remote server returned an error: (404) Not Found." Please note. I AM able to connect to this TFS server via the browser; thus, there is no issue with my credentials. I did look all over the internet for the solution, got the latest update for the VS2017, removed all stored credentials multiple times, did everything possible that I could find I vaguely remember that I dealt with the similar issue years ago but back then there was some sort of a hotfix issues by Microsoft, but now I am unable to find this hotfix Maybe anyone could suggest where I could locate this hotfix Thank you everyone in advanceMikhailPodolskiMar 22, 2023Brass Contributor2.2KViews0likes0CommentsDoes Azure DevOps Services work with older versions of Visual Studio?
I'm trying to convince my management that moving off of our old TFS 2015 to Azure DevOps Services would be a great idea. I can think of many good reasons to do so and have received more reasons from people when I asked for additional reasons. However, some of the answers I've received make me wonder how well older versions of Visual Studio will work with Azure DevOps Services. I use VS 2022 and occasionally 2019. Many of my fellow developers do the same thing. But some of my fellow developers at work refuse to stop using VS 2015, and older. I don't know how many of my colleagues are adamant about never upgrading to a current version of Visual Studio, but I know there are some. For them the old TFS 2015 suits them well and it works with the Visual Studio they know. But if we try to make a CI/CD pipeline, using Azure Pipelines in Azure DevOps Services, then would it work?Rod FalangaSep 02, 2022Brass Contributor764Views0likes0Comments“Sqlyog远程连接Linux失败(错误:1251)”,已解决。
软件设施:Windows MySQL 5.7 Linux MySQL8 远程连接工具:finashell 问题:使用Navicat时可以进行远程连接,当使用Sqlyog时报错:1251。 解决步骤:打开finashell 连接 mysql -uroot -p 进入mysql。 显示“%validate%”等变量; 指令调出 #查看密码策略# 设置全局validate_password.policy=0; 指令调出#设置密码策略,设置为弱口令# ALTER USER 'root'@'%' 用 'new_password mysql_native_password标识(输入新设置密码)'; 重新使用Sqlyog连接,成功。 附言:操作之前,本人Linux主机上已自定义设置了密码,最后一步操作时可以输入原自定义密码作为新密码。Wang-ChenhuiAug 15, 2022Copper Contributor1.5KViews1like0Comments