I'm trying to generate HTML issues report for my C# projects using Sonarlint for the command line. After downloading and following instruction from Sonarlint command line page, I still can't generate c# reports (even when I copied c# plugin to plugins folder) but it works fine with Java projects.
My question is: can Sonarlint create C# html issue report? If it can't, is there any alternative way to achieve this? Thanks in advance
SonarLint for Command Line can't be used on Java, C#, VB/Net, C/C++ projects because the analysis of those projects requires to be fully integrated into the build systems. So for C# and VB.Net, the only but powerful way to get a feedback while coding is by using SonarLint for Visual Studio (http://www.sonarlint.org/visualstudio/index.html).
Related
Dear Community. I have faced on the case when is needed to compile C# source code without Visual Studio usage in order to build it in DLL library and then include this package into other platforms (not only Windows-based). After a little bit of investigation CMake as a build tool has been chosen and appropriate configuration file (CMakeLists.txt) created. During it's running using native command prompt there is a mistake of compilation - "C# is currently only supported for Microsoft Visual Studio 2010 and later". That's why I would like to ask you share your knowledge and provide any additional cases to build it (some additional tools or whole scenarios) such as I'm a brand new in this topic and can't proceed before that wall (; . Thank you in advance.
This is related to new features Visual Studio has introduced - Python support, Machine Learning projects to support.
I have installed support and found that I can create a python project and can run it. However, I could not find how to call a python function from another C# file.
Example, I created a classifier.py from given project samples, Now I want to run the classifier and get results from another C# class.
If there is no such portability, then how is it different from creating a C# Process class object and running the Python.exe with our py file as a parameter.
As per the comments, python support has come in visual studio. Visual studio is supporting running python scripts and debugging.
However, calling one python function from c# function and vice versa is not supported yet.
Closing the thread. Thanks for suggestions.
I've a bit of confusion about roslyn.
What I have done:
I've installed vs 2015 community edition and download in extensibilty > download compiler platform sdk.
So I created a simple console application: hello world example.
Well now I'm expect to choise the c# compiler between the vs2015 default one and roslyn..., but I've not found such option.
So my first question is: how to select version of c# compiler?
Second I've downloaded master-roslyn and I build, then I found csc.exe, well the odd things is that if I lauch the exe
I get c# compiler version 42.42.42.42. ???? Right?
Then I've follow some tutorials, but all purpose me:
to load a source from text file or string vars and analyze or change syntax tree, then compile to var.
Well at this point I'm confused... So:
What is roslyn exactly? A meta compiler? This mean that I can change my code at runtime just like Reflection?
Second: how can compile with vs2015 with default csc or choose roslyn?
third: If I build a custom version of roslyn How can I compile my source using Vs2015 ?
Which know if csc.exe is roslyn? No help or command line print the codename.
Thanks
So it looks like you've got a few questions:
What is Roslyn?
Roslyn is the new default compiler inside of Visual Studio 2015. If you're building and running applications within Visual Studio 2015, they're being compiled with the Roslyn compiler. You'll get to take advantage of all the new C# 6 features that are available only within the new compiler.
If you're using VS2015, Roslyn has replaced the old compiler entirely and as far as I know you can't use the old compiler within VS 2015.
Roslyn is also a platform that allows you to build programs that can modify, interpret and understand other programs. It's not really meant to let you write code that modifies itself (although that's probably possible to a degree).
The common use cases for Roslyn are:
Building Code Analyzers that provide errors and warnings within Visual Studio.
Building extensions for Visual Studio that understand source code.
Building other tools that understand or run source code. Example: ScriptCS - Scripting with C# code.
In order to use Roslyn for these purposes, you pull down the Microsoft.CodeAnalysis packages from NuGet. You can use these packages to parse code, analyze syntax trees, analyze symbols or compile code and emit IL.
If you're interested in learning more about Roslyn, I've started a series called Learn Roslyn Now that you might be interested in.
Can I replace the compiler?
Yes you can, but I'm not convinced this is a great idea outside of testing changes you want to contribute back to Roslyn. You can pull down Roslyn from GitHub and follow these instructions to build and run Roslyn from within Visual Studio.
If you follow those instructions, you'll be able to run the Roslyn project with F5. It will start a new instance of Visual Studio that's using your customized compiler. This is how people outside of Microsoft will contribute features to the compiler from now on. (Previously you couldn't deploy your custom compiler to Visual Studio but they fixed that in Visual Studio Update 1).
Roslyn is two things:
An API that lets you see "compiler things" like syntax trees and symbols.
A new csc.exe that is implemented atop #1.
If you want to make changes to the compiler and use that to build, take a look at these instructions if you haven't already. There's a few different ways you can make your own version of csc.exe and then use that to build something. But there's no "choice" dialog like you're looking for.
Roslyn is the default compiler of Visual Studio 2015. So, if you install VS2015 you´re already using Roslyn.
Roslyn is a codename for .NET Compiler Platform, and it provides open-source C# and Visual Basic compilers. The project is available on github.
I want to develop sonarqube plugin for c#. I developed some source code analysis tool in c# and I want to integrate into sonarqube. I just want to know which IDE I must use for this work and how to setup project in that IDE . can I code this plugin in visual studio?
ThankYou
All plugins must be written in Java. You can execute your tool by Java code.
You should read Developing Plugins guide on the SonarQube Wiki.
Since the plugin must be written in Java you can't use Visual Studio. I would recommend IntelliJ and the plugin-project that I'm working on right now is Maven-type.
This is also a good guide on how to develop the plugin https://deors.wordpress.com/2014/03/20/sonarqube-plugins-1/
I'm using madExcept component in Delphi to catch unmanaged exception and create a full report with email capability.
What component (paid or free) with same features exist for C++ and C# compatible with Visual Studio.
Mandatory features:
Full report creation
email capability
Minor customization
None to minor source code modification
You can use (commercial) SmartAssembly - it has several features (obfuscation, dependency merging...) and comes with a similar capability regarding error/exception reporting with eMail/SOAP etc.
You can use any feature without activating the other features (no source code modification necessary although it comes with an SDK for customization if need be)... BUT it works only with .NET - so if you are not using C++/CLI then this tool only covers the C# part of your question...
(not affiliated just a happy customer)
For Visual C++ try open source CrashRPT for Windows, if your app is written in Visual C++. Doesn't work with C#.
You can try EurekaLog .Net edition, which is equivalent to MadExcept for Delphi and has .Net version for Visual studio.