I have VS2019 Enterprise version and am following this example Intellitrace debugging. I have enabled Intellitrace:
and have set the option to display the navigation gutter:
But when i'm debugging i don't see the expected double arrows in the margin:
Any ideas why i'm not seeing them ?
It looks like this feature is (rather surprisingly) only supported for .net framework projects and not .net core Intellitrace does not work with .NET Core
Related
I'm trying to add platform-specific code for iOS to my .NET MAUI app.
I'm targeting an iPhone with net6.0-ios:
However, Visual Studio thinks I'm targeting Android:
Compiling and running the app works fine (breakpoints within iOS preprocessor directive are hit), but it's a hassle to have to implement the iOS-specific code outside of the conditional preprocessor directives (with a bunch of warnings saying types aren't available) to be able to get some IntelliSense.
I'm suspecting this is a bug, but curious if there's any workaround?
Edit: Not a bug, I was just being an idiot not realizing the code editor and debugging target don't necessarily have to be one and the same.
Look in the first picture you posted, at upper left corner. ...App (net6.0-android). That is current value of a dropdown, that determines which project Intellisense uses. Change that to iOS.
I have added an SQL data source into my project and I am currently trying to demo an output of the table I have created.
I plan to use a BindingSource control to do so.
However, where there is normally an option to Add Project Data Source, I found nothing (seen in Figure 1), where there should be the option (seen in Figure 2).
I am using Visual Studio 2019, I have tried using .NET 5.0 (current) aswell as Core 3.1 and Core 3.0.
I lost the link where MS says it, but if it helps any I had the same and it turned out this support for databinding is not supported in .Net Core (or at least the version I had). You have to create a windows forms project, then this feature becomes visible.
I have a very odd problem where I will apply a recommended change that uses a C# 8.0 language feature (in this example I'll use compound assignment). I then get a red squiggly with the following message...
C# 8.0 language feature
This is a net5.0 project I have tried setting my language version property to any of the following...
<LangVersion>9</LangVersion>
<LangVersion>9.0</LangVersion>
<LangVersion>latest</LangVersion>
All of them show the same behaviour. The only way I can get the error to go away is by setting the property to 8 or 8.0 which seems a somewhat retrograde step!
I'm using Visual Studio 2019 and I'm fully patched and up to date as of the time of writing, along with the latest version of ReSharper.
The code will compile without problems but the squiggles are generating noise. Has anyone else found this and has any ideas how to make it go away?
This looks like it was a ReSharper issue - JetBrains have introduced a new tool called Jetbrains Toolbox that seems to manage their updates now. My installed package was telling me it was up to date when it wasn't - I looked deeper and I was running ReSharper 2019.1 and not 2021.1
So, I create new empty/MVC project, add simple controller and view for uploading file, lauch program under the Debug mode and trying to upload file.
After selecting file (immediately, right after chosing the file in explorer!) program exits debugging and I'm getting 404 in my browser.
When lauching project without debugging everything works good, but this is not a solution... what if I need to test uploading exactly in the Debug mode?
In ASP Core I'm getting the same issue.
I've tried different variations of code, including version of A. Freeman, published in his book "Pro ASP.Net MVC 5" - nothing works.
This is a bug of visual(I am not sure). You can fix this by change keyboard of visual studio to Visual C# 2005. You should run in Chrome, Firefox or Microsoft Edge. Others browser is not compatible.
You can find keyboard settings in Tools -> Options -> Environment -> Keyboard
Change setting to Visual C# 2005 -> Ok. Restart computer or visual studio. It will works!
I just recently swapped my MS PC for an Mac, I'm trying to continue working on an MVC project, but I'm getting an error (Error CS1902: Invalid option 'portable' for /debug; must be full or pdbonly (CS1902)).
Are there any good documents that explain how to make it work? I have seen people porting MVC to .NET Core, but I can't get the analyser to work on my Mac (not sure it's supported yet).
I did two things.
I update the Microsoft.Net.Compliers via nuget.
https://www.nuget.org/packages/Microsoft.Net.Compilers/
Change one value in the properties of project.
https://johnharold.wordpress.com/2017/08/16/csc-error-cs1902-invalid-option-portable-for-debug-must-be-full-or-pdbonly-cs1902/
I wish you can solve the problem
I had this same problem when trying to use Visual Studio for Mac to build a solution that works fine in Windows. Turns out the /debug:portable flag was being passed to the build command, even though the 'Debug Information' was correctly set to 'Full' in my project settings. Search the build output for 'portable' and you will indeed find the flag there regardless of your settings.
The fix is to upgrade the Microsoft.Net.Compilers nuget package. In my case, it upgraded from 1.0 to 2.7, and then the project built successfully.
Right click on the project in the solution explorer and go to
Options, Build, Compiler and change Debug information to Full