visual studio
31 TopicsIs 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=VaccineRegDevProfile208Views0likes0CommentsAny recommended UI/UX framework?
Hi, I am new to .net. May I know if there is any UI/UX framework that is good for .net webpage with search criteria? I would like to have a textbox with the following input methods: - Exact text match - Wildchars * - Copy and paste the list - Enter number range Thank you!269Views0likes1CommentMicrosoft.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.339Views0likes0CommentsMSB4011 warnings
Got a project with 2 of these warnings and it seems there's nothing I can do in VS to fix these. Where does it come from and how to solve it ? All I see when showing all files is a Imports folder with subfolders that seems to be links and there's nothing I can do with them in this project. The weird part is that from 12 projects in my solutions only this project exhibit this issue. I wish I could remove these warnings or know how to fix them Severity Code Description Project File Line Suppression State Warning MSB4011 "C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk.Publish\Sdk\Sdk.props" cannot be imported again. It was already imported at "C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk.Worker\targets\Microsoft.NET.Sdk.Worker.props (50,3)". This is most likely a build authoring error. This subsequent import will be ignored. waInvoiceSystem 1 Severity Code Description Project File Line Suppression State Warning MSB4011 "C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk.Publish\Sdk\Sdk.targets" cannot be imported again. It was already imported at "C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk.Worker\targets\Microsoft.NET.Sdk.Worker.targets (24,3)". This is most likely a build authoring error. This subsequent import will be ignored. waInvoiceSystem 1Solved1.1KViews0likes3Commentsfont size in the debugger watch1 to 4 window
Hi, How to increase the size of the watch windows, in the debugger. It's just horrible, such tiny size. - I can increase the size of the editor, impossible to find where I can increase the size of this window. I have the same question with the output windows, with errors of compilation Tx for your help851Views0likes3Comments.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, dj402Views0likes0CommentsForm1 Rename Problem in Visual Studio
If you create a Windows Forms project in Visual Studio 2022, it creates a Form1.cs file, a Form1.cs [Design] form, and a Form1.Designer.cs file. You can then drag items from the toolbox onto the form or select the form and using the form properties window to add event handlers like OnPaintForm1, and the Designer will handle those actions appropriately. However, if after creating the project, you immediately rename Form1.cs and its counterparts to, say, MyForm.cs, etc. and then drag items from the toolbox to the form or select the form and use the properties window to add event handlers, the Designer does not appropriately update the renamed form files or form design. What I have to do is use the original Form1 files, add the tools and event handlers, and build the application. After that, I can rename the files and they still work. Is there a way to fix the problem of renaming first?Solved1.4KViews0likes3CommentsVisual Studio and problems with custom controls
Hello @all, to first: sorry for my bad english ! And now to my problem: I have for some time with VisualStudio 2019 the following problem: In a project have custom controls. For example, a custom button that inherited from System.Windows.Forms. Public Class clsButton Inherits System.Windows.Controls.Button .... or Public Class clsMasterForm Inherits System.Windows.Forms.Form ... Everything works, the "new" button works great, the new properties are active and can be used without any problems. Suddenly, from one close of the project to the next open, VS2019 can't find the new controls. Also from the toolbox (for WinForms) these controls have disappeared. If I now exclude these controls from the project, and after a VS2019 restart, add them back to the project, everything works again. The controls are in the toolbox until the next time. Without that I can see any pattern/regularity. (Environment: W10 current patch level, VS2019 current patch level, 64 GB memory, in an ADS). Do any of you know what is happening here ? As I said it is rare and sporadic. I also had this under VS2010 (on W7 PC). Oh well, with VS2022 I could not test yet if it occurs there too. Thanks a lot SH2KViews0likes4Comments