I just updated a project to use .NET5 on the latest VS2019, and given that the .NET analyzers are now part of .NET5, I reverted to using those.. except they're all suppressed. The CA1062 rule for example, is listed as having a severity of 'Warning', but an 'Effective Severity' of 'Suppressed', and I can't find any way of getting it to work.
I don't have an editor config or anything like that, even on a brand new project it does the same. I've searched as much as I can, but I can't find anywhere that might give me some clue as to why this is happening.
Anybody got any ideas?
try setting
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
in your .csproj file. See AnalysisMode
Related
I am trying to learn Kotlin by following the tutorial. I managed to get the plugin installed in Intellij. But I am not able to get the first exercise to run. When I click on the little checkbok it tells me
Failed to launch checking. See idea.log for more details.
(I created another blank project and type the same simple exercise in a scratch file and it works.)
link to docs
Try to check the project's is linked to the right JDK. Open File/Project Structure/Project. Then select the correct Project SDK.
To me, this helped. But as others have pointed out, please, share your idea.log, which you can find at Help/Show log in [whatever text editor it's associated with].
This is a follow-up to my post yesterday. To recap, I received this error message when trying to build my project:
FSC: Error FS2024: Static linking may not use assembly that targets
different profile
I consulted some kind people in the F# fpchat.com channel, and one of them suggested that the error could be due to the fact that I did not have Profile 47, because FSharp.Data uses Profile 47. I tried downloading the target pack for Profile 47, but was redirected to the Microsoft homepage instead. I tried the second answer on this SO page, but that did not work either. As of now, I am still unable to acquire Profile 47.
I consulted the FSharp.Data GitHub page, but it is not clear to me why Profile 47 is needed. I use VS2013 compiling to FSharp.Core 4.3.0.0; shouldn't that be sufficient, since the GitHub page lists it as one of the supported platforms?
I have created a new project, re-added all my source files and references, and tried re-building. I have even tried uninstalling and then re-installing Microsoft VS, even though I know it is likely irrelevant.
I think it is most probable that the problem lies with referencing FSharp.Data.TypeProviders. The error message does not appear insofar as I exclude reference to FSharp.Data.TypeProviders. The strangest thing is that I have not changed my references at all over the past week or so, but the error message only appeared yesterday.
So, my questions are:
Is Profile 47 really required? If so, how may I acquire it?
Even if I do acquire Profile 47, wouldn't I still experience trouble building my project, since my other references do not target Profile 47?
Are there any approaches that I may not have considered?
After tearing my hair out trying a variety of suggested solutions I found online, I discovered that the only way to resolve the issue was to change my Target Framework from 4.5 to 4.0, re-install all of my references to ensure compatibility with .NET 4.0, and then re-build my solution. Using .NET 4.0 means that I am no longer able to use Microsoft.Experimental.Collections, since it is compatible only with .NET 4.5. This means that I will have to re-write all of my code that makes use of Microsoft.Experimental.Collections, but I consider that a lesser evil than not being able to build my project at all.
So, to answer my own question mentioned in the title, Profile 47 is not required to use FSharp.Data.TypeProviders. :-)
EDIT:
I have found another solution to my problem. I created a new project (again), migrated all my source files over, re-installed all the DLLs I need, and this time I have no trouble whatsoever building my project. I think Carsten (who wrote the first comment to this answer) is correct in saying that the versions became messed up in the original solution files.
I have a fairly simple one solution project in VS2012. Standard windows forms, no special DLLs.
I get to a point were if I add more code to any form, or add a new control, the build fails in DEBUG mode. If I remove the line or the control, it works.
If I switch to RELEASE, the build succeeds.
If I create a new configuration and copy RELEASE, then that too fails.
If I revert to VS2008, all is fine. If I then re-convert the solution, it will be fine for a while.
Anybody else see that? I have researched the cases about missing DLLs and locked files, but that doesn't seem to apply. Neither does renaming the assembly work.
After many hours of looking at the options, a workaround is to turn on optimisations in "Advanced Compile Options".
I do not know what optimisations actually optimise, but they are turned off in debug by default because the debugger doesn't like them. Apparently, they will move code around.
This is obviously only a workaround and not the cause, so any other suggestions are welcome!
Is there a way to configure MonoDevelop to highlight type-names like VS does?
I am using MonoDevelop 2.8.8.4 on Fedora-17.
It looks like MonoDevelop semantic highlighting is back on 3.0
I've got MD working on Ubuntu- though I have it running by pulling source from github and (after doing all the necessary build steps) calling make run- in case you would like to give it a go; I can highly recommend moving to 3.0.. (if possible), it's got some other refactoring capabilities that make it worth it!
In order to get semantic highlighting, you'll need to upgrade to MonoDevelop 3.0.x
Some months ago I installed Lazarus 0.9.28 + FPC 2.2.4 to work on a new project. Some time after it I ran into some bugs related with image loading on a TImage. After googling a bit I found some information pointing to the fact that the bugs I was facing were already solved in a later version of FPC (can't remember the link now).
So I decided to download and install a newer version. This was around January and the latest stable version was not released yet, so I choose to install the snapshot Lazarus 0.9.31-29128 + FPC 2.4.2-2011-01-20. I opened my project with the new IDE and compiled it.
Luckily the bugs I faced were gone, but I have run into an IDE (?) one. After the upgrade, when I am on the code tab of some of my forms I do not see the code formatted. Instead I only see plain text, like this:
But on some forms I see the code formatted correctly, like this:
Anyone has run into this before? If yes, could you solve it and how? Or can anyone tell me what the correct way to upgrade a Lazarus project between versions is?
It is more of a nuisance than a real problem but still I would like to solve it. Any help would be appreciated.
EDIT
I noticed that in the forms where the code shows correctly highlighted the LCLVersion in the .lfm file is 0.9.28.2, while in the forms where the code shows like plain text that property in the .lfm file is 0.9.31. Could have something to do with the problem? I tried changing the value but it did not change anything.
Thanks in advance and best regards
I don't know if this is actually causing your problem, but Lazarus keeps a set of settings in application local. ($user\AppData\Local\lazarus on my vista).
This config dir is not erased upon deinstallation, and the new installation will reuse this.
In case of strange problems, remove the config dir, and let the current installation generate a new one.